feat: make time command less noisy

This commit is contained in:
Tristan Guichaoua 2023-12-11 12:32:53 +01:00
parent c82e1e2c08
commit 0686723abf

View file

@ -10,19 +10,19 @@ 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: we didn't want duplicate day value, but we want days to be sorted.
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() {