about summary refs log tree commit diff
path: root/src/libcore/ptr.rs
diff options
context:
space:
mode:
authorAdolfo OchagavĂ­a <aochagavia92@gmail.com>2014-05-18 11:21:47 -0700
committerAdolfo OchagavĂ­a <aochagavia92@gmail.com>2014-05-18 11:48:46 -0700
commit9a8ef9197bc5d44e783965052da33e36a88527bb (patch)
tree81d4f35fb10e12b6f7f2358f0bf7ea313fefe556 /src/libcore/ptr.rs
parenta62395f01ca4f2db1b9004aa4f54422956950304 (diff)
downloadrust-9a8ef9197bc5d44e783965052da33e36a88527bb.tar.gz
rust-9a8ef9197bc5d44e783965052da33e36a88527bb.zip
Removed unnecessary transmute
Diffstat (limited to 'src/libcore/ptr.rs')
-rw-r--r--src/libcore/ptr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index acdf0bf0658..870fa0ec53f 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -359,7 +359,7 @@ impl<T> RawPtr<T> for *T {
         if self.is_null() {
             None
         } else {
-            Some(mem::transmute(*self))
+            Some(&**self)
         }
     }
 }
@@ -384,7 +384,7 @@ impl<T> RawPtr<T> for *mut T {
         if self.is_null() {
             None
         } else {
-            Some(mem::transmute(*self))
+            Some(&**self)
         }
     }
 }