polish: clean up the examples and move autofmt sample into dedicated file
This commit is contained in:
1 parent
0aec375371
commit
28a0c67275
5 files changed
+251
-508
No files matched your search
@@ -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()
|
||||
}
|
||||
Reference in new issue
Block a user