Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
divagant-martian committed May 16, 2024
1 parent a98398f commit 7a6db28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions iroh-net/src/netcheck/reportgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ async fn get_relay_addr(
match dns_resolver.lookup_ipv4(hostname, DNS_TIMEOUT).await {
Ok(mut addrs) => addrs
.next()
.map(|addr| ip::to_canonical(addr))
.map(ip::to_canonical)
.map(|addr| SocketAddr::new(addr, port))
.ok_or(anyhow!("No suitable relay addr found")),
Err(err) => Err(err.context("No suitable relay addr found")),
Expand All @@ -965,7 +965,7 @@ async fn get_relay_addr(
match dns_resolver.lookup_ipv6(hostname, DNS_TIMEOUT).await {
Ok(mut addrs) => addrs
.next()
.map(|addr| ip::to_canonical(addr))
.map(ip::to_canonical)
.map(|addr| SocketAddr::new(addr, port))
.ok_or(anyhow!("No suitable relay addr found")),
Err(err) => Err(err.context("No suitable relay addr found")),
Expand Down
1 change: 0 additions & 1 deletion iroh-net/src/relay/http/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,6 @@ async fn resolve_host(
}
}
addrs
.into_iter()
.next()
.ok_or_else(|| ClientError::Dns(None))
}
Expand Down

0 comments on commit 7a6db28

Please sign in to comment.