Add day03 boilerplate
This commit is contained in:
parent
5a02a5bbe9
commit
8ae82163b4
23
src/day03/mod.rs
Normal file
23
src/day03/mod.rs
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -3,6 +3,7 @@ use std::path::Path;
|
|||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
mod day01;
|
mod day01;
|
||||||
mod day02;
|
mod day02;
|
||||||
|
mod day03;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let today = Local::now().day();
|
let today = Local::now().day();
|
||||||
@ -13,6 +14,9 @@ fn main() {
|
|||||||
if cfg!(feature = "day02") || (cfg!(feature = "today") && today == 2) {
|
if cfg!(feature = "day02") || (cfg!(feature = "today") && today == 2) {
|
||||||
day02::run();
|
day02::run();
|
||||||
}
|
}
|
||||||
|
if cfg!(feature = "day03") || (cfg!(feature = "today") && today == 3) {
|
||||||
|
day03::run();
|
||||||
|
}
|
||||||
println!("Finished, time taken: {:?}", now.elapsed())
|
println!("Finished, time taken: {:?}", now.elapsed())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user