From 8ae82163b4aec7636af9fafa0ac6685700bb54ba Mon Sep 17 00:00:00 2001 From: "max.nuding" Date: Fri, 2 Dec 2022 07:53:41 +0100 Subject: [PATCH] Add day03 boilerplate --- src/day03/mod.rs | 23 +++++++++++++++++++++++ src/main.rs | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 src/day03/mod.rs diff --git a/src/day03/mod.rs b/src/day03/mod.rs new file mode 100644 index 0000000..17520bf --- /dev/null +++ b/src/day03/mod.rs @@ -0,0 +1,23 @@ +use crate::read; + + +pub fn run() { + let input = read("02"); + let lines = input + .lines() + .map(|l| { + l + }); + + #[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 e60a60d..ba1462d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,7 @@ use std::path::Path; use std::time::Instant; mod day01; mod day02; +mod day03; fn main() { let today = Local::now().day(); @@ -13,6 +14,9 @@ fn main() { if cfg!(feature = "day02") || (cfg!(feature = "today") && today == 2) { day02::run(); } + if cfg!(feature = "day03") || (cfg!(feature = "today") && today == 3) { + day03::run(); + } println!("Finished, time taken: {:?}", now.elapsed()) }