spl: Make `TokenAccount` and `Mint` `Copy` (#2904)
This commit is contained in:
parent
7356bd5afe
commit
a18d6caa6d
|
@ -71,6 +71,7 @@ The minor version will be incremented upon a breaking change and the patch versi
|
|||
- avm, cli: Fix `stdsimd` feature compilation error from `ahash` when installing the CLI using newer Rust versions ([#2867](https://github.com/coral-xyz/anchor/pull/2867)).
|
||||
- spl: Fix not being able to deserialize newer token 2022 extensions ([#2876](https://github.com/coral-xyz/anchor/pull/2876)).
|
||||
- spl: Remove `solana-program` dependency ([#2900](https://github.com/coral-xyz/anchor/pull/2900)).
|
||||
- spl: Make TokenAccount and Mint Copy ([#2904])(https://github.com/coral-xyz/anchor/pull/2904)
|
||||
|
||||
### Breaking
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ pub struct SyncNative<'info> {
|
|||
pub account: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Copy)]
|
||||
pub struct TokenAccount(spl_token::state::Account);
|
||||
|
||||
impl TokenAccount {
|
||||
|
@ -474,7 +474,7 @@ impl Deref for TokenAccount {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Copy)]
|
||||
pub struct Mint(spl_token::state::Mint);
|
||||
|
||||
impl Mint {
|
||||
|
|
|
@ -13,7 +13,7 @@ pub use crate::token_2022_extensions::*;
|
|||
|
||||
static IDS: [Pubkey; 2] = [spl_token::ID, spl_token_2022::ID];
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Copy)]
|
||||
pub struct TokenAccount(spl_token_2022::state::Account);
|
||||
|
||||
impl anchor_lang::AccountDeserialize for TokenAccount {
|
||||
|
@ -42,7 +42,7 @@ impl Deref for TokenAccount {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Copy)]
|
||||
pub struct Mint(spl_token_2022::state::Mint);
|
||||
|
||||
impl anchor_lang::AccountDeserialize for Mint {
|
||||
|
|
Loading…
Reference in New Issue