complete merge

This commit is contained in:
Armani Ferrante 2022-02-21 11:36:16 -05:00
parent 288005882d
commit 68ba3004f4
No known key found for this signature in database
GPG Key ID: D597A80BCF8E12B7
7 changed files with 7 additions and 15 deletions

2
Cargo.lock generated
View File

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

View File

@ -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<()> {

View File

@ -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"

View File

@ -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"

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}
}