summaryrefslogtreecommitdiff
path: root/src/rwlock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rwlock.rs')
-rw-r--r--src/rwlock.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rwlock.rs b/src/rwlock.rs
index 9b65a0b..64dc82b 100644
--- a/src/rwlock.rs
+++ b/src/rwlock.rs
@@ -126,7 +126,7 @@ mod tests {
let lock: crate::RwLock<_> = RwLock::new("Hello, world!");
assert!(!lock.is_locked());
- assert!(lock.try_write(key).is_some());
+ assert!(lock.try_write(key).is_ok());
}
#[test]
@@ -135,7 +135,7 @@ mod tests {
let lock: crate::RwLock<_> = RwLock::new("Hello, world!");
let reader = ReadLock::new(&lock);
- assert!(reader.try_lock(key).is_some());
+ assert!(reader.try_lock(key).is_ok());
}
#[test]
@@ -144,7 +144,7 @@ mod tests {
let lock: crate::RwLock<_> = RwLock::new("Hello, world!");
let writer = WriteLock::new(&lock);
- assert!(writer.try_lock(key).is_some());
+ assert!(writer.try_lock(key).is_ok());
}
#[test]