with_capacity

This commit is contained in:
NikVolf 2016-11-28 16:47:01 +03:00
parent cfaa6fadbf
commit d5f454c89d
1 changed files with 2 additions and 2 deletions

View File

@ -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 {