diff --git a/program-runtime/src/invoke_context.rs b/program-runtime/src/invoke_context.rs index 50e508762dfd4f..2cc0a3a1a98c96 100644 --- a/program-runtime/src/invoke_context.rs +++ b/program-runtime/src/invoke_context.rs @@ -433,14 +433,17 @@ impl<'a> InvokeContext<'a> { )) }) .chain(instruction_accounts.iter().map(|instruction_account| { - Ok(( - instruction_account.is_signer, - instruction_account.is_writable, - self.transaction_context - .get_key_of_account_at_index(instruction_account.index_in_transaction)?, - self.transaction_context - .get_account_at_index(instruction_account.index_in_transaction)?, - )) + Ok( + ( + instruction_account.is_signer, + instruction_account.is_writable, + self.transaction_context.get_key_of_account_at_index( + instruction_account.index_in_transaction, + )?, + self.transaction_context + .get_account_at_index(instruction_account.index_in_transaction)?, + ), + ) })) .collect::, InstructionError>>()?; diff --git a/programs/stake/src/stake_instruction.rs b/programs/stake/src/stake_instruction.rs index ab1cb34efaf588..d1645d217bfa52 100644 --- a/programs/stake/src/stake_instruction.rs +++ b/programs/stake/src/stake_instruction.rs @@ -38,13 +38,10 @@ fn get_optional_pubkey<'a>( { return Err(InstructionError::MissingRequiredSignature); } - Some( - transaction_context.get_key_of_account_at_index( - instruction_context.get_index_of_instruction_account_in_transaction( - instruction_account_index, - )?, - )?, - ) + Some(transaction_context.get_key_of_account_at_index( + instruction_context + .get_index_of_instruction_account_in_transaction(instruction_account_index)?, + )?) } else { None },