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

@@ -5,10 +5,10 @@ use crate::per_block_processing::errors::{
DepositInvalid, HeaderInvalid, IndexedAttestationInvalid, IntoWithIndex,
ProposerSlashingInvalid,
};
use crate::{per_block_processing, BlockReplayError, BlockReplayer};
use crate::{BlockReplayError, BlockReplayer, per_block_processing};
use crate::{
per_block_processing::{process_operations, verify_exit::verify_exit},
BlockSignatureStrategy, ConsensusContext, VerifyBlockRoot, VerifySignatures,
per_block_processing::{process_operations, verify_exit::verify_exit},
};
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType};
use ssz_types::Bitfield;
@@ -717,10 +717,10 @@ async fn invalid_attester_slashing_not_slashable() {
let mut attester_slashing = harness.make_attester_slashing(vec![1, 2]);
match &mut attester_slashing {
AttesterSlashing::Base(ref mut attester_slashing) => {
AttesterSlashing::Base(attester_slashing) => {
attester_slashing.attestation_1 = attester_slashing.attestation_2.clone();
}
AttesterSlashing::Electra(ref mut attester_slashing) => {
AttesterSlashing::Electra(attester_slashing) => {
attester_slashing.attestation_1 = attester_slashing.attestation_2.clone();
}
}
@@ -752,10 +752,10 @@ async fn invalid_attester_slashing_1_invalid() {
let mut attester_slashing = harness.make_attester_slashing(vec![1, 2]);
match &mut attester_slashing {
AttesterSlashing::Base(ref mut attester_slashing) => {
AttesterSlashing::Base(attester_slashing) => {
attester_slashing.attestation_1.attesting_indices = VariableList::from(vec![2, 1]);
}
AttesterSlashing::Electra(ref mut attester_slashing) => {
AttesterSlashing::Electra(attester_slashing) => {
attester_slashing.attestation_1.attesting_indices = VariableList::from(vec![2, 1]);
}
}
@@ -790,10 +790,10 @@ async fn invalid_attester_slashing_2_invalid() {
let mut attester_slashing = harness.make_attester_slashing(vec![1, 2]);
match &mut attester_slashing {
AttesterSlashing::Base(ref mut attester_slashing) => {
AttesterSlashing::Base(attester_slashing) => {
attester_slashing.attestation_2.attesting_indices = VariableList::from(vec![2, 1]);
}
AttesterSlashing::Electra(ref mut attester_slashing) => {
AttesterSlashing::Electra(attester_slashing) => {
attester_slashing.attestation_2.attesting_indices = VariableList::from(vec![2, 1]);
}
}