add explicit_iter_loop clippy lint (#8570)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Thomas Coratger
2024-06-03 20:14:50 +02:00
committed by GitHub
parent 6e446084f0
commit 2b4fa96065
47 changed files with 79 additions and 78 deletions

View File

@ -658,20 +658,20 @@ mod tests {
let op_hardforks =
[Hardfork::Bedrock, Hardfork::Regolith, Hardfork::Canyon, Hardfork::Ecotone];
for hardfork in pow_hardforks.iter() {
for hardfork in &pow_hardforks {
assert_eq!(hardfork.consensus_type(), ConsensusType::ProofOfWork);
assert!(!hardfork.is_proof_of_stake());
assert!(hardfork.is_proof_of_work());
}
for hardfork in pos_hardforks.iter() {
for hardfork in &pos_hardforks {
assert_eq!(hardfork.consensus_type(), ConsensusType::ProofOfStake);
assert!(hardfork.is_proof_of_stake());
assert!(!hardfork.is_proof_of_work());
}
#[cfg(feature = "optimism")]
for hardfork in op_hardforks.iter() {
for hardfork in &op_hardforks {
assert_eq!(hardfork.consensus_type(), ConsensusType::ProofOfStake);
assert!(hardfork.is_proof_of_stake());
assert!(!hardfork.is_proof_of_work());