Fix Rust beta compiler warnings (rustc 1.75.0-beta.1 (782883f60 2023-11-12)) (#4932)

This commit is contained in:
Jimmy Chen
2023-11-18 03:55:11 +11:00
committed by GitHub
parent 68e076d60a
commit 6b63d18420
20 changed files with 45 additions and 51 deletions

View File

@@ -885,7 +885,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
.collect::<Vec<_>>();
// Sort peers prioritizing unrelated peers with less active requests.
priorized_peers.sort_unstable();
priorized_peers.get(0).map(|&(_, _, peer)| peer)
priorized_peers.first().map(|&(_, _, peer)| peer)
};
if let Some(peer) = new_peer {