Skip to content

Commit

Permalink
lang: Fix using bytemuckunsafe account serialization with `declare_…
Browse files Browse the repository at this point in the history
…program!` (#3037)
  • Loading branch information
0xBurbo authored Jun 19, 2024
1 parent f326b89 commit 9c17d65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The minor version will be incremented upon a breaking change and the patch versi
- ts: Fix using IDLs that have defined types as generic arguments ([#3016](https://github.com/coral-xyz/anchor/pull/3016)).
- idl: Fix generation with unsupported expressions ([#3033](https://github.com/coral-xyz/anchor/pull/3033)).
- idl: Fix using `address` constraint with field expressions ([#3034](https://github.com/coral-xyz/anchor/pull/3034)).
- lang: Fix using `bytemuckunsafe` account serialization with `declare_program!` ([#3037](https://github.com/coral-xyz/anchor/pull/3037)).

### Breaking

Expand Down
4 changes: 2 additions & 2 deletions lang/attribute/program/src/declare_program/mods/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ pub fn gen_accounts_mod(idl: &Idl) -> proc_macro2::TokenStream {
matches!(ty_def.serialization, IdlSerialization::BytemuckUnsafe)
.then(|| {
quote! {
unsafe impl anchor_lang::__private::Pod for #name {}
unsafe impl anchor_lang::__private::Zeroable for #name {}
unsafe impl anchor_lang::__private::bytemuck::Pod for #name {}
unsafe impl anchor_lang::__private::bytemuck::Zeroable for #name {}
}
})
.unwrap_or_default();
Expand Down

0 comments on commit 9c17d65

Please sign in to comment.