Skip to content

Commit

Permalink
Replace Vec::new() with Vec::with_capacity(2) (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey authored Mar 26, 2024
1 parent 21b6821 commit 24c55f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion svm/src/account_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ fn load_transaction_accounts<CB: TransactionProcessingCallback>(
.instructions()
.iter()
.map(|instruction| {
let mut account_indices = Vec::new();
let mut account_indices = Vec::with_capacity(2);
let mut program_index = instruction.program_id_index as usize;
// This command may never return error, because the transaction is sanitized
let (program_id, program_account) = accounts
Expand Down

0 comments on commit 24c55f3

Please sign in to comment.