We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1cc61cf + a2da636 commit 4609252Copy full SHA for 4609252
src/cargo-fmt/main.rs
@@ -322,7 +322,8 @@ fn run_rustfmt(
322
fmt_args: &[String],
323
verbosity: Verbosity,
324
) -> Result<i32, io::Error> {
325
- let by_edition = targets
+ let default_edition = String::from("2015");
326
+ let mut by_edition = targets
327
.iter()
328
.inspect(|t| {
329
if verbosity == Verbosity::Verbose {
@@ -334,6 +335,9 @@ fn run_rustfmt(
334
335
h.entry(t.0).or_insert_with(Vec::new).push(t.1);
336
h
337
});
338
+ if by_edition.is_empty() {
339
+ by_edition.insert(&default_edition, Vec::new());
340
+ }
341
342
for (edition, files) in by_edition {
343
let stdout = if verbosity == Verbosity::Quiet {
0 commit comments