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:
Tobias Bucher
2014-04-05 20:38:35 +02:00
parent 94a055c729
commit dbeea147ad
+1 -1
View File
@@ -63,7 +63,7 @@ pub fn new(value: 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]