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,8 +1,8 @@
#![cfg(any(feature = "mdbx", feature = "lmdb", feature = "redb"))]
use slasher::{
test_utils::{block as test_block, chain_spec, E},
Config, Slasher,
test_utils::{E, block as test_block, chain_spec},
};
use tempfile::tempdir;
use types::{Epoch, EthSpec};
@@ -56,10 +56,8 @@ fn block_pruning() {
(config.history_length - 1) * slots_per_epoch as usize + 1
);
// Check epochs of all slashings are from within range.
assert!(proposer_slashings.iter().all(|slashing| slashing
.signed_header_1
.message
.slot
.epoch(slots_per_epoch)
> current_epoch - config.history_length as u64));
assert!(proposer_slashings.iter().all(|slashing| {
slashing.signed_header_1.message.slot.epoch(slots_per_epoch)
> current_epoch - config.history_length as u64
}));
}