From 8b1dfcca3fd1edcbf574e969ce30493f997e6d19 Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Tue, 22 Oct 2024 15:56:17 +0100 Subject: [PATCH] test(trie): proptest <-> alloy maps integration (#11962) --- book/sources/Cargo.toml | 1 - crates/trie/sparse/benches/root.rs | 2 ++ crates/trie/sparse/src/trie.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/book/sources/Cargo.toml b/book/sources/Cargo.toml index 1529af952..32fb13990 100644 --- a/book/sources/Cargo.toml +++ b/book/sources/Cargo.toml @@ -8,4 +8,3 @@ members = [ # Explicitly set the resolver to version 2, which is the default for packages with edition >= 2021 # https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html resolver = "2" - diff --git a/crates/trie/sparse/benches/root.rs b/crates/trie/sparse/benches/root.rs index 248e3caee..bc221a8f8 100644 --- a/crates/trie/sparse/benches/root.rs +++ b/crates/trie/sparse/benches/root.rs @@ -198,6 +198,8 @@ fn generate_test_data(size: usize) -> HashMap { .new_tree(&mut runner) .unwrap() .current() + .into_iter() + .collect() } criterion_group!(root, calculate_root_from_leaves, calculate_root_from_leaves_repeated); diff --git a/crates/trie/sparse/src/trie.rs b/crates/trie/sparse/src/trie.rs index 42f90d34c..a0f7a0c30 100644 --- a/crates/trie/sparse/src/trie.rs +++ b/crates/trie/sparse/src/trie.rs @@ -1276,6 +1276,6 @@ mod tests { ), 1..100, ) - )| { test(updates) }); + )| { test(updates.into_iter().collect()) }); } }