From d139374ef1518c5bd4e5c84e1d88263fdda2e15c Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 4 Dec 2018 16:17:14 +0100 Subject: Day 4 --- 2018/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '2018/src/main.rs') diff --git a/2018/src/main.rs b/2018/src/main.rs index 349d857..98c0f7b 100644 --- a/2018/src/main.rs +++ b/2018/src/main.rs @@ -1,3 +1,5 @@ +#[macro_use] extern crate lazy_static; +extern crate regex; extern crate argparse; use std::io; @@ -9,12 +11,14 @@ use argparse::{ArgumentParser, StoreTrue, Store}; mod day1; mod day2; mod day3; +mod day4; fn day_switch(day: i32, reader: T) -> io::Result<()> { match day { 1 => day1::main(reader), 2 => day2::main(reader), 3 => day3::main(reader), + 4 => day4::main(reader), _ => Err(Error::new(ErrorKind::Other, "Invalid day")) } } @@ -70,7 +74,7 @@ fn main() -> io::Result<()> { error_handler(|| if day_string.len() == 0 { - for day in 1..4 { + for day in 1..5 { run_day(day, &options)?; } Ok(()) -- cgit v1.2.3-70-g09d2