Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Fix 'useless_vec' clippy warning
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Livesey <[email protected]>
  • Loading branch information
suchapalaver committed Oct 10, 2023
1 parent 142fff7 commit 24e0ad7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions validator/src/state/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,7 @@ mod tests {
run_test(|merkle_path| {
let mut merkle_db = make_db(merkle_path);
let init_root = merkle_db.get_merkle_root();
let key_hashes = vec![
// matching prefix e55420
let key_hashes = [
(
"asdfg",
"e5542002d3e2892516fa461cde69e05880609fbad3d38ab69435a189e126de672b620c",
Expand Down Expand Up @@ -1133,7 +1132,7 @@ mod tests {
run_test(|merkle_path| {
let mut merkle_db = make_db(merkle_path);
let init_root = merkle_db.get_merkle_root();
let key_hashes = vec![
let key_hashes = [
(
"qwert",
"c946ee72d38b8c51328f1a5f31eb5bd3300362ad0ca69dab54eff996775c7069216bda",
Expand Down Expand Up @@ -1165,7 +1164,7 @@ mod tests {
assert_ne!(init_root, merkle_db.get_merkle_root());

// matching prefix e55420, however this will be newly added and not set already in trie
let key_hash_to_be_inserted = vec![(
let key_hash_to_be_inserted = [(
"asdfg",
"e5542002d3e2892516fa461cde69e05880609fbad3d38ab69435a189e126de672b620c",
)];
Expand Down Expand Up @@ -1517,7 +1516,7 @@ mod tests {
);
}

let addresses = vec!["ab0000", "aba001", "abff02"];
let addresses = ["ab0000", "aba001", "abff02"];
for (i, key) in addresses.iter().enumerate() {
let new_root = merkle_db
.set(key, format!("{:04x}", i * 10).as_bytes())
Expand Down

0 comments on commit 24e0ad7

Please sign in to comment.