-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Bug] Newtype enum variant deserialization failure when used with #[serde(flatten)] #14
Labels
bug
Something isn't working
Comments
greenhat616
added a commit
to libnyanpasu/serde-yaml-ng
that referenced
this issue
Oct 21, 2024
Close acatton#14. I adapted the implementation from [ron-rs/ron#451](ron-rs/ron#451). This is a workaround for Serde's internal buffer type used when deserializing via `visit_enum`.
greenhat616
added a commit
to libnyanpasu/serde-yaml-ng
that referenced
this issue
Oct 21, 2024
Close acatton#14. I adapted the implementation from [ron-rs/ron#451](ron-rs/ron#451). This is a workaround for Serde's internal buffer type used when deserializing via `visit_enum`.
greenhat616
added a commit
to libnyanpasu/serde-yaml-ng
that referenced
this issue
Nov 4, 2024
Close acatton#14. I adapted the implementation from [ron-rs/ron#451](ron-rs/ron#451). This is a workaround for Serde's internal buffer type used when deserializing via `visit_enum`. Signed-off-by: Jonson Petard <[email protected]>
greenhat616
added a commit
to libnyanpasu/serde-yaml-ng
that referenced
this issue
Nov 4, 2024
Close acatton#14. I adapted the implementation from [ron-rs/ron#451](ron-rs/ron#451). This is a workaround for Serde's internal buffer type used when deserializing via `visit_enum`. Signed-off-by: Jonson Petard <[email protected]>
greenhat616
added a commit
to libnyanpasu/serde-yaml-ng
that referenced
this issue
Jan 18, 2025
Close acatton#14. I adapted the implementation from [ron-rs/ron#451](ron-rs/ron#451). This is a workaround for Serde's internal buffer type used when deserializing via `visit_enum`. Signed-off-by: Jonson Petard <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
previous repo issue: dtolnay/serde-yaml#344
playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5149fbeb995a06e94ecb7e4508ca3b0c
And I have test it via
serde_yaml_ng::from_value::<EnumTy>::(&value)
, it report the same error too.The sample enum could be:
Besides the
#[serde(flatten)]
usage, Just pass aValue::TaggedValue
toserde_yaml::from_value
always failed.Any ideas could be shared here? Thank you.
The text was updated successfully, but these errors were encountered: