rust 1.72 lints (#4659)

This commit is contained in:
realbigsean
2023-08-24 14:33:24 -04:00
committed by GitHub
parent fa6003bb5c
commit 14924dbc95
8 changed files with 19 additions and 19 deletions

View File

@@ -647,7 +647,7 @@ impl<TSpec: EthSpec> Discovery<TSpec> {
if subnet_queries.len() == MAX_SUBNETS_IN_QUERY || self.queued_queries.is_empty() {
// This query is for searching for peers of a particular subnet
// Drain subnet_queries so we can re-use it as we continue to process the queue
let grouped_queries: Vec<SubnetQuery> = subnet_queries.drain(..).collect();
let grouped_queries: Vec<SubnetQuery> = std::mem::take(&mut subnet_queries);
self.start_subnet_query(grouped_queries);
processed = true;
}

View File

@@ -969,6 +969,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
macro_rules! prune_peers {
($filter: expr) => {
let filter = $filter;
for (peer_id, info) in self
.network_globals
.peers
@@ -976,7 +977,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
.worst_connected_peers()
.iter()
.filter(|(_, info)| {
!info.has_future_duty() && !info.is_trusted() && $filter(*info)
!info.has_future_duty() && !info.is_trusted() && filter(*info)
})
{
if peers_to_prune.len()