chore: replace old get-if-addrs with new if-addrs (#78)

This commit is contained in:
sigoden
2022-06-29 10:01:01 +08:00
committed by GitHub
parent 6554c1c308
commit fd02a53823
3 changed files with 28 additions and 58 deletions

View File

@@ -136,7 +136,7 @@ fn print_listening(args: Arc<Args>) -> BoxResult<()> {
}
}
if ipv4 || ipv6 {
let ifaces = get_if_addrs::get_if_addrs()
let ifaces = if_addrs::get_if_addrs()
.map_err(|e| format!("Failed to get local interface addresses: {}", e))?;
for iface in ifaces.into_iter() {
let local_ip = iface.ip();