diff options
| author | Botahamec <botahamec@outlook.com> | 2024-05-23 19:53:27 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-05-23 19:53:27 -0400 |
| commit | 698dd9dac7f0ca02ded9b3a56b45ac71a7dbbb04 (patch) | |
| tree | 7f22da2d472edec074e81e6af2b2f9139e1ac74e /src/rwlock | |
| parent | f81d4b40a007fecf6502a36b4c24a1e31807a731 (diff) | |
Unused function
Diffstat (limited to 'src/rwlock')
| -rw-r--r-- | src/rwlock/rwlock.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/rwlock/rwlock.rs b/src/rwlock/rwlock.rs index 00ce7d0..5b6065a 100644 --- a/src/rwlock/rwlock.rs +++ b/src/rwlock/rwlock.rs @@ -266,17 +266,6 @@ impl<T: ?Sized, R: RawRwLock> RwLock<T, R> { } } - /// Attempts to create an exclusive lock without a key. Locking this - /// without exclusive access to the key is undefined behavior. - pub(crate) unsafe fn try_write_no_key(&self) -> Option<RwLockWriteRef<'_, T, R>> { - if self.raw.try_lock_exclusive() { - // safety: the lock is locked first - Some(RwLockWriteRef(self, PhantomData)) - } else { - None - } - } - /// Unlocks shared access on the `RwLock`. This is undefined behavior is /// the data is still accessible. pub(super) unsafe fn force_unlock_read(&self) { |
