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,4 +1,4 @@
use ethereum_hashing::{hash, hash32_concat, ZERO_HASHES};
use ethereum_hashing::{ZERO_HASHES, hash, hash32_concat};
use safe_arith::ArithError;
use std::sync::LazyLock;
@@ -113,13 +113,13 @@ impl MerkleTree {
Zero(_) => {
*self = MerkleTree::create(&[elem], depth);
}
Node(ref mut hash, ref mut left, ref mut right) => {
Node(hash, left, right) => {
let left: &mut MerkleTree = &mut *left;
let right: &mut MerkleTree = &mut *right;
match (&*left, &*right) {
// Tree is full
(Leaf(_), Leaf(_)) | (Finalized(_), Leaf(_)) => {
return Err(MerkleTreeError::MerkleTreeFull)
return Err(MerkleTreeError::MerkleTreeFull);
}
// There is a right node so insert in right node
(Node(_, _, _), Node(_, _, _)) | (Finalized(_), Node(_, _, _)) => {