From 0d91168b516bdabf542d865f6f9df8989077389c Mon Sep 17 00:00:00 2001 From: aldenhu Date: Tue, 14 May 2024 00:32:24 +0000 Subject: [PATCH] with_cap(4) --- storage/jellyfish-merkle/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/jellyfish-merkle/src/lib.rs b/storage/jellyfish-merkle/src/lib.rs index 344ef1edbae0ed..215483e195ba27 100644 --- a/storage/jellyfish-merkle/src/lib.rs +++ b/storage/jellyfish-merkle/src/lib.rs @@ -711,7 +711,7 @@ where ) -> Result<(Option<(HashValue, (K, Version))>, SparseMerkleProofExt)> { // Empty tree just returns proof with no sibling hash. let mut next_node_key = NodeKey::new_empty_path(version); - let mut out_siblings = vec![]; + let mut out_siblings = Vec::with_capacity(4); let nibble_path = NibblePath::new_even(key.to_vec()); let mut nibble_iter = nibble_path.nibbles();