with_capacity
This commit is contained in:
parent
cfaa6fadbf
commit
d5f454c89d
|
@ -34,8 +34,8 @@ impl IndexedBlock {
|
||||||
let mut block = IndexedBlock {
|
let mut block = IndexedBlock {
|
||||||
header_hash: header.hash(),
|
header_hash: header.hash(),
|
||||||
header: header,
|
header: header,
|
||||||
transactions: Vec::new(),
|
transactions: Vec::with_capacity(transaction_index.len()),
|
||||||
transaction_hashes: Vec::new(),
|
transaction_hashes: Vec::with_capacity(transaction_index.len()),
|
||||||
};
|
};
|
||||||
|
|
||||||
for (h256, tx) in transaction_index {
|
for (h256, tx) in transaction_index {
|
||||||
|
|
Loading…
Reference in New Issue