Add a warning when not running in december
continuous-integration/drone/push Build is passing Details

pull/1/head
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)
}
}