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:
parent
94a055c729
commit
dbeea147ad
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ impl<T> Unsafe<T> {
|
|||
|
||||
/// Gets a mutable pointer to the wrapped value
|
||||
#[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
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue