toml icon indicating copy to clipboard operation
toml copied to clipboard

Error when trying to serialize untagged enums

Open TheAlan404 opened this issue 1 year ago • 1 comments

Here's the playground to reproduce the issue. It panics with UnsupportedType(Some("Magic"))

serde_json can do it, but toml cant.

TheAlan404 avatar Jul 27 '23 12:07 TheAlan404

This works again: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c8b2eef4cc3ec5e6c6313f217876dbd8

Same is true for this: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1ba661d64abfd56fb307a11a67b916cf

So, to me it looks related to anonymous structs as enum variant.

jonasthewolf avatar Jul 30 '23 18:07 jonasthewolf