aboutsummaryrefslogtreecommitdiff
path: root/src/ptr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ptr.rs')
-rw-r--r--src/ptr.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ptr.rs b/src/ptr.rs
index c7fe488..a1b7126 100644
--- a/src/ptr.rs
+++ b/src/ptr.rs
@@ -42,7 +42,7 @@ where
}
pub unsafe fn boxed(self) -> Box<T> {
- Box::from_raw(self.ptr.as_ptr())
+ unsafe { Box::from_raw(self.ptr.as_ptr()) }
}
pub fn by_ref(&self) -> Ref<T> {
@@ -120,7 +120,7 @@ where
}
pub unsafe fn deref(self) -> &'a T {
- &*self.ptr.as_ptr()
+ unsafe { &*self.ptr.as_ptr() }
}
}
@@ -179,13 +179,13 @@ where
}
pub unsafe fn deref_mut(self) -> &'a mut T {
- &mut *self.ptr.as_ptr()
+ unsafe { &mut *self.ptr.as_ptr() }
}
}
impl<'a, T> Mut<'a, T> {
pub unsafe fn read(self) -> T {
- self.ptr.as_ptr().read()
+ unsafe { self.ptr.as_ptr().read() }
}
}