Issue #13933: Remove transmute_mut from Arc

directly use the internal pointer instead.
This commit is contained in:
Ariel Ben-Yehuda 2014-05-28 14:09:50 +03:00
parent def2232595
commit 2e8bc9924c

View File

@ -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
}
}