*: Fix newly raised clippy warnings (#3106)

Fixed minor issues raised by clippy to improve correctness and readablitity.
This commit is contained in:
Hannes
2022-11-11 21:30:58 +01:00
committed by GitHub
parent 90df86d9e7
commit c32f03c317
20 changed files with 51 additions and 53 deletions

View File

@ -78,7 +78,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
identity::Keypair::generate_ed25519().public().into()
};
println!("Searching for the closest peers to {:?}", to_search);
println!("Searching for the closest peers to {to_search:?}");
swarm.behaviour_mut().get_closest_peers(to_search);
// Kick it off!
@ -102,7 +102,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
}
Err(GetClosestPeersError::Timeout { peers, .. }) => {
if !peers.is_empty() {
println!("Query timed out with closest peers: {:#?}", peers)
println!("Query timed out with closest peers: {peers:#?}")
} else {
// The example is considered failed as there
// should always be at least 1 reachable peer.