-
Notifications
You must be signed in to change notification settings - Fork 78
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
refactor!: borsh_init to borsh(init). #187
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks good to me.
I feel we need to write a migration guide for this release for all the breaking changes (I would use CHANGELOG file for this purpose, but I would add a dedicated section there)
…", "use_discriminant = ...");
let attr = derive_input.attrs.iter().find(|attr| attr.path() == SKIP); | ||
|
||
if attr.is_some() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a suggestion, you can use any
instead of find
+ is_some
:
let attr = derive_input.attrs.iter().find(|attr| attr.path() == SKIP); | |
if attr.is_some() { | |
if derive_input.attrs.iter().any(|attr| attr.path() == SKIP) { |
This might, however make the code split across several lines and actually make it harder to read
Resolves #186 and is part of #51
Migration guide: replace all
#[borsh_init(init_method_name)]
to#[borsh(init=init_method_name)]