We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
dev check
1 parent 57b3727 commit e8da686Copy full SHA for e8da686
1 file changed
src/dev/check.rs
@@ -354,16 +354,18 @@ fn check_solutions(
354
}
355
stdout.write_all(b"\n")?;
356
357
+ let n_solutions = sol_paths.len();
358
let handle = thread::Builder::new()
359
.spawn(move || check_unexpected_files("solutions", &sol_paths))
360
.context(
361
"Failed to spawn a thread to check for unexpected files in the solutions directory",
362
)?;
363
- if !fmt_cmd
364
- .status()
365
- .context("Failed to run `rustfmt` on all solution files")?
366
- .success()
+ if n_solutions > 0
+ && !fmt_cmd
+ .status()
367
+ .context("Failed to run `rustfmt` on all solution files")?
368
+ .success()
369
{
370
bail!("Some solutions aren't formatted. Run `rustfmt` on them");
371
0 commit comments