Skip to content

Commit

Permalink
Reduce lifetime requirement on outer fn
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 committed Mar 5, 2025
1 parent ddf2cc3 commit d4e342c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions program/src/onchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ use {
};

/// Takes a list of accounts and returns the multisig signers' keys and accounts
pub fn extract_multisig_accounts<'a>(
pub fn extract_multisig_accounts<'a, 'b>(
multisig_account: &AccountInfo<'a>,
accounts: &'a [AccountInfo<'a>],
) -> Result<Box<dyn Iterator<Item = &'a AccountInfo<'a>> + 'a>, ProgramError> {
accounts: &'b [AccountInfo<'a>],
) -> Result<Box<dyn Iterator<Item = &'b AccountInfo<'a>> + 'b>, ProgramError> {
if multisig_account.data_len() != PodMultisig::SIZE_OF {
return Ok(Box::new(std::iter::empty()));
}
Expand All @@ -48,7 +48,7 @@ fn transfer_instruction_and_account_infos<'a>(
mint_info: AccountInfo<'a>,
destination_info: AccountInfo<'a>,
authority_info: AccountInfo<'a>,
additional_accounts: &'a [AccountInfo<'a>],
additional_accounts: &[AccountInfo<'a>],
amount: u64,
decimals: u8,
fee: Option<u64>,
Expand Down Expand Up @@ -127,7 +127,7 @@ fn invoke_transfer_internal<'a>(
mint_info: AccountInfo<'a>,
destination_info: AccountInfo<'a>,
authority_info: AccountInfo<'a>,
additional_accounts: &'a [AccountInfo<'a>],
additional_accounts: &[AccountInfo<'a>],
amount: u64,
decimals: u8,
fee: Option<u64>,
Expand Down Expand Up @@ -157,7 +157,7 @@ pub fn invoke_transfer_checked<'a>(
mint_info: AccountInfo<'a>,
destination_info: AccountInfo<'a>,
authority_info: AccountInfo<'a>,
additional_accounts: &'a [AccountInfo<'a>],
additional_accounts: &[AccountInfo<'a>],
amount: u64,
decimals: u8,
seeds: &[&[&[u8]]],
Expand Down Expand Up @@ -186,7 +186,7 @@ pub fn invoke_transfer_checked_with_fee<'a>(
mint_info: AccountInfo<'a>,
destination_info: AccountInfo<'a>,
authority_info: AccountInfo<'a>,
additional_accounts: &'a [AccountInfo<'a>],
additional_accounts: &[AccountInfo<'a>],
amount: u64,
decimals: u8,
fee: u64,
Expand Down

0 comments on commit d4e342c

Please sign in to comment.