Enum deserialization broken with 0.9 but worked with 0.8
Closed this issue · 3 comments
razvan commented
Hello,
the title says everything.
I've put together the smallest example I could come up with here which is a stripped down version of this.
Am I doing something wrong ?
Thanks.
Update: here is the error message.
$ cargo run
Compiling serde_yaml_issue v0.1.0 (/home/ubuntu/repo/ubuntu/serde_yaml_issue)
Finished dev [unoptimized + debuginfo] target(s) in 0.40s
Running `target/debug/serde_yaml_issue`
thread 'main' panicked at 'well...this sucks: Error("deepStorage: invalid type: map, expected a YAML tag starting with '!'", line: 3, column: 7)', src/main.rs:41:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
dtolnay commented
The enum representation is one of the differences from 0.8 to 0.9. Refer to https://github.com/dtolnay/serde-yaml/releases/tag/0.9.0. You can serialize a value to see how it's represented.
blake-mealey commented
Is there any way to get the old behaviour with 0.9 or should I stick to 0.8 for that syntax? I find config files more readable with the old way.