diff --git a/tests/property.rs b/tests/property.rs index 2f2d0fc..c29a07d 100644 --- a/tests/property.rs +++ b/tests/property.rs @@ -182,9 +182,10 @@ fn try_lock_set_rollback_is_complete() { let held = idx_raw as usize % n; // Shared so a holder thread can take one lock while the main - // thread builds a LockSet over the whole slice. - let locks: Arc>> = - Arc::new((0..n).map(|i| Mutex::new(i as u32)).collect()); + // thread builds a LockSet over the whole slice. (Values + // are irrelevant here -- we assert lock *availability*, not + // contents -- so they're all zero.) + let locks: Arc>> = Arc::new((0..n).map(|_| Mutex::new(0)).collect()); let barrier = Arc::new(Barrier::new(2)); let release = Arc::new(AtomicBool::new(false)); diff --git a/tests/try_acquire.rs b/tests/try_acquire.rs index 0ef139e..5c1d4c1 100644 --- a/tests/try_acquire.rs +++ b/tests/try_acquire.rs @@ -502,7 +502,10 @@ mod multi_lock { let a: Arc> = Arc::new(Mutex::new(1)); let b: Arc> = Arc::new(Mutex::new(2)); // sorts in the middle let c: Arc> = Arc::new(Mutex::new(3)); - assert!(a.id() < b.id() && b.id() < c.id(), "construction order = sort order"); + assert!( + a.id() < b.id() && b.id() < c.id(), + "construction order = sort order" + ); let barrier = Arc::new(Barrier::new(2)); let release = Arc::new(AtomicBool::new(false));