Skip to content

Commit

Permalink
refactor: Optimize instruction_accounts creation in invoke_context (
Browse files Browse the repository at this point in the history
#2475)

refactor: optimize instruction_accounts creation in invoke_context
  • Loading branch information
codebender828 authored Aug 8, 2024
1 parent 1f9cbb0 commit 169eeec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions program-runtime/src/invoke_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@ impl<'a> InvokeContext<'a> {
let instruction_accounts = duplicate_indicies
.into_iter()
.map(|duplicate_index| {
Ok(deduplicated_instruction_accounts
deduplicated_instruction_accounts
.get(duplicate_index)
.ok_or(InstructionError::NotEnoughAccountKeys)?
.clone())
.cloned()
.ok_or(InstructionError::NotEnoughAccountKeys)
})
.collect::<Result<Vec<InstructionAccount>, InstructionError>>()?;

Expand Down

0 comments on commit 169eeec

Please sign in to comment.