Skip to content

Commit 9d2eb00

Browse files
authored
chore: Address latest clippy lints
Pull-Request: #6171.
1 parent e1929e0 commit 9d2eb00

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

protocols/gossipsub/src/behaviour/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4248,7 +4248,7 @@ fn test_scoring_p6() {
42484248

42494249
// create 5 peers with the same ip
42504250
let addr = Multiaddr::from(Ipv4Addr::new(10, 1, 2, 3));
4251-
let peers = vec![
4251+
let peers = [
42524252
add_peer_with_addr(&mut gs, &[], false, false, addr.clone()).0,
42534253
add_peer_with_addr(&mut gs, &[], false, false, addr.clone()).0,
42544254
add_peer_with_addr(&mut gs, &[], true, false, addr.clone()).0,
@@ -4258,7 +4258,7 @@ fn test_scoring_p6() {
42584258

42594259
// create 4 other peers with other ip
42604260
let addr2 = Multiaddr::from(Ipv4Addr::new(10, 1, 2, 4));
4261-
let others = vec![
4261+
let others = [
42624262
add_peer_with_addr(&mut gs, &[], false, false, addr2.clone()).0,
42634263
add_peer_with_addr(&mut gs, &[], false, false, addr2.clone()).0,
42644264
add_peer_with_addr(&mut gs, &[], true, false, addr2.clone()).0,

protocols/kad/src/behaviour.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ where
12301230
let addrs = peer.multiaddrs.iter().cloned().collect();
12311231
query.peers.addresses.insert(peer.node_id, addrs);
12321232
}
1233-
query.on_success(source, others_iter.cloned().map(|kp| kp.node_id))
1233+
query.on_success(source, others_iter.map(|kp| kp.node_id))
12341234
}
12351235
}
12361236

0 commit comments

Comments
 (0)