Fix Rust beta compiler errors 1.78.0-beta.1 (#5439)

* remove redundant imports

* fix test

* contains key

* fmt

* Merge branch 'unstable' into fix-beta-compiler
This commit is contained in:
Eitan Seri-Levi
2024-03-20 07:17:02 +02:00
committed by GitHub
parent 4449627c7c
commit 01ec42e75a
148 changed files with 104 additions and 301 deletions

View File

@@ -50,7 +50,7 @@ impl TreeHashCache {
pub fn recalculate_merkle_root(
&mut self,
arena: &mut CacheArena,
leaves: impl Iterator<Item = [u8; BYTES_PER_CHUNK]> + ExactSizeIterator,
leaves: impl ExactSizeIterator<Item = [u8; BYTES_PER_CHUNK]>,
) -> Result<Hash256, Error> {
let dirty_indices = self.update_leaves(arena, leaves)?;
self.update_merkle_root(arena, dirty_indices)
@@ -60,7 +60,7 @@ impl TreeHashCache {
pub fn update_leaves(
&mut self,
arena: &mut CacheArena,
mut leaves: impl Iterator<Item = [u8; BYTES_PER_CHUNK]> + ExactSizeIterator,
mut leaves: impl ExactSizeIterator<Item = [u8; BYTES_PER_CHUNK]>,
) -> Result<SmallVec8<usize>, Error> {
let new_leaf_count = leaves.len();