remove old code (#15988) (#15993)

(cherry picked from commit 9760fded2d)

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2021-03-30 00:50:27 +00:00
committed by GitHub
parent 4d731ecd08
commit 06a54e1423

View File

@ -507,20 +507,6 @@ pub fn to_account<S: Sysvar, T: WritableAccount>(sysvar: &S, account: &mut T) ->
bincode::serialize_into(account.data_as_mut_slice(), sysvar).ok()
}
/// Return the information required to construct an `AccountInfo`. Used by the
/// `AccountInfo` conversion implementations.
impl solana_program::account_info::Account for AccountSharedData {
fn get(&mut self) -> (&mut u64, &mut [u8], &Pubkey, bool, Epoch) {
(
&mut self.lamports,
&mut self.data,
&self.owner,
self.executable,
self.rent_epoch,
)
}
}
/// Return the information required to construct an `AccountInfo`. Used by the
/// `AccountInfo` conversion implementations.
impl solana_program::account_info::Account for Account {
@ -535,11 +521,6 @@ impl solana_program::account_info::Account for Account {
}
}
/// Create `AccountInfo`s
pub fn create_account_infos(accounts: &mut [(Pubkey, AccountSharedData)]) -> Vec<AccountInfo> {
accounts.iter_mut().map(Into::into).collect()
}
/// Create `AccountInfo`s
pub fn create_is_signer_account_infos<'a>(
accounts: &'a mut [(&'a Pubkey, bool, &'a mut Account)],