mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-18 04:21:22 +00:00
*: Fix newly raised clippy warnings (#3106)
Fixed minor issues raised by clippy to improve correctness and readablitity.
This commit is contained in:
@ -114,7 +114,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
line = stdin.select_next_some() => handle_input_line(&mut swarm.behaviour_mut().kademlia, line.expect("Stdin not to close")),
|
||||
event = swarm.select_next_some() => match event {
|
||||
SwarmEvent::NewListenAddr { address, .. } => {
|
||||
println!("Listening in {:?}", address);
|
||||
println!("Listening in {address:?}");
|
||||
},
|
||||
SwarmEvent::Behaviour(MyBehaviourEvent::Mdns(MdnsEvent::Discovered(list))) => {
|
||||
for (peer_id, multiaddr) in list {
|
||||
@ -133,7 +133,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
}
|
||||
}
|
||||
QueryResult::GetProviders(Err(err)) => {
|
||||
eprintln!("Failed to get providers: {:?}", err);
|
||||
eprintln!("Failed to get providers: {err:?}");
|
||||
}
|
||||
QueryResult::GetRecord(Ok(ok)) => {
|
||||
for PeerRecord {
|
||||
@ -149,7 +149,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
}
|
||||
}
|
||||
QueryResult::GetRecord(Err(err)) => {
|
||||
eprintln!("Failed to get record: {:?}", err);
|
||||
eprintln!("Failed to get record: {err:?}");
|
||||
}
|
||||
QueryResult::PutRecord(Ok(PutRecordOk { key })) => {
|
||||
println!(
|
||||
@ -158,7 +158,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
);
|
||||
}
|
||||
QueryResult::PutRecord(Err(err)) => {
|
||||
eprintln!("Failed to put record: {:?}", err);
|
||||
eprintln!("Failed to put record: {err:?}");
|
||||
}
|
||||
QueryResult::StartProviding(Ok(AddProviderOk { key })) => {
|
||||
println!(
|
||||
@ -167,7 +167,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
);
|
||||
}
|
||||
QueryResult::StartProviding(Err(err)) => {
|
||||
eprintln!("Failed to put provider record: {:?}", err);
|
||||
eprintln!("Failed to put provider record: {err:?}");
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user