refactor: remove useless `unsafe` in `get_mut`
This commit is contained in:
parent
04bb9f2110
commit
a4aba0a09a
|
@ -149,8 +149,7 @@ impl<T> GILOnceCell<T> {
|
||||||
/// Get the contents of the cell mutably. This is only possible if the reference to the cell is
|
/// Get the contents of the cell mutably. This is only possible if the reference to the cell is
|
||||||
/// unique.
|
/// unique.
|
||||||
pub fn get_mut(&mut self) -> Option<&mut T> {
|
pub fn get_mut(&mut self) -> Option<&mut T> {
|
||||||
// Safe because we have &mut self
|
self.0.get_mut().as_mut()
|
||||||
unsafe { &mut *self.0.get() }.as_mut()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the value in the cell.
|
/// Set the value in the cell.
|
||||||
|
|
Loading…
Reference in New Issue