mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-04 13:24:39 +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();
|
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())
|
||||||
|
|||||||
@@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user