summaryrefslogtreecommitdiff
path: root/src/rwlock/write_lock.rs
diff options
context:
space:
mode:
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)
}