feat: make time command less noisy (#56)

This commit is contained in:
Tristan Guichaoua 2023-12-11 12:59:21 +01:00 committed by GitHub
parent c82e1e2c08
commit 234ac70c4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,19 +10,20 @@ use super::{
pub fn run_multi(days_to_run: &HashSet<Day>, is_release: bool, is_timed: bool) -> Option<Timings> {
let mut timings: Vec<Timing> = Vec::with_capacity(days_to_run.len());
all_days().for_each(|day| {
if day > 1 {
let mut need_space = false;
// NOTE: use non-duplicate, sorted day values.
all_days()
.filter(|day| days_to_run.contains(day))
.for_each(|day| {
if need_space {
println!();
}
need_space = true;
println!("{ANSI_BOLD}Day {day}{ANSI_RESET}");
println!("------");
if !days_to_run.contains(&day) {
println!("Skipped.");
return;
}
let output = child_commands::run_solution(day, is_timed, is_release).unwrap();
if output.is_empty() {