Add in the prettyprinting bit in the svd example, which still doesn't work yet properly in master.

This commit is contained in:
Roman Valls Guimera 2021-02-08 22:42:49 +11:00
parent 4f52732a71
commit e506cb1e92

View File

@ -180,5 +180,10 @@ fn main() {
devattributes: dev_attrs
};
println!("{:?}", yaserde::ser::to_string(&dev).ok().unwrap());
}
// Display pretty printed XML
let yaserde_cfg = yaserde::ser::Config{
perform_indent: true,
.. Default::default()
};
println!("{:#?}", yaserde::ser::to_string_with_config(&dev, &yaserde_cfg));
}