From eed25247b56b94e8536b4156dd11d6d456dd6c73 Mon Sep 17 00:00:00 2001 From: Abhishek Chanda Date: Fri, 24 Apr 2015 00:10:08 -0700 Subject: [PATCH] Make ip_to_int a static method --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index bbe7b33..65a0705 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,7 +43,7 @@ impl Ipv4Network { Ipv4Network::int_to_ip(mask).to_string() } - fn ip_to_int(&self, addr: Ipv4Addr) -> u32 { + fn ip_to_int(addr: Ipv4Addr) -> u32 { let ip = addr.octets(); (ip[0] as u32) << 24 + (ip[1] as u32) << 16 + (ip[2] as u32) << 8 + (ip[3] as u32) }