auto merge of #13343 : tbu-/rust/pr_smallfix, r=pcwalton
Fix an unnecessary use of `cast::transmute` Wherever possible, more specialized variants of said functions should be used, such as in this case `cast::transmute_mmut_unsafe`.
This commit is contained in:
commit
9539be6d74
@ -63,7 +63,7 @@ impl<T> Unsafe<T> {
|
|||||||
|
|
||||||
/// Gets a mutable pointer to the wrapped value
|
/// Gets a mutable pointer to the wrapped value
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn get(&self) -> *mut T { cast::transmute(&self.value) }
|
pub unsafe fn get(&self) -> *mut T { cast::transmute_mut_unsafe(&self.value) }
|
||||||
|
|
||||||
/// Unwraps the value
|
/// Unwraps the value
|
||||||
#[inline]
|
#[inline]
|
||||||
|
Loading…
Reference in New Issue
Block a user