From beeb89a2f6a3cfca6abdcb4ebbc25a536abbfbaf Mon Sep 17 00:00:00 2001 From: "max.nuding" Date: Thu, 1 Dec 2022 07:36:30 +0100 Subject: [PATCH] Day 02 boilerplate --- src/day02/mod.rs | 20 ++++++++++++++++++++ src/main.rs | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/day02/mod.rs diff --git a/src/day02/mod.rs b/src/day02/mod.rs new file mode 100644 index 0000000..136cac4 --- /dev/null +++ b/src/day02/mod.rs @@ -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); + } +} diff --git a/src/main.rs b/src/main.rs index be5e634..6bf39e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ use std::path::Path; use std::time::Instant; use chrono::prelude::*; mod day01; +mod day02; fn main() { let today = Local::now().day(); @@ -10,8 +11,7 @@ fn main() { day01::run(); } if cfg!(feature ="day02") || (cfg!(feature ="today") && today == 2) { - todo!() - //day02::run(); + day02::run(); } println!("Finished, time taken: {:?}", now.elapsed()) }