ReadableAccount.data returns slice (#16686)

* ReadAbleAccount.data returns slice

* more slice fixup

* more slice

* slice
This commit is contained in:
Jeff Washington (jwash)
2021-04-20 16:41:16 -05:00
committed by GitHub
parent 08d5253651
commit 03f7b251b8
5 changed files with 18 additions and 18 deletions

View File

@ -420,7 +420,7 @@ mod tests {
assert_eq!(key, *account_info.key);
let account = account.borrow();
assert_eq!(account.lamports, account_info.lamports());
assert_eq!(&account.data()[..], &account_info.data.borrow()[..]);
assert_eq!(account.data(), &account_info.data.borrow()[..]);
assert_eq!(&account.owner, account_info.owner);
assert_eq!(account.executable, account_info.executable);
assert_eq!(account.rent_epoch, account_info.rent_epoch);
@ -466,8 +466,8 @@ mod tests {
let account = account.borrow();
assert_eq!(account.lamports, de_keyed_account.lamports().unwrap());
assert_eq!(
&account.data()[..],
&de_keyed_account.try_account_ref().unwrap().data()[..]
account.data(),
de_keyed_account.try_account_ref().unwrap().data()
);
assert_eq!(account.owner, de_keyed_account.owner().unwrap());
assert_eq!(account.executable, de_keyed_account.executable().unwrap());
@ -492,7 +492,7 @@ mod tests {
assert_eq!(key, *account_info.key);
let account = account.borrow();
assert_eq!(account.lamports, account_info.lamports());
assert_eq!(&account.data()[..], &account_info.data.borrow()[..]);
assert_eq!(account.data(), &account_info.data.borrow()[..]);
assert_eq!(&account.owner, account_info.owner);
assert_eq!(account.executable, account_info.executable);
assert_eq!(account.rent_epoch, account_info.rent_epoch);
@ -525,8 +525,8 @@ mod tests {
let account = account.borrow();
assert_eq!(account.lamports, de_keyed_account.lamports().unwrap());
assert_eq!(
&account.data()[..],
&de_keyed_account.try_account_ref().unwrap().data()[..]
account.data(),
de_keyed_account.try_account_ref().unwrap().data()
);
assert_eq!(account.owner, de_keyed_account.owner().unwrap());
assert_eq!(account.executable, de_keyed_account.executable().unwrap());