windows cleanup

This commit is contained in:
John Smith
2023-10-07 23:00:28 -04:00
parent dca7f66c6f
commit 1fec1a5008
5 changed files with 79 additions and 48 deletions

View File

@@ -69,7 +69,7 @@ impl SockAddr {
return None;
}
Some(IpAddr::V4(Ipv4Addr::new(
((s_addr >> 0) & 255u32) as u8,
(s_addr & 255u32) as u8,
((s_addr >> 8) & 255u32) as u8,
((s_addr >> 16) & 255u32) as u8,
((s_addr >> 24) & 255u32) as u8,
@@ -81,7 +81,7 @@ impl SockAddr {
if s6_addr[0] == 0xfe && s6_addr[1] == 0x80 {
return None;
}
Some(IpAddr::V6(Ipv6Addr::from(s6_addr.clone())))
Some(IpAddr::V6(Ipv6Addr::from(*s6_addr)))
}
None => None,
}