Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rust newtype idiom in IDL (tuple struct) #1719

Closed
SailorSnoW opened this issue Apr 2, 2022 · 1 comment
Closed

Support rust newtype idiom in IDL (tuple struct) #1719

SailorSnoW opened this issue Apr 2, 2022 · 1 comment

Comments

@SailorSnoW
Copy link

IDL actually doesn't seems to generate type that use the newtype idiom like:

#[derive(AnchorSerialize, AnchorDeserialize, Clone)]
pub struct Username(String);

but generate correctly if I change it to:

#[derive(AnchorSerialize, AnchorDeserialize, Clone)]
pub struct Username {
    s: String;
}
@paul-schaaf
Copy link
Contributor

duplicate of #232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants