Skip to content

Commit

Permalink
use custom fork of network-interface crate
Browse files Browse the repository at this point in the history
  • Loading branch information
ducaale committed Mar 3, 2023
1 parent 4e88520 commit edf6834
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ memchr = "2.4.1"
mime = "0.3.16"
mime2ext = "0.1.0"
mime_guess = "2.0"
network-interface = "0.1.6"
network-interface = { git = "https://github.com/ducaale/network-interface", branch = "msrv-1.54" }
once_cell = "1.8.0"
os_display = "0.1.3"
pem = "0.8.2"
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ fn run(args: Cli) -> Result<i32> {
let network_interfaces = NetworkInterface::show()?;
network_interfaces.iter().find_map(|interface| {
if &interface.name == name_or_ip {
if let Some(addr) = interface.addr {
if let Some(addr) = interface.addr.first() {
return Some(addr.ip());
}
}
Expand Down

0 comments on commit edf6834

Please sign in to comment.