diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/rt/io/net/ip.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/rt/io/net/ip.rs b/src/libstd/rt/io/net/ip.rs index f885c7f2788..84abc058c33 100644 --- a/src/libstd/rt/io/net/ip.rs +++ b/src/libstd/rt/io/net/ip.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::cmp::{Eq, TotalEq, eq}; +use std::cmp::{Eq, TotalEq}; pub enum IpAddr { Ipv4(u8, u8, u8, u8, u16), @@ -18,13 +18,13 @@ pub enum IpAddr { impl Eq for IpAddr { fn eq(&self, other: &IpAddr) -> bool { match (*self, *other) { - (Ipv4(a,b,c,d,e), Ipv4(f,g,h,i,j)) => a == f && b == g && c == h && d == i && e == j, + (Ipv4(a,b,c,d,e), Ipv4(f,g,h,i,j)) => (a,b,c,d,e) == (f,g,h,i,j), (Ipv6, Ipv6) => fail!(), _ => false } } fn ne(&self, other: &IpAddr) -> bool { - !eq(self, other) + !(self == other) } } |
