replace gitignore with ignore

This commit is contained in:
Dangerise committed 2024-02-06 20:53:28 +08:00
1 parent 2eec2bc673
commit f40e2f3cef
5 files changed
+78 -106

No files matched your search

+7
View File
@@ -240,3 +240,10 @@ pub(crate) fn write_ifmt(input: &IfmtInput, writable: &mut impl Write) -> std::f
let display = DisplayIfmt(input);
write!(writable, "{}", display)
}
/// Call rustfmt to format code, i32 as exitcode
pub fn rustfmt(input: &str) -> Option<String> {
let syntax_tree = syn::parse_file(input).ok()?;
let output = prettyplease::unparse(&syntax_tree);
Some(output)
}