mark Mut::set as unsafe
This commit is contained in:
@@ -42,7 +42,7 @@ impl<T: Sized> Mut<T> {
|
||||
}
|
||||
|
||||
impl<T: Pod> Mut<T> {
|
||||
#[inline(always)] pub fn set(&self, value: T) { unsafe { core::ptr::write(self.as_ptr(), value) } }
|
||||
#[inline(always)] pub unsafe fn set(&self, value: T) { unsafe { core::ptr::write(self.as_ptr(), value) } }
|
||||
#[inline(always)] pub fn get(&self) -> T { unsafe { core::ptr::read(self.as_ptr()) } }
|
||||
}
|
||||
impl<T> Mut<MaybeUninit<T>> {
|
||||
|
||||
Reference in New Issue
Block a user