chore: Implement latest clippy warnings (#3220)

As I do frequently, I corrected for the latest clippy warnings. This will make sure the CI won't complain in the future. We could automate this btw and maybe run the nightly version of clippy.
This commit is contained in:
Hannes
2022-12-14 16:45:04 +01:00
committed by GitHub
parent be3ec6c62b
commit d79c93abdb
72 changed files with 244 additions and 307 deletions

View File

@ -38,12 +38,12 @@ fn main() -> Result<(), Box<dyn Error>> {
env_logger::init();
let opt = Opt::parse();
println!("opt: {:?}", opt);
println!("opt: {opt:?}");
// Create a static known PeerId based on given secret
let local_key: identity::Keypair = generate_ed25519(opt.secret_key_seed);
let local_peer_id = PeerId::from(local_key.public());
println!("Local peer id: {:?}", local_peer_id);
println!("Local peer id: {local_peer_id:?}");
let tcp_transport = tcp::async_io::Transport::default();
@ -80,10 +80,10 @@ fn main() -> Result<(), Box<dyn Error>> {
loop {
match swarm.next().await.expect("Infinite Stream.") {
SwarmEvent::Behaviour(Event::Relay(event)) => {
println!("{:?}", event)
println!("{event:?}")
}
SwarmEvent::NewListenAddr { address, .. } => {
println!("Listening on {:?}", address);
println!("Listening on {address:?}");
}
_ => {}
}