Add a warning when not running in december
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julius 2021-12-02 14:35:53 +01:00
parent 443632378e
commit 053f4ef153
Signed by: j00lz
GPG key ID: AF241B0AA237BBA2
2 changed files with 6 additions and 3 deletions

View file

@ -9,7 +9,7 @@ enum Instruction {
}
impl Day for Day02 {
fn init(content: String) -> Self where Self: Sized {
fn init(content: String) -> Self {
let lines = content.split("\n").map(str_to_instr).collect::<Vec<Instruction>>();
Day02(lines)
}

View file

@ -57,7 +57,10 @@ fn main() {
run_day(&days, v as usize);
}
} else {
let v = chrono::Local::now().day();
run_day(&days, v as usize)
let v = chrono::Local::now();
if v.month() != 12 {
println!("This was really only meant to be used in december...")
}
run_day(&days, v.day() as usize)
}
}