Replace Vec::new() with Vec::with_capacity(2) (#413)

This commit is contained in:
Kevin Heavey 2024-03-27 00:08:56 +04:00 committed by GitHub
parent 21b6821885
commit 24c55f39ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

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