Bläddra i källkod

complete merge

Armani Ferrante 3 år sedan
förälder
incheckning
68ba3004f4

+ 1 - 1
Cargo.lock

@@ -194,7 +194,7 @@ dependencies = [
 
 [[package]]
 name = "anchor-common"
-version = "0.21.0"
+version = "0.22.0"
 dependencies = [
  "arrayref",
  "solana-program",

+ 1 - 7
cli/src/lib.rs

@@ -1429,13 +1429,7 @@ fn extract_idl(cfg: &WithPath<Config>, file: &str, skip_lint: bool) -> Result<Op
     let manifest_from_path = std::env::current_dir()?.join(PathBuf::from(&*file).parent().unwrap());
     let cargo = Manifest::discover_from_path(manifest_from_path)?
         .ok_or_else(|| anyhow!("Cargo.toml not found"))?;
-    anchor_syn::idl::file::parse(
-        &*cargo,
-        &*file,
-        cfg.features.seeds,
-        cfg.features.safety_checks,
-        !skip_lint,
-    )
+    anchor_syn::idl::file::parse(&*cargo, &*file, cfg.features.seeds, !skip_lint)
 }
 
 fn idl(cfg_override: &ConfigOverride, subcmd: IdlCommand) -> Result<()> {

+ 1 - 1
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"

+ 1 - 1
lang/common/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "anchor-common"
-version = "0.21.0"
+version = "0.22.0"
 authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"

+ 1 - 2
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(())
     }

+ 1 - 2
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(())
     }

+ 1 - 1
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(())
     }
 }