cargo clippy
This commit is contained in:
parent
aa5327d603
commit
7183b5e6ce
@ -51,8 +51,8 @@ pub fn parse_ip(ip: &str) -> Option<IpAddr> {
|
|||||||
|
|
||||||
if let IpAddr::V6(ipv6) = &mut ip {
|
if let IpAddr::V6(ipv6) = &mut ip {
|
||||||
let mut octets = ipv6.octets();
|
let mut octets = ipv6.octets();
|
||||||
for i in 8..16 {
|
for o in octets.iter_mut().skip(8) {
|
||||||
octets[i] = 0;
|
*o = 0;
|
||||||
}
|
}
|
||||||
ip = IpAddr::V6(Ipv6Addr::from(octets));
|
ip = IpAddr::V6(Ipv6Addr::from(octets));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user