From 24c55f39ee75c4a64568a31088ad33129b15a70f Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Wed, 27 Mar 2024 00:08:56 +0400 Subject: [PATCH] Replace Vec::new() with Vec::with_capacity(2) (#413) --- svm/src/account_loader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svm/src/account_loader.rs b/svm/src/account_loader.rs index 374fc756d..87c18b971 100644 --- a/svm/src/account_loader.rs +++ b/svm/src/account_loader.rs @@ -317,7 +317,7 @@ fn load_transaction_accounts( .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