Issue #13933: Remove transmute_mut from Arc
directly use the internal pointer instead.
This commit is contained in:
parent
def2232595
commit
2e8bc9924c
@ -160,7 +160,8 @@ pub fn make_unique<'a>(&'a mut self) -> &'a mut T {
|
||||
// reference count is guaranteed to be 1 at this point, and we required
|
||||
// the Arc itself to be `mut`, so we're returning the only possible
|
||||
// reference to the inner data.
|
||||
unsafe { mem::transmute::<&_, &mut _>(self.deref()) }
|
||||
let inner = unsafe { &mut *self._ptr };
|
||||
&mut inner.data
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user