about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2014-02-09 00:17:37 -0800
committerBrian Anderson <banderson@mozilla.com>2014-02-09 00:17:41 -0800
commit073b655187916e9155d285efc496cfd89104796c (patch)
tree72ab55665fbbf93ec91a4869e7952deb256817eb /src/libstd/io
parentc7710cdf4563533b211a16cb02a9b4cb70ed3ca9 (diff)
downloadrust-073b655187916e9155d285efc496cfd89104796c.tar.gz
rust-073b655187916e9155d285efc496cfd89104796c.zip
std: Move byteswap functions to mem
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/extensions.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/io/extensions.rs b/src/libstd/io/extensions.rs
index 49d51cbb26f..240f4c65501 100644
--- a/src/libstd/io/extensions.rs
+++ b/src/libstd/io/extensions.rs
@@ -51,7 +51,7 @@ impl<'r, R: Reader> Iterator<u8> for Bytes<'r, R> {
 }
 
 pub fn u64_to_le_bytes<T>(n: u64, size: uint, f: |v: &[u8]| -> T) -> T {
-    use unstable::intrinsics::{to_le16, to_le32, to_le64};
+    use mem::{to_le16, to_le32, to_le64};
     use cast::transmute;
 
     // LLVM fails to properly optimize this when using shifts instead of the to_le* intrinsics
@@ -77,7 +77,7 @@ pub fn u64_to_le_bytes<T>(n: u64, size: uint, f: |v: &[u8]| -> T) -> T {
 }
 
 pub fn u64_to_be_bytes<T>(n: u64, size: uint, f: |v: &[u8]| -> T) -> T {
-    use unstable::intrinsics::{to_be16, to_be32, to_be64};
+    use mem::{to_be16, to_be32, to_be64};
     use cast::transmute;
 
     // LLVM fails to properly optimize this when using shifts instead of the to_be* intrinsics
@@ -105,7 +105,7 @@ pub fn u64_from_be_bytes(data: &[u8],
                          size: uint)
                       -> u64 {
     use ptr::{copy_nonoverlapping_memory, offset, mut_offset};
-    use unstable::intrinsics::from_be64;
+    use mem::from_be64;
     use vec::MutableVector;
 
     assert!(size <= 8u);