polish: clean up the examples and move autofmt sample into dedicated file

This commit is contained in:
Jonathan Kelley committed 2022-06-30 15:19:58 -04:00
1 parent 0aec375371
commit 28a0c67275
5 files changed
+251 -508

No files matched your search

+3 -3
View File
@@ -71,9 +71,9 @@ pub fn fmt_block(block: &str) -> Option<String> {
..Buffer::default()
};
for node in syn::parse_str::<dioxus_rsx::CallBody>(block).ok()?.roots {
buf.write_ident(&node).ok()?;
}
let body = syn::parse_str::<dioxus_rsx::CallBody>(block).unwrap();
buf.write_body_indented(&body.roots).unwrap();
buf.consume()
}