feat: make time
command less noisy (#56)
This commit is contained in:
parent
c82e1e2c08
commit
234ac70c4e
1 changed files with 19 additions and 18 deletions
|
@ -10,19 +10,20 @@ use super::{
|
||||||
pub fn run_multi(days_to_run: &HashSet<Day>, is_release: bool, is_timed: bool) -> Option<Timings> {
|
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());
|
let mut timings: Vec<Timing> = Vec::with_capacity(days_to_run.len());
|
||||||
|
|
||||||
all_days().for_each(|day| {
|
let mut need_space = false;
|
||||||
if day > 1 {
|
|
||||||
|
// NOTE: use non-duplicate, sorted day values.
|
||||||
|
all_days()
|
||||||
|
.filter(|day| days_to_run.contains(day))
|
||||||
|
.for_each(|day| {
|
||||||
|
if need_space {
|
||||||
println!();
|
println!();
|
||||||
}
|
}
|
||||||
|
need_space = true;
|
||||||
|
|
||||||
println!("{ANSI_BOLD}Day {day}{ANSI_RESET}");
|
println!("{ANSI_BOLD}Day {day}{ANSI_RESET}");
|
||||||
println!("------");
|
println!("------");
|
||||||
|
|
||||||
if !days_to_run.contains(&day) {
|
|
||||||
println!("Skipped.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let output = child_commands::run_solution(day, is_timed, is_release).unwrap();
|
let output = child_commands::run_solution(day, is_timed, is_release).unwrap();
|
||||||
|
|
||||||
if output.is_empty() {
|
if output.is_empty() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue