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 20, 2024
1 parent a315e2b commit 2455646
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions iroh-net/src/dns.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! This module exports a DNS resolver, which is also the default resolver used in the
//! [`crate::Endpoint`] if no custom resolver is configured.
use std::fmt::Write;
use std::net::{IpAddr, Ipv6Addr};
use std::time::Duration;

Expand Down Expand Up @@ -337,10 +338,10 @@ async fn stagger_call<T, F: Fn() -> Fut, Fut: Future<Output = Result<T>>>(

anyhow::bail!(
"no calls succeed: [ {}]",
errors
.into_iter()
.map(|e| format!("{e} "))
.collect::<String>()
errors.into_iter().fold(String::new(), |mut summary, e| {
write!(summary, "{e} ").expect("infallible");
summary
})
)
}

Expand Down

0 comments on commit 2455646

Please sign in to comment.