Skip to content

Commit

Permalink
fix another clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
ducaale committed Oct 21, 2023
1 parent b083f8b commit cc53c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ pub fn interface_name_to_ip(name: &str) -> Result<Option<IpAddr>> {
// See https://github.com/seanmonstar/reqwest/issues/1336 and https://github.com/hyperium/hyper/pull/3076
let network_interfaces = NetworkInterface::show()?;
Ok(network_interfaces.iter().find_map(|interface| {
if &interface.name == name {
if interface.name == name {
if let Some(addr) = interface.addr.first() {
return Some(addr.ip());
}
Expand Down

0 comments on commit cc53c83

Please sign in to comment.