Skip to content

Commit

Permalink
fix: clippy fmt error
Browse files Browse the repository at this point in the history
  • Loading branch information
dirvine committed Nov 22, 2024
1 parent dc51eb5 commit b8dce02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sn_networking/src/network_discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ fn peer_id_from_multiaddr(addr: &Multiaddr) -> Result<PeerId, Box<dyn std::error
let components: Vec<_> = addr.iter().collect();
for component in components.iter().rev() {
if let libp2p::multiaddr::Protocol::P2p(hash) = component {
let err_conv = |e| Box::new(std::io::Error::new(std::io::ErrorKind::Other, format!("{:?}", e)));
let err_conv = |e| Box::new(std::io::Error::new(std::io::ErrorKind::Other, format!("{e:?}")));
return Ok(PeerId::from_bytes(hash.to_bytes().as_slice()).map_err(err_conv)?);
}
}
Expand Down

0 comments on commit b8dce02

Please sign in to comment.