Rust 1.92 lints (#8567)

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
Eitan Seri-Levi
2025-12-12 05:45:38 -03:00
committed by GitHub
parent 5abbdb660a
commit 556e917092
5 changed files with 2 additions and 7 deletions

View File

@@ -2923,7 +2923,6 @@ where
let chain_dump = self.chain.chain_dump().unwrap(); let chain_dump = self.chain.chain_dump().unwrap();
chain_dump chain_dump
.iter() .iter()
.cloned()
.map(|checkpoint| checkpoint.beacon_state.finalized_checkpoint().root) .map(|checkpoint| checkpoint.beacon_state.finalized_checkpoint().root)
.filter(|block_hash| *block_hash != Hash256::zero()) .filter(|block_hash| *block_hash != Hash256::zero())
.map(|hash| hash.into()) .map(|hash| hash.into())

View File

@@ -5528,7 +5528,6 @@ fn get_finalized_epoch_boundary_blocks(
dump: &[BeaconSnapshot<MinimalEthSpec, BlindedPayload<MinimalEthSpec>>], dump: &[BeaconSnapshot<MinimalEthSpec, BlindedPayload<MinimalEthSpec>>],
) -> HashSet<SignedBeaconBlockHash> { ) -> HashSet<SignedBeaconBlockHash> {
dump.iter() dump.iter()
.cloned()
.map(|checkpoint| checkpoint.beacon_state.finalized_checkpoint().root.into()) .map(|checkpoint| checkpoint.beacon_state.finalized_checkpoint().root.into())
.collect() .collect()
} }
@@ -5537,7 +5536,6 @@ fn get_blocks(
dump: &[BeaconSnapshot<MinimalEthSpec, BlindedPayload<MinimalEthSpec>>], dump: &[BeaconSnapshot<MinimalEthSpec, BlindedPayload<MinimalEthSpec>>],
) -> HashSet<SignedBeaconBlockHash> { ) -> HashSet<SignedBeaconBlockHash> {
dump.iter() dump.iter()
.cloned()
.map(|checkpoint| checkpoint.beacon_block_root.into()) .map(|checkpoint| checkpoint.beacon_block_root.into())
.collect() .collect()
} }

View File

@@ -770,7 +770,7 @@ impl ClientVersionV1 {
self.commit self.commit
.0 .0
.get(..4) .get(..4)
.map_or_else(|| self.commit.0.as_str(), |s| s) .unwrap_or(self.commit.0.as_str())
.to_lowercase(), .to_lowercase(),
lighthouse_commit_prefix lighthouse_commit_prefix
.0 .0

View File

@@ -63,8 +63,7 @@ impl ForkContext {
let current_epoch = current_slot.epoch(E::slots_per_epoch()); let current_epoch = current_slot.epoch(E::slots_per_epoch());
let current_fork = epoch_to_forks let current_fork = epoch_to_forks
.values() .values()
.filter(|&fork| fork.fork_epoch <= current_epoch) .rfind(|&fork| fork.fork_epoch <= current_epoch)
.next_back()
.cloned() .cloned()
.expect("should match at least genesis epoch"); .expect("should match at least genesis epoch");

View File

@@ -132,7 +132,6 @@ async fn get_block_from_source<T: EthSpec>(
let (kzg_proofs, blobs): (Vec<_>, Vec<_>) = blobs_from_source let (kzg_proofs, blobs): (Vec<_>, Vec<_>) = blobs_from_source
.iter() .iter()
.cloned()
.map(|sidecar| (sidecar.kzg_proof, sidecar.blob.clone())) .map(|sidecar| (sidecar.kzg_proof, sidecar.blob.clone()))
.unzip(); .unzip();