We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29f9a0b commit 6853503Copy full SHA for 6853503
src/windows/mod.rs
@@ -457,8 +457,10 @@ impl NetworkReadout for WindowsNetworkReadout {
457
match interface {
458
Some(it) => {
459
if let Ok(addresses) = local_ip_address::list_afinet_netifas() {
460
- if let Some((_, ip)) = local_ip_address::find_ifa(addresses, it) {
461
- return Ok(ip.to_string());
+ for (name, ip) in addresses.iter() {
+ if let Some(name) = interface {
462
+ return Ok(ip.to_string());
463
+ }
464
}
465
466
0 commit comments