mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 00:41:08 +00:00
create some vectors with initial capacities (#3701)
Signed-off-by: Benjamin Coenen <benjamin.coenen@hotmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
62be947877
commit
53a43e92aa
@@ -737,8 +737,8 @@ impl StorageApi for () {
|
||||
}
|
||||
|
||||
fn blake2_256_ordered_trie_root(input: Vec<Vec<u8>>) -> H256 {
|
||||
let mut values = Vec::new();
|
||||
let mut lengths = Vec::new();
|
||||
let mut values = Vec::with_capacity(input.len());
|
||||
let mut lengths = Vec::with_capacity(input.len());
|
||||
for v in input {
|
||||
values.extend_from_slice(&v);
|
||||
lengths.push((v.len() as u32).to_le());
|
||||
|
||||
Reference in New Issue
Block a user