mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Rust 1.92 lints (#8567)
Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user