refactor: remove useless `unsafe` in `get_mut`
This commit is contained in:
parent
bb1cc93797
commit
1fd4090bd4
|
@ -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