mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
*: Fix newly raised clippy warnings (#3106)
Fixed minor issues raised by clippy to improve correctness and readablitity.
This commit is contained in:
@ -53,7 +53,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
// Create a random PeerId
|
||||
let id_keys = identity::Keypair::generate_ed25519();
|
||||
let peer_id = PeerId::from(id_keys.public());
|
||||
println!("Local peer id: {:?}", peer_id);
|
||||
println!("Local peer id: {peer_id:?}");
|
||||
|
||||
// Create a tokio-based TCP transport use noise for authenticated
|
||||
// encryption and Mplex for multiplexing of substreams on a TCP stream.
|
||||
@ -119,7 +119,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
if let Some(to_dial) = std::env::args().nth(1) {
|
||||
let addr: Multiaddr = to_dial.parse()?;
|
||||
swarm.dial(addr)?;
|
||||
println!("Dialed {:?}", to_dial);
|
||||
println!("Dialed {to_dial:?}");
|
||||
}
|
||||
|
||||
// Read full lines from stdin
|
||||
@ -138,7 +138,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
event = swarm.select_next_some() => {
|
||||
match event {
|
||||
SwarmEvent::NewListenAddr { address, .. } => {
|
||||
println!("Listening on {:?}", address);
|
||||
println!("Listening on {address:?}");
|
||||
}
|
||||
SwarmEvent::Behaviour(MyBehaviourEvent::Floodsub(FloodsubEvent::Message(message))) => {
|
||||
println!(
|
||||
|
Reference in New Issue
Block a user