Address Clippy 1.73 lints on Deneb branch (#4810)

* Address Clippy 1.73 lints (#4809)

## Proposed Changes

Fix Clippy lints enabled by default in Rust 1.73.0, released today.

* Address Clippy 1.73 lints.

---------

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
Jimmy Chen
2023-10-06 17:53:57 +11:00
committed by GitHub
parent 203ac65041
commit 4ad7e15732
12 changed files with 28 additions and 35 deletions

View File

@@ -1055,7 +1055,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
Subnet::Attestation(_) => {
subnet_to_peer
.entry(subnet)
.or_insert_with(Vec::new)
.or_default()
.push((*peer_id, info.clone()));
}
Subnet::SyncCommittee(id) => {

View File

@@ -330,13 +330,15 @@ impl Eq for Score {}
impl PartialOrd for Score {
fn partial_cmp(&self, other: &Score) -> Option<std::cmp::Ordering> {
self.score().partial_cmp(&other.score())
Some(self.cmp(other))
}
}
impl Ord for Score {
fn cmp(&self, other: &Score) -> std::cmp::Ordering {
self.partial_cmp(other).unwrap_or(std::cmp::Ordering::Equal)
self.score()
.partial_cmp(&other.score())
.unwrap_or(std::cmp::Ordering::Equal)
}
}