Skip to content

Commit bcd045e

Browse files
committed
Stop rustfmt from trying to find and format submodules
1 parent 4004e73 commit bcd045e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/util.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,17 @@ pub(crate) fn run_formatter(path: &Utf8Path) {
2929
};
3030

3131
let (formatter, args) = match file_ext {
32-
"rs" => ("rustfmt", ["+nightly", "--edition", "2021"].as_slice()),
32+
"rs" => (
33+
"rustfmt",
34+
[
35+
"+nightly",
36+
"--unstable-features",
37+
"--skip-children",
38+
"--edition",
39+
"2021",
40+
]
41+
.as_slice(),
42+
),
3343
"go" => ("gofmt", ["-w"].as_slice()),
3444
"kt" => ("ktfmt", ["--kotlinlang-style"].as_slice()),
3545
_ => {

0 commit comments

Comments
 (0)