chore(stage test): use with_capacity (#11759)

This commit is contained in:
nk_ysg
2024-10-16 00:24:25 +08:00
committed by GitHub
parent 77a382f59b
commit 7b1b1fcb3b

View File

@ -263,7 +263,7 @@ mod tests {
);
db.insert_blocks(blocks.iter(), StorageKind::Static)?;
let mut receipts = Vec::new();
let mut receipts = Vec::with_capacity(blocks.len());
let mut tx_num = 0u64;
for block in &blocks {
let mut block_receipts = Vec::with_capacity(block.body.transactions.len());