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();
chain_dump
.iter()
.cloned()
.map(|checkpoint| checkpoint.beacon_state.finalized_checkpoint().root)
.filter(|block_hash| *block_hash != Hash256::zero())
.map(|hash| hash.into())

View File

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

View File

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

View File

@@ -63,8 +63,7 @@ impl ForkContext {
let current_epoch = current_slot.epoch(E::slots_per_epoch());
let current_fork = epoch_to_forks
.values()
.filter(|&fork| fork.fork_epoch <= current_epoch)
.next_back()
.rfind(|&fork| fork.fork_epoch <= current_epoch)
.cloned()
.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
.iter()
.cloned()
.map(|sidecar| (sidecar.kzg_proof, sidecar.blob.clone()))
.unzip();