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

Better handle serde_as on enum variants #499 #502

Merged
merged 1 commit into from
Aug 14, 2022
Merged

Better handle serde_as on enum variants #499 #502

merged 1 commit into from
Aug 14, 2022

Conversation

jonasbb
Copy link
Owner

@jonasbb jonasbb commented Aug 14, 2022

Change the serde_as macro to warn on serde_as attributes on enum variant
fields. They are unsupported (in contrast to serde_derive), so showing
an error is better and avoids confusion when migrating.
Also update the main examples to include an enum.

Closes #499

Change the serde_as macro to warn on serde_as attributes on enum variant
fields. They are unsupported (in contrast to serde_derive), so showing
an error is better and avoids confusion when migrating.
Also update the main examples to include an enum.
@codecov
Copy link

codecov bot commented Aug 14, 2022

Codecov Report

Merging #502 (cfaee86) into master (2519bef) will decrease coverage by 0.21%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #502      +/-   ##
==========================================
- Coverage   70.81%   70.59%   -0.22%     
==========================================
  Files          52       52              
  Lines        3625     3636      +11     
==========================================
  Hits         2567     2567              
- Misses       1058     1069      +11     
Impacted Files Coverage Δ
serde_with/src/lib.rs 100.00% <ø> (ø)
serde_with_macros/src/lib.rs 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jonasbb
Copy link
Owner Author

jonasbb commented Aug 14, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 14, 2022

Build succeeded:

@bors bors bot merged commit 91f7604 into master Aug 14, 2022
@bors bors bot deleted the serde-as-enum branch August 14, 2022 15:02
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.

serde_as does not process enum variant attributes
1 participant