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(),