mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-07 22:43:56 -05:00
chore: use with capacity (#20670)
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,6 +12,9 @@ target/
|
||||
# Generated by Intellij-based IDEs.
|
||||
.idea
|
||||
|
||||
# ck-search metadata
|
||||
.ck
|
||||
|
||||
# Generated by MacOS
|
||||
.DS_Store
|
||||
|
||||
|
||||
@@ -144,7 +144,12 @@ impl<T> ExecutionOutcome<T> {
|
||||
bundle: BundleState,
|
||||
results: Vec<BlockExecutionResult<T>>,
|
||||
) -> Self {
|
||||
let mut value = Self { bundle, first_block, receipts: Vec::new(), requests: Vec::new() };
|
||||
let mut value = Self {
|
||||
bundle,
|
||||
first_block,
|
||||
receipts: Vec::with_capacity(results.len()),
|
||||
requests: Vec::with_capacity(results.len()),
|
||||
};
|
||||
for result in results {
|
||||
value.receipts.push(result.receipts);
|
||||
value.requests.push(result.requests);
|
||||
|
||||
Reference in New Issue
Block a user