lang: Add Box<T> implementation for the AccountsClose trait (#856)
This commit is contained in:
parent
d774b456bf
commit
39576de39c
|
@ -1,4 +1,4 @@
|
||||||
use crate::{Accounts, AccountsExit, ToAccountInfos, ToAccountMetas};
|
use crate::{Accounts, AccountsClose, AccountsExit, ToAccountInfos, ToAccountMetas};
|
||||||
use solana_program::account_info::AccountInfo;
|
use solana_program::account_info::AccountInfo;
|
||||||
use solana_program::entrypoint::ProgramResult;
|
use solana_program::entrypoint::ProgramResult;
|
||||||
use solana_program::instruction::AccountMeta;
|
use solana_program::instruction::AccountMeta;
|
||||||
|
@ -33,3 +33,9 @@ impl<T: ToAccountMetas> ToAccountMetas for Box<T> {
|
||||||
T::to_account_metas(self, is_signer)
|
T::to_account_metas(self, is_signer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'info, T: AccountsClose<'info>> AccountsClose<'info> for Box<T> {
|
||||||
|
fn close(&self, sol_destination: AccountInfo<'info>) -> ProgramResult {
|
||||||
|
T::close(self, sol_destination)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue