Day 02 boilerplate

This commit is contained in:
max.nuding 2022-12-01 07:36:30 +01:00
parent 64851dd68b
commit beeb89a2f6
Failed to extract signature
2 changed files with 22 additions and 2 deletions

20
src/day02/mod.rs Normal file
View File

@ -0,0 +1,20 @@
use crate::read;
pub fn run() {
let input = read("02");
let lines = input.lines();
#[cfg(feature="part1")]
{
let a = "TODO";
eprintln!("Day 2, Part 01: {}", a);
}
#[cfg(feature="part2")]
{
let b = "TODO";
eprintln!("Day 2, Part 02: {}", b);
}
}

View File

@ -2,6 +2,7 @@ use std::path::Path;
use std::time::Instant; use std::time::Instant;
use chrono::prelude::*; use chrono::prelude::*;
mod day01; mod day01;
mod day02;
fn main() { fn main() {
let today = Local::now().day(); let today = Local::now().day();
@ -10,8 +11,7 @@ fn main() {
day01::run(); day01::run();
} }
if cfg!(feature ="day02") || (cfg!(feature ="today") && today == 2) { if cfg!(feature ="day02") || (cfg!(feature ="today") && today == 2) {
todo!() day02::run();
//day02::run();
} }
println!("Finished, time taken: {:?}", now.elapsed()) println!("Finished, time taken: {:?}", now.elapsed())
} }