clean up/add comments (#23727)

This commit is contained in:
Jeff Washington (jwash) 2022-03-17 14:23:08 -05:00 committed by GitHub
parent 2f58c9e501
commit 342f1ab1cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -410,7 +410,7 @@ lazy_static! {
impl AbiExample for &Vec<u8> {
fn example() -> Self {
info!("AbiExample for (&Vec<T>): {}", type_name::<Self>());
info!("AbiExample for (&Vec<u8>): {}", type_name::<Self>());
&*VEC_U8
}
}

View File

@ -54,6 +54,7 @@ mod account_serialize {
rent_epoch: Epoch,
}
/// allows us to implement serialize on AccountSharedData that is equivalent to Account::serialize without making a copy of the Vec<u8>
pub fn serialize_account<S>(
account: &(impl ReadableAccount + Serialize),
data: &Vec<u8>,
@ -64,6 +65,7 @@ mod account_serialize {
{
let temp = Account {
lamports: account.lamports(),
// note this is a ref, which is the whole point of 'account_serialize'
data,
owner: *account.owner(),
executable: account.executable(),