about summary refs log tree commit diff
path: root/src/libnative
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-06-17 15:47:31 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-18 17:01:34 -0700
commitcb8ca2dafdbcdedcaeb2573dccd3b3e4a26cae44 (patch)
tree09546de154e03eb8ea3a47865128700ef130c3e0 /src/libnative
parent779ca97525176bc1d764f1b88906363290fcf851 (diff)
downloadrust-cb8ca2dafdbcdedcaeb2573dccd3b3e4a26cae44.tar.gz
rust-cb8ca2dafdbcdedcaeb2573dccd3b3e4a26cae44.zip
Shorten endian conversion method names
The consensus on #14917 was that the proposed names were too long.
Diffstat (limited to 'src/libnative')
-rw-r--r--src/libnative/io/net.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs
index 23fd607aafe..5dfae8d9efe 100644
--- a/src/libnative/io/net.rs
+++ b/src/libnative/io/net.rs
@@ -27,10 +27,10 @@ use super::util;
 #[cfg(unix)]    pub type sock_t = super::file::fd_t;
 
 pub fn htons(u: u16) -> u16 {
-    u.to_big_endian()
+    u.to_be()
 }
 pub fn ntohs(u: u16) -> u16 {
-    Int::from_big_endian(u)
+    Int::from_be(u)
 }
 
 enum InAddr {
@@ -46,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: Int::from_big_endian(ip)
+                s_addr: Int::from_be(ip)
             })
         }
         rtio::Ipv6Addr(a, b, c, d, e, f, g, h) => {
@@ -180,7 +180,7 @@ pub fn sockaddr_to_addr(storage: &libc::sockaddr_storage,
             let storage: &libc::sockaddr_in = unsafe {
                 mem::transmute(storage)
             };
-            let ip = (storage.sin_addr.s_addr as u32).to_big_endian();
+            let ip = (storage.sin_addr.s_addr as u32).to_be();
             let a = (ip >> 24) as u8;
             let b = (ip >> 16) as u8;
             let c = (ip >>  8) as u8;