Browse Source

spl: add more derives for `TokenAccount` and `Mint` (#1818)

Paul 3 years ago
parent
commit
9a48f40e3d
2 changed files with 3 additions and 2 deletions
  1. 1 0
      CHANGELOG.md
  2. 2 2
      spl/src/token.rs

+ 1 - 0
CHANGELOG.md

@@ -13,6 +13,7 @@ The minor version will be incremented upon a breaking change and the patch versi
 ### Features
 
 * cli: Add `--program-keypair` to `anchor deploy` ([#1786](https://github.com/project-serum/anchor/pull/1786)).
+* spl: Add more derived traits to `TokenAccount` to `Mint` ([#1818](https://github.com/project-serum/anchor/pull/1818)).
 * cli: Add compilation optimizations to cli template ([#1807](https://github.com/project-serum/anchor/pull/1807)).
 
 ### Fixes

+ 2 - 2
spl/src/token.rs

@@ -333,7 +333,7 @@ pub struct SetAuthority<'info> {
     pub account_or_mint: AccountInfo<'info>,
 }
 
-#[derive(Clone)]
+#[derive(Clone, Debug, Default, PartialEq)]
 pub struct TokenAccount(spl_token::state::Account);
 
 impl TokenAccount {
@@ -364,7 +364,7 @@ impl Deref for TokenAccount {
     }
 }
 
-#[derive(Clone)]
+#[derive(Clone, Debug, Default, PartialEq)]
 pub struct Mint(spl_token::state::Mint);
 
 impl Mint {