Simplify network* functions

This commit is contained in:
Abhishek Chanda
2015-05-22 12:58:40 +05:30
parent d3a4bf5b77
commit b7f691533a

View File

@ -46,11 +46,11 @@ impl Ipv4Network {
}
pub fn network_int(&self) -> u32 {
u32::from(*(self.ip())) & self.mask_int()
u32::from(self.addr)
}
pub fn network(&self) -> Ipv4Addr {
Ipv4Addr::from(self.network_int())
self.addr
}
}