diff --git a/program-runtime/src/invoke_context.rs b/program-runtime/src/invoke_context.rs index 5c732463c9c353..96079b9a87072d 100644 --- a/program-runtime/src/invoke_context.rs +++ b/program-runtime/src/invoke_context.rs @@ -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::, InstructionError>>()?;