summaryrefslogtreecommitdiff
path: root/src/rwlock/write_lock.rs
diff options
context:
space:
mode:
authorMica White <botahamec@gmail.com>2024-12-25 11:17:35 -0500
committerMica White <botahamec@gmail.com>2024-12-25 11:17:35 -0500
commit657377311d3b041ac7b942e61ddbbe2861c494ec (patch)
tree5e041812c67e7ef0451b35d0b33ee90be28fbeaf /src/rwlock/write_lock.rs
parent7e2a3aa417beb33c76fe98fbe49515c524cb0183 (diff)
try_lock returns a Result
Diffstat (limited to 'src/rwlock/write_lock.rs')
-rw-r--r--src/rwlock/write_lock.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rwlock/write_lock.rs b/src/rwlock/write_lock.rs
index 77b68c8..ba05e87 100644
--- a/src/rwlock/write_lock.rs
+++ b/src/rwlock/write_lock.rs
@@ -73,7 +73,7 @@ impl<T: ?Sized, R: RawRwLock> WriteLock<'_, T, R> {
pub fn try_lock<'s, 'key: 's, Key: Keyable + 'key>(
&'s self,
key: Key,
- ) -> Option<RwLockWriteGuard<'s, 'key, T, Key, R>> {
+ ) -> Result<RwLockWriteGuard<'s, 'key, T, Key, R>, Key> {
self.0.try_write(key)
}