mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-02 00:41:07 +00:00
create some vectors with initial capacities (#3701)
Signed-off-by: Benjamin Coenen <benjamin.coenen@hotmail.com>
This commit is contained in:
1 parent
62be947877
commit
53a43e92aa
3 files changed
+17
-19
No files matched your search
@@ -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