summaryrefslogtreecommitdiff
path: root/test/sys/test_socket.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2015-04-01 20:35:24 -0700
committerCarl Lerche <me@carllerche.com>2015-04-01 20:35:24 -0700
commitffc8826dfe446b20a4c435e143cddf4b7ca34bad (patch)
tree2986506b9fa5d91334b97d3f5e06282e18b926dc /test/sys/test_socket.rs
parent30ea974431848851e3ed7d4c7adfd42930d78eda (diff)
downloadnix-ffc8826dfe446b20a4c435e143cddf4b7ca34bad.zip
Remove usage of std::num::Int
Diffstat (limited to 'test/sys/test_socket.rs')
-rw-r--r--test/sys/test_socket.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/sys/test_socket.rs b/test/sys/test_socket.rs
index f2ebfe69..1983e7b5 100644
--- a/test/sys/test_socket.rs
+++ b/test/sys/test_socket.rs
@@ -1,6 +1,5 @@
use nix::sys::socket::{InetAddr, UnixAddr, getsockname};
use std::{mem, net};
-use std::num::Int;
use std::path::Path;
use std::str::FromStr;
use std::os::unix::io::AsRawFd;
@@ -13,8 +12,11 @@ pub fn test_inetv4_addr_to_sock_addr() {
match addr {
InetAddr::V4(addr) => {
- assert_eq!(addr.sin_addr.s_addr, 0x7f000001.to_be());
- assert_eq!(addr.sin_port, 3000.to_be());
+ let ip: u32 = 0x7f000001;
+ let port: u16 = 3000;
+
+ assert_eq!(addr.sin_addr.s_addr, ip.to_be());
+ assert_eq!(addr.sin_port, port.to_be());
}
_ => panic!("nope"),
}