diff --git a/Cargo.lock b/Cargo.lock index fd2195df..e4b6494f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -194,7 +194,7 @@ dependencies = [ [[package]] name = "anchor-common" -version = "0.21.0" +version = "0.22.0" dependencies = [ "arrayref", "solana-program", diff --git a/cli/src/lib.rs b/cli/src/lib.rs index e9bca6b5..08b9f4a4 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -1429,13 +1429,7 @@ fn extract_idl(cfg: &WithPath, file: &str, skip_lint: bool) -> Result Result<()> { diff --git a/lang/attribute/account/Cargo.toml b/lang/attribute/account/Cargo.toml index 6be5d28f..8af260c7 100644 --- a/lang/attribute/account/Cargo.toml +++ b/lang/attribute/account/Cargo.toml @@ -20,6 +20,6 @@ quote = "1.0" syn = { version = "1.0.60", features = ["full"] } anyhow = "1.0.32" anchor-syn = { path = "../../syn", version = "0.22.0", features = ["hash"] } -anchor-common = { path = "../../common", version = "0.21.0" } +anchor-common = { path = "../../common", version = "0.22.0" } rustversion = "1.0.3" bs58 = "0.4.0" diff --git a/lang/common/Cargo.toml b/lang/common/Cargo.toml index f6dc2a62..1da17ce0 100644 --- a/lang/common/Cargo.toml +++ b/lang/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anchor-common" -version = "0.21.0" +version = "0.22.0" authors = ["Serum Foundation "] repository = "https://github.com/project-serum/anchor" license = "Apache-2.0" diff --git a/lang/src/accounts/account_loader.rs b/lang/src/accounts/account_loader.rs index 1d39f623..85a71bf4 100644 --- a/lang/src/accounts/account_loader.rs +++ b/lang/src/accounts/account_loader.rs @@ -3,7 +3,6 @@ use crate::accounts::header; use crate::error::ErrorCode; use crate::*; -use arrayref::array_ref; use solana_program::account_info::AccountInfo; use solana_program::instruction::AccountMeta; use solana_program::pubkey::Pubkey; @@ -188,7 +187,7 @@ impl<'info, T: ZeroCopy + Owner> Accounts<'info> for AccountLoader<'info, T> { impl<'info, T: ZeroCopy + Owner> AccountsExit<'info> for AccountLoader<'info, T> { // The account *cannot* be loaded when this is called. - fn exit(&self, _program_id: &Pubkey) -> ProgramResult { + fn exit(&self, _program_id: &Pubkey) -> Result<()> { // No-op. Ok(()) } diff --git a/lang/src/accounts/loader.rs b/lang/src/accounts/loader.rs index 027527b4..ed3dcc30 100644 --- a/lang/src/accounts/loader.rs +++ b/lang/src/accounts/loader.rs @@ -1,7 +1,6 @@ use crate::accounts::header; use crate::error::ErrorCode; use crate::*; -use arrayref::array_ref; use solana_program::account_info::AccountInfo; use solana_program::instruction::AccountMeta; use solana_program::pubkey::Pubkey; @@ -134,7 +133,7 @@ impl<'info, T: ZeroCopy> Accounts<'info> for Loader<'info, T> { #[allow(deprecated)] impl<'info, T: ZeroCopy> AccountsExit<'info> for Loader<'info, T> { // The account *cannot* be loaded when this is called. - fn exit(&self, _program_id: &Pubkey) -> ProgramResult { + fn exit(&self, _program_id: &Pubkey) -> Result<()> { // No-op. Ok(()) } diff --git a/lang/src/lib.rs b/lang/src/lib.rs index d22166a6..07bd2c03 100644 --- a/lang/src/lib.rs +++ b/lang/src/lib.rs @@ -147,7 +147,7 @@ where pub trait AccountSerialize { /// 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<()> { Ok(()) } }