Skip to content

Commit

Permalink
lang: Fix using Vec<u8> type with declare_program! (#2966)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptopapi997 authored May 15, 2024
1 parent 470731b commit e71a63c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The minor version will be incremented upon a breaking change and the patch versi
- idl: Fix potential panic on external type resolution ([#2954](https://github.com/coral-xyz/anchor/pull/2954)).
- lang: Fix using defined types in instruction parameters with `declare_program!` ([#2959](https://github.com/coral-xyz/anchor/pull/2959)).
- lang: Fix using const generics with `declare_program!` ([#2965](https://github.com/coral-xyz/anchor/pull/2965)).
- lang: Fix using `Vec<u8>` type with `declare_program!` ([#2966](https://github.com/coral-xyz/anchor/pull/2966)).

### Breaking

Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/program/src/declare_program/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn convert_idl_type_to_str(ty: &IdlType) -> String {
IdlType::I128 => "i128".into(),
IdlType::U256 => "u256".into(),
IdlType::I256 => "i256".into(),
IdlType::Bytes => "bytes".into(),
IdlType::Bytes => "Vec<u8>".into(),
IdlType::String => "String".into(),
IdlType::Pubkey => "Pubkey".into(),
IdlType::Option(ty) => format!("Option<{}>", convert_idl_type_to_str(ty)),
Expand Down

0 comments on commit e71a63c

Please sign in to comment.