mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-23 14:51:34 +00:00
*: Fix newly raised clippy warnings (#3106)
Fixed minor issues raised by clippy to improve correctness and readablitity.
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user