cargo clippy

This commit is contained in:
Pierre HUBERT 2022-04-03 17:51:42 +02:00
parent aa5327d603
commit 7183b5e6ce

View File

@ -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));
} }