From 657377311d3b041ac7b942e61ddbbe2861c494ec Mon Sep 17 00:00:00 2001 From: Mica White Date: Wed, 25 Dec 2024 11:17:35 -0500 Subject: try_lock returns a Result --- src/rwlock/write_lock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rwlock/write_lock.rs') 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 WriteLock<'_, T, R> { pub fn try_lock<'s, 'key: 's, Key: Keyable + 'key>( &'s self, key: Key, - ) -> Option> { + ) -> Result, Key> { self.0.try_write(key) } -- cgit v1.2.3