]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/unstable/sync.rs
remove useless `transmute_immut` function
[rust.git] / src / libstd / unstable / sync.rs
index 02b35992f8c40cbeea89e68fbd35a68ec744f1fe..420c1d69d1c5dd3ff23367e27262f495cc5666d7 100644 (file)
@@ -420,7 +420,7 @@ pub unsafe fn with<U>(&self, f: |x: &mut T| -> U) -> U {
 
     #[inline]
     pub unsafe fn with_imm<U>(&self, f: |x: &T| -> U) -> U {
-        self.with(|x| f(cast::transmute_immut(x)))
+        self.with(|x| f(x))
     }
 
     #[inline]