diff --git a/src/lib.rs b/src/lib.rs index 15df6da..149d0eb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -515,6 +515,7 @@ impl OnceCell { /// Takes the value out of this `OnceCell`, moving it back to an uninitialized state. pub fn take(&mut self) -> Option { + self.inner = Inner::new(); self.value.get_mut().take() }