From 698dd9dac7f0ca02ded9b3a56b45ac71a7dbbb04 Mon Sep 17 00:00:00 2001 From: Botahamec Date: Thu, 23 May 2024 19:53:27 -0400 Subject: Unused function --- src/rwlock/rwlock.rs | 11 ----------- 1 file changed, 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 RwLock { } } - /// 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> { - 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) { -- cgit v1.2.3