Skip to content

Commit 1f6e68e

Browse files
authored
Merge pull request #244 from Amanieu/remove-mapped-downgrade
2 parents 8852b4a + 55f58b5 commit 1f6e68e

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

lock_api/src/rwlock.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,30 +1559,6 @@ impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> MappedRwLockWriteGuard<'a, R, T> {
15591559
}
15601560
}
15611561

1562-
impl<'a, R: RawRwLockDowngrade + 'a, T: ?Sized + 'a> MappedRwLockWriteGuard<'a, R, T> {
1563-
/// Atomically downgrades a write lock into a read lock without allowing any
1564-
/// writers to take exclusive access of the lock in the meantime.
1565-
///
1566-
/// Note that if there are any writers currently waiting to take the lock
1567-
/// then other readers may not be able to acquire the lock even if it was
1568-
/// downgraded.
1569-
#[deprecated(
1570-
since = "0.3.3",
1571-
note = "This function is unsound and will be removed in the future, see issue #198"
1572-
)]
1573-
pub fn downgrade(s: Self) -> MappedRwLockReadGuard<'a, R, T> {
1574-
s.raw.downgrade();
1575-
let raw = s.raw;
1576-
let data = s.data;
1577-
mem::forget(s);
1578-
MappedRwLockReadGuard {
1579-
raw,
1580-
data,
1581-
marker: PhantomData,
1582-
}
1583-
}
1584-
}
1585-
15861562
impl<'a, R: RawRwLockFair + 'a, T: ?Sized + 'a> MappedRwLockWriteGuard<'a, R, T> {
15871563
/// Unlocks the `RwLock` using a fair unlock protocol.
15881564
///

0 commit comments

Comments
 (0)