Skip to content

Commit 64d71ea

Browse files
committed
chore(maitake-sync): remove dead lock_api feature (#502)
1 parent b4eb714 commit 64d71ea

File tree

1 file changed

+0
-64
lines changed

1 file changed

+0
-64
lines changed

maitake-sync/src/blocking/rwlock.rs

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -126,59 +126,6 @@ pub unsafe trait RawRwLock {
126126
fn is_locked_exclusive(&self) -> bool;
127127
}
128128

129-
#[cfg(feature = "lock_api")]
130-
unsafe impl<T: lock_api::RawRwLock> RawRwLock for T {
131-
type GuardMarker = <T as lock_api::RawRwLock>::GuardMarker;
132-
133-
#[inline]
134-
#[track_caller]
135-
fn lock_shared(&self) {
136-
lock_api::RawRwLock::lock_shared(self)
137-
}
138-
139-
#[inline]
140-
#[track_caller]
141-
fn try_lock_shared(&self) -> bool {
142-
lock_api::RawRwLock::try_lock_shared(self)
143-
}
144-
145-
#[inline]
146-
#[track_caller]
147-
unsafe fn unlock_shared(&self) {
148-
lock_api::RawRwLock::unlock_shared(self)
149-
}
150-
151-
#[inline]
152-
#[track_caller]
153-
fn lock_exclusive(&self) {
154-
lock_api::RawRwLock::lock_exclusive(self)
155-
}
156-
157-
#[inline]
158-
#[track_caller]
159-
fn try_lock_exclusive(&self) -> bool {
160-
lock_api::RawRwLock::try_lock_exclusive(self)
161-
}
162-
163-
#[inline]
164-
#[track_caller]
165-
unsafe fn unlock_exclusive(&self) {
166-
lock_api::RawRwLock::unlock_exclusive(self)
167-
}
168-
169-
#[inline]
170-
#[track_caller]
171-
fn is_locked(&self) -> bool {
172-
lock_api::RawRwLock::is_locked(self)
173-
}
174-
175-
#[inline]
176-
#[track_caller]
177-
fn is_locked_exclusive(&self) -> bool {
178-
lock_api::RawRwLock::is_locked_exclusive(self)
179-
}
180-
}
181-
182129
impl<T> RwLock<T> {
183130
loom_const_fn! {
184131
/// Creates a new, unlocked `RwLock<T>` protecting the provided `data`.
@@ -215,17 +162,6 @@ impl<T> RwLock<T> {
215162
}
216163
}
217164

218-
#[cfg(feature = "lock_api")]
219-
impl<T, Lock: lock_api::RawRwLock> RwLock<T, Lock> {
220-
/// Creates a new instance of an `RwLock<T>` which is unlocked.
221-
pub const fn new_with_raw_mutex(data: T) -> Self {
222-
RwLock {
223-
data: UnsafeCell::new(data),
224-
lock: Lock::INIT,
225-
}
226-
}
227-
}
228-
229165
impl<T: ?Sized, Lock: RawRwLock> RwLock<T, Lock> {
230166
fn read_guard(&self) -> RwLockReadGuard<'_, T, Lock> {
231167
RwLockReadGuard {

0 commit comments

Comments
 (0)