This repository was archived by the owner on Dec 17, 2025. It is now read-only.
Support parsing explicit discriminants on enums#45
Merged
VictorKoenders merged 2 commits intotrunkfrom Mar 30, 2023
Merged
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## trunk #45 +/- ##
========================================
Coverage ? 49.00%
========================================
Files ? 19
Lines ? 1900
Branches ? 0
========================================
Hits ? 931
Misses ? 969
Partials ? 0
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Removed `Fields::Unit` Removed `Fields::Literal`, moved this literal value to `EnumVariant` Made `EnumVariant::fields` optional
97ed618 to
1fbfefa
Compare
mkj
added a commit
to mkj/virtue
that referenced
this pull request
Mar 30, 2023
A Struct { } should have Some(Fields::Struct(vec![])) rather than None.
This partially reverts cfb17c0 (bincode-org#45)
mkj
added a commit
to mkj/virtue
that referenced
this pull request
Apr 5, 2023
A Struct { } should have Some(Fields::Struct(vec![])) rather than None.
This partially reverts cfb17c0 (bincode-org#45)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resulted in some breaking changes, but I think the code is better organized now:
StructBodyto have optional fieldFields::UnitFields::Literal, moved this literal value toEnumVariantEnumVariant::fieldsoptional