mark Mut::set as unsafe

This commit is contained in:
Intege-rs
2024-11-16 22:37:51 -05:00
parent e20c5e251e
commit 131dbcca12

View File

@@ -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>> {