Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions library/core/src/lazy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ impl<T> OnceCell<T> {
/// Returns `None` if the cell is empty.
#[unstable(feature = "once_cell", issue = "74465")]
pub fn get_mut(&mut self) -> Option<&mut T> {
// SAFETY: Safe because we have unique access
unsafe { &mut *self.inner.get() }.as_mut()
self.inner.get_mut().as_mut()
}

/// Sets the contents of the cell to `value`.
Expand Down