Skip to content

Commit

Permalink
cargo +nightly-2022-06-21 fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jun 22, 2022
1 parent c6cdd22 commit f5b75a8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
19 changes: 11 additions & 8 deletions program-runtime/src/invoke_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Result<Vec<_>, InstructionError>>()?;

Expand Down
11 changes: 4 additions & 7 deletions programs/stake/src/stake_instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down

0 comments on commit f5b75a8

Please sign in to comment.