about summary refs log tree commit diff
path: root/src/libnative
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-06-16 11:25:47 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-18 17:01:34 -0700
commitff9f92ce5224f5e27b8dc39ffc02eb9481f7cff1 (patch)
treef56ac5a3288101c49c4cc5c2e85b18dd4c2c6ff7 /src/libnative
parent4c0f8f49f6fe860efa268efa2f4fa0b5f00a4b07 (diff)
downloadrust-ff9f92ce5224f5e27b8dc39ffc02eb9481f7cff1.tar.gz
rust-ff9f92ce5224f5e27b8dc39ffc02eb9481f7cff1.zip
Merge the Bitwise and ByteOrder traits into the Int trait
This reduces the complexity of the trait hierarchy.
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 f0cd2d966cb..23fd607aafe 100644
--- a/src/libnative/io/net.rs
+++ b/src/libnative/io/net.rs
@@ -11,7 +11,6 @@
 use alloc::arc::Arc;
 use libc;
 use std::mem;
-use std::mem::ByteOrder;
 use std::rt::mutex;
 use std::rt::rtio;
 use std::rt::rtio::{IoResult, IoError};
@@ -31,7 +30,7 @@ pub fn htons(u: u16) -> u16 {
     u.to_big_endian()
 }
 pub fn ntohs(u: u16) -> u16 {
-    ByteOrder::from_big_endian(u)
+    Int::from_big_endian(u)
 }
 
 enum InAddr {
@@ -47,7 +46,7 @@ fn ip_to_inaddr(ip: rtio::IpAddr) -> InAddr {
                      (c as u32 <<  8) |
                      (d as u32 <<  0);
             InAddr(libc::in_addr {
-                s_addr: ByteOrder::from_big_endian(ip)
+                s_addr: Int::from_big_endian(ip)
             })
         }
         rtio::Ipv6Addr(a, b, c, d, e, f, g, h) => {