We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a23ef61 + e86ecdf commit c10fe04Copy full SHA for c10fe04
library/core/src/lazy.rs
@@ -102,8 +102,7 @@ impl<T> OnceCell<T> {
102
/// Returns `None` if the cell is empty.
103
#[unstable(feature = "once_cell", issue = "74465")]
104
pub fn get_mut(&mut self) -> Option<&mut T> {
105
- // SAFETY: Safe because we have unique access
106
- unsafe { &mut *self.inner.get() }.as_mut()
+ self.inner.get_mut().as_mut()
107
}
108
109
/// Sets the contents of the cell to `value`.
0 commit comments