From 342f1ab1cb394b744afb7226295ea49eec3f3f00 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Thu, 17 Mar 2022 14:23:08 -0500 Subject: [PATCH] clean up/add comments (#23727) --- frozen-abi/src/abi_example.rs | 2 +- sdk/src/account.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frozen-abi/src/abi_example.rs b/frozen-abi/src/abi_example.rs index ac4971d1ee..ae8b48ddd6 100644 --- a/frozen-abi/src/abi_example.rs +++ b/frozen-abi/src/abi_example.rs @@ -410,7 +410,7 @@ lazy_static! { impl AbiExample for &Vec { fn example() -> Self { - info!("AbiExample for (&Vec): {}", type_name::()); + info!("AbiExample for (&Vec): {}", type_name::()); &*VEC_U8 } } diff --git a/sdk/src/account.rs b/sdk/src/account.rs index 310d4078f7..65c03814bd 100644 --- a/sdk/src/account.rs +++ b/sdk/src/account.rs @@ -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 pub fn serialize_account( account: &(impl ReadableAccount + Serialize), data: &Vec, @@ -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(),