Closed vikigenius closed 2 years ago
Ok, I just got it, the new version forces the usage of tags. So this works
fn main() {
let yaml_string = r#"
!Text
text: "Example"
fg_color: "blue"
bg_color: "black"
"#;
let widget: WidgetProps = serde_yaml::from_str(yaml_string).unwrap();
dbg!(widget);
}
Glad you figured it out!
I have the following snippet of code
This works fine with the 0.8 version of serde_yaml. But on upgrading to 0.9 versions (latest) it panics saying