diff --git a/iroh-net/src/netcheck/reportgen.rs b/iroh-net/src/netcheck/reportgen.rs index a8b8b74de4..2085610bde 100644 --- a/iroh-net/src/netcheck/reportgen.rs +++ b/iroh-net/src/netcheck/reportgen.rs @@ -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")), @@ -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")), diff --git a/iroh-net/src/relay/http/client.rs b/iroh-net/src/relay/http/client.rs index e88f61c6f4..ce5660c426 100644 --- a/iroh-net/src/relay/http/client.rs +++ b/iroh-net/src/relay/http/client.rs @@ -873,7 +873,6 @@ async fn resolve_host( } } addrs - .into_iter() .next() .ok_or_else(|| ClientError::Dns(None)) }