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

fix(derive): require Default trait bound for the skipped field type, rather than for its type parameters #340

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

DanikVitek
Copy link

Fixes #339

@DanikVitek
Copy link
Author

Now that I think about it, it seems, that the same change could be made for the requirements of BorshDeserialze/BorshSerialize traits themselves. Meaning, that these traits should be required not for the type parameters, but for the field types. Because, once again, some types might implement these traits manually and not need the trait bounds for the generic types. Akin PhantomData<T>

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

Successfully merging this pull request may close these issues.

#[borsh(skip)] should ask for Default implementation on the field's type, rather than its type parameters
1 participant