*: 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

@ -149,7 +149,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
// Locate all nodes providing the file.
let providers = network_client.get_providers(name.clone()).await;
if providers.is_empty() {
return Err(format!("Could not find provider for file {}.", name).into());
return Err(format!("Could not find provider for file {name}.").into());
}
// Request the content of the file from each node.
@ -506,8 +506,8 @@ mod network {
}
}
SwarmEvent::IncomingConnectionError { .. } => {}
SwarmEvent::Dialing(peer_id) => eprintln!("Dialing {}", peer_id),
e => panic!("{:?}", e),
SwarmEvent::Dialing(peer_id) => eprintln!("Dialing {peer_id}"),
e => panic!("{e:?}"),
}
}