summaryrefslogtreecommitdiff
path: root/src/rwlock/read_lock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rwlock/read_lock.rs')
-rw-r--r--src/rwlock/read_lock.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rwlock/read_lock.rs b/src/rwlock/read_lock.rs
index c5c4c8c..e518cf3 100644
--- a/src/rwlock/read_lock.rs
+++ b/src/rwlock/read_lock.rs
@@ -72,7 +72,7 @@ impl<T: ?Sized, R: RawRwLock> ReadLock<'_, T, R> {
pub fn try_lock<'s, 'key: 's, Key: Keyable + 'key>(
&'s self,
key: Key,
- ) -> Option<RwLockReadGuard<'s, 'key, T, Key, R>> {
+ ) -> Result<RwLockReadGuard<'s, 'key, T, Key, R>, Key> {
self.0.try_read(key)
}