Update Rust Edition to 2024 (#7766)

* #7749

Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
chonghe
2025-08-13 11:04:31 +08:00
committed by GitHub
parent bd6b8b6a65
commit 522bd9e9c6
468 changed files with 3594 additions and 3396 deletions

View File

@@ -1,7 +1,7 @@
use crate::{
per_block_processing, per_epoch_processing::EpochProcessingSummary, per_slot_processing,
BlockProcessingError, BlockSignatureStrategy, ConsensusContext, SlotProcessingError,
VerifyBlockRoot,
VerifyBlockRoot, per_block_processing, per_epoch_processing::EpochProcessingSummary,
per_slot_processing,
};
use itertools::Itertools;
use std::iter::Peekable;
@@ -193,12 +193,11 @@ where
}
// Otherwise try to source a root from the previous block.
if let Some(prev_i) = i.checked_sub(1) {
if let Some(prev_block) = blocks.get(prev_i) {
if prev_block.slot() == slot {
return Ok(prev_block.state_root());
}
}
if let Some(prev_i) = i.checked_sub(1)
&& let Some(prev_block) = blocks.get(prev_i)
&& prev_block.slot() == slot
{
return Ok(prev_block.state_root());
}
self.state_root_miss = true;