summaryrefslogtreecommitdiff
path: root/src/collection/retry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/collection/retry.rs')
-rwxr-xr-xsrc/collection/retry.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/collection/retry.rs b/src/collection/retry.rs
index 64e8ca8..c887405 100755
--- a/src/collection/retry.rs
+++ b/src/collection/retry.rs
@@ -1150,11 +1150,11 @@ mod tests {
let collection: RetryingLockCollection<[RwLock<i32>; 0]> = RetryingLockCollection::new([]);
let guard = collection.lock(key);
- assert!(guard.len() == 0);
+ assert!(guard.is_empty());
let key = RetryingLockCollection::<[RwLock<_>; 0]>::unlock(guard);
let guard = collection.read(key);
- assert!(guard.len() == 0);
+ assert!(guard.is_empty());
}
#[test]
@@ -1163,11 +1163,11 @@ mod tests {
let collection: RetryingLockCollection<[RwLock<i32>; 0]> = RetryingLockCollection::new([]);
let guard = collection.read(key);
- assert!(guard.len() == 0);
+ assert!(guard.is_empty());
let key = RetryingLockCollection::<[RwLock<_>; 0]>::unlock_read(guard);
let guard = collection.lock(key);
- assert!(guard.len() == 0);
+ assert!(guard.is_empty());
}
#[test]
@@ -1175,7 +1175,7 @@ mod tests {
let mutexes = [Mutex::new(0), Mutex::new(1)];
let collection = RetryingLockCollection::new_ref(&mutexes);
- assert!(std::ptr::addr_eq(&mutexes, collection.as_ref()))
+ assert!(std::ptr::addr_eq(&raw const mutexes, collection.as_ref()))
}
#[test]
@@ -1193,7 +1193,7 @@ mod tests {
let mutexes = [Mutex::new(0), Mutex::new(1)];
let collection = RetryingLockCollection::new_ref(&mutexes);
- assert!(std::ptr::addr_eq(&mutexes, *collection.child()))
+ assert!(std::ptr::addr_eq(&raw const mutexes, *collection.child()))
}
#[test]