From a0f93ae1c63f69569dc886fe5387443cb792536a Mon Sep 17 00:00:00 2001 From: Niklas Date: Mon, 5 Jul 2021 14:24:25 +0200 Subject: [PATCH] clippy: fix needless borrows --- network/src/peers/peers.rs | 2 +- network/src/topology.rs | 2 +- storage/src/validator.rs | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/network/src/peers/peers.rs b/network/src/peers/peers.rs index a73e49d417..0e136475e2 100644 --- a/network/src/peers/peers.rs +++ b/network/src/peers/peers.rs @@ -311,7 +311,7 @@ impl Node { // The peer book will determine if we have seen the peer before, // and include the peer if it is new. self.peer_book - .add_peer(*peer_address, self.config.bootnodes().contains(&peer_address)) + .add_peer(*peer_address, self.config.bootnodes().contains(peer_address)) .await; } diff --git a/network/src/topology.rs b/network/src/topology.rs index 078765bfe8..a6d1d97ffc 100644 --- a/network/src/topology.rs +++ b/network/src/topology.rs @@ -154,7 +154,7 @@ impl KnownNetwork { // Only retain connections that aren't removed. self.connections .write() - .retain(|connection| !connections_to_remove.contains(&connection)); + .retain(|connection| !connections_to_remove.contains(connection)); // Scope the write lock. { diff --git a/storage/src/validator.rs b/storage/src/validator.rs index 9343558be5..2a49a6b367 100644 --- a/storage/src/validator.rs +++ b/storage/src/validator.rs @@ -283,13 +283,13 @@ impl