some ReadableAccount changes (#16688)

* some ReadableAccount changes

* deref
This commit is contained in:
Jeff Washington (jwash)
2021-04-21 12:20:37 -05:00
committed by GitHub
parent 189d2121e6
commit 69cbad0869
3 changed files with 21 additions and 21 deletions

View File

@@ -57,13 +57,13 @@ pub struct AccountMeta {
pub rent_epoch: Epoch,
}
impl<'a> From<&'a AccountSharedData> for AccountMeta {
fn from(account: &'a AccountSharedData) -> Self {
impl<'a, T: ReadableAccount> From<&'a T> for AccountMeta {
fn from(account: &'a T) -> Self {
Self {
lamports: account.lamports,
owner: account.owner,
executable: account.executable,
rent_epoch: account.rent_epoch,
lamports: account.lamports(),
owner: *account.owner(),
executable: account.executable(),
rent_epoch: account.rent_epoch(),
}
}
}