replace gitignore with ignore
This commit is contained in:
1 parent
2eec2bc673
commit
f40e2f3cef
5 files changed
+78
-106
No files matched your search
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user