Armani Ferrante 3 years ago
parent
commit
cb8584c015
3 changed files with 2 additions and 4 deletions
  1. 0 1
      lang/src/accounts/account.rs
  2. 0 1
      lang/src/accounts/program_account.rs
  3. 2 2
      lang/src/lib.rs

+ 0 - 1
lang/src/accounts/account.rs

@@ -1,6 +1,5 @@
 //! Account container that checks ownership on deserialization.
 //! Account container that checks ownership on deserialization.
 
 
-use crate::accounts::header;
 use crate::error::ErrorCode;
 use crate::error::ErrorCode;
 use crate::*;
 use crate::*;
 use solana_program::account_info::AccountInfo;
 use solana_program::account_info::AccountInfo;

+ 0 - 1
lang/src/accounts/program_account.rs

@@ -1,6 +1,5 @@
 #[allow(deprecated)]
 #[allow(deprecated)]
 use crate::accounts::cpi_account::CpiAccount;
 use crate::accounts::cpi_account::CpiAccount;
-use crate::accounts::header;
 use crate::error::ErrorCode;
 use crate::error::ErrorCode;
 use crate::*;
 use crate::*;
 use solana_program::account_info::AccountInfo;
 use solana_program::account_info::AccountInfo;

+ 2 - 2
lang/src/lib.rs

@@ -30,7 +30,6 @@ use solana_program::instruction::AccountMeta;
 use solana_program::program_error::ProgramError;
 use solana_program::program_error::ProgramError;
 use solana_program::pubkey::Pubkey;
 use solana_program::pubkey::Pubkey;
 use std::collections::BTreeMap;
 use std::collections::BTreeMap;
-use std::io::Write;
 
 
 mod account_meta;
 mod account_meta;
 pub mod accounts;
 pub mod accounts;
@@ -146,7 +145,8 @@ where
 /// In most cases, one can use the default implementation provided by the
 /// In most cases, one can use the default implementation provided by the
 /// [`#[account]`](./attr.account.html) attribute.
 /// [`#[account]`](./attr.account.html) attribute.
 pub trait AccountSerialize {
 pub trait AccountSerialize {
-    /// Serializes the account data into `writer`.
+    /// Serializes the account into the data buffer. Does not modify the
+    /// account header.
     fn try_serialize(&self, _data: &mut [u8]) -> Result<(), ProgramError> {
     fn try_serialize(&self, _data: &mut [u8]) -> Result<(), ProgramError> {
         Ok(())
         Ok(())
     }
     }