about summary refs log tree commit diff
path: root/src/libnative
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/libnative
parentc7710cdf4563533b211a16cb02a9b4cb70ed3ca9 (diff)
downloadrust-073b655187916e9155d285efc496cfd89104796c.tar.gz
rust-073b655187916e9155d285efc496cfd89104796c.zip
std: Move byteswap functions to mem
Diffstat (limited to 'src/libnative')
-rw-r--r--src/libnative/io/net.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs
index 9042353c50a..ec6a5c5cb9b 100644
--- a/src/libnative/io/net.rs
+++ b/src/libnative/io/net.rs
@@ -15,7 +15,6 @@ use std::libc;
 use std::mem;
 use std::rt::rtio;
 use std::sync::arc::UnsafeArc;
-use std::unstable::intrinsics;
 
 use super::{IoResult, retry};
 use super::file::keep_going;
@@ -28,10 +27,10 @@ use super::file::keep_going;
 #[cfg(unix)]    pub type sock_t = super::file::fd_t;
 
 pub fn htons(u: u16) -> u16 {
-    intrinsics::to_be16(u as i16) as u16
+    mem::to_be16(u as i16) as u16
 }
 pub fn ntohs(u: u16) -> u16 {
-    intrinsics::from_be16(u as i16) as u16
+    mem::from_be16(u as i16) as u16
 }
 
 enum InAddr {