diff options
| author | Mica White <botahamec@outlook.com> | 2026-02-07 10:49:18 -0500 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-02-07 10:49:18 -0500 |
| commit | bf11d8039eb72a37e852f5b64c8ee1f241203878 (patch) | |
| tree | a76a4ba9f2c14e580b6efc0ea7dabb1b81cc3d4e /src/collection/boxed.rs | |
| parent | 2096d0c6819ce0e8f6c6e77e36ebc495924dad63 (diff) | |
Fix clippy warnings
Diffstat (limited to 'src/collection/boxed.rs')
| -rwxr-xr-x | src/collection/boxed.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/collection/boxed.rs b/src/collection/boxed.rs index 3600d8e..85ec34f 100755 --- a/src/collection/boxed.rs +++ b/src/collection/boxed.rs @@ -207,7 +207,7 @@ impl<L> BoxedLockCollection<L> { pub fn into_child(mut self) -> L { unsafe { // safety: this collection will never be used again - std::ptr::drop_in_place(&mut self.locks); + std::ptr::drop_in_place(&raw mut self.locks); // safety: this was allocated using a box, and is now unique let boxed: Box<UnsafeCell<L>> = Box::from_raw(self.child.cast_mut()); // to prevent a double free @@ -911,7 +911,7 @@ mod tests { let mutexes = [Mutex::new(0), Mutex::new(1)]; let collection = BoxedLockCollection::new_ref(&mutexes); - assert!(std::ptr::addr_eq(&mutexes, collection.as_ref())) + assert!(std::ptr::addr_eq(&raw const mutexes, collection.as_ref())) } #[test] @@ -919,6 +919,6 @@ mod tests { let mutexes = [Mutex::new(0), Mutex::new(1)]; let collection = BoxedLockCollection::new_ref(&mutexes); - assert!(std::ptr::addr_eq(&mutexes, *collection.child())) + assert!(std::ptr::addr_eq(&raw const mutexes, *collection.child())) } } |
