summaryrefslogtreecommitdiff
path: root/src/collection/boxed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/collection/boxed.rs')
-rwxr-xr-xsrc/collection/boxed.rs6
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()))
}
}