diff options
| author | Botahamec <botahamec@outlook.com> | 2024-12-21 11:27:09 -0500 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-12-21 11:27:09 -0500 |
| commit | b2281e6aec631dc7c6d69edef9268ce7e00ed1dc (patch) | |
| tree | 4a3d9059e291016dcfaec8b08ac4aee48a7b815a /src/rwlock/write_guard.rs | |
| parent | 0ddbb5efa57fb36b2c83a5cd1dc43a5cf426e3ee (diff) | |
Implement lock death, but without any usages
Diffstat (limited to 'src/rwlock/write_guard.rs')
| -rw-r--r-- | src/rwlock/write_guard.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rwlock/write_guard.rs b/src/rwlock/write_guard.rs index 9ffea39..31ed14a 100644 --- a/src/rwlock/write_guard.rs +++ b/src/rwlock/write_guard.rs @@ -5,6 +5,7 @@ use std::ops::{Deref, DerefMut}; use lock_api::RawRwLock; use crate::key::Keyable; +use crate::lockable::RawLock; use super::{RwLock, RwLockWriteGuard, RwLockWriteRef}; @@ -56,7 +57,7 @@ impl<'a, T: ?Sized + 'a, R: RawRwLock> Drop for RwLockWriteRef<'a, T, R> { fn drop(&mut self) { // safety: this guard is being destroyed, so the data cannot be // accessed without locking again - unsafe { self.0.force_unlock_write() } + unsafe { self.0.raw_unlock() } } } |
