-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Internally tagged enums are not working #3
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was trying this library out and I noticed that internal tagging is not deserializing properly. I get runtime errors after simply serializing to a JsValue and deserializing from it.
I looked through your code and found the internally tagged enum test, but it looks like you guys aren't expanding the
#[serde(tag = "tag")]
attribute in yourtest_enum! { ... }
macro.I started getting compile errors in the tests/serde.rs file after I added the expansion to the macro_rules block:
Console output:
These errors do make sense because internally tagged enums don't work with tuple variants. It's just that they weren't being tested before.
I'm looking at this bug to see if I can fix it, but unfortunately I don't know much about serde. I'm not sure if it's a simple fix or not, but if I figure anything out I'll open a PR.
In the meantime, if you guys have any thoughts or guidance on this, I'd appreciate it!
The text was updated successfully, but these errors were encountered: