From f5b75a836fabd84a1147e854fc5c2e72e912a599 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 21 Jun 2022 18:08:02 -0700 Subject: [PATCH] cargo +nightly-2022-06-21 fmt --all --- program-runtime/src/invoke_context.rs | 19 +++++++++++-------- programs/stake/src/stake_instruction.rs | 11 ++++------- 2 files changed, 15 insertions(+), 15 deletions(-) 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 },