diff --git a/sub/core/src/pod.rs b/sub/core/src/pod.rs index 9e3be71..991f4a7 100644 --- a/sub/core/src/pod.rs +++ b/sub/core/src/pod.rs @@ -43,6 +43,10 @@ impl Mut { pub fn set(&self, value: T) { unsafe { core::ptr::write(self.as_ptr(), value) } } pub fn get(&self) -> T { unsafe { core::ptr::read(self.as_ptr()) } } } +impl Mut> { + pub const fn zeroed() -> Self { Self(core::cell::UnsafeCell::new(MaybeUninit::zeroed())) } + pub const fn uninit() -> Self { Self(core::cell::UnsafeCell::new(MaybeUninit::uninit())) } +} impl Deref for Mut { type Target = core::cell::UnsafeCell;