diff --git a/src/lib.rs b/src/lib.rs index 0b23a36..e02ecb1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -464,7 +464,8 @@ pub mod unsync { /// /// let mut cell: OnceCell = OnceCell::new(); /// cell.set(92).unwrap(); - /// cell = OnceCell::new(); + /// *cell.get_mut().unwrap() = 93; + /// assert_eq!(cell.get(), Some(&93)); /// ``` pub fn get_mut(&mut self) -> Option<&mut T> { // Safe because we have unique access