day03 finished

This commit is contained in:
Ruediger Ludwig 2023-01-28 06:00:12 +01:00
parent eb1ce68486
commit d7c85a75f6
8 changed files with 534 additions and 37 deletions

View file

@ -1,5 +1,6 @@
mod day01;
mod day02;
mod day03;
mod template;
pub use template::DayTrait;
@ -9,12 +10,13 @@ pub mod day_provider {
use super::*;
use thiserror::Error;
const MAX_DAY: usize = 2;
const MAX_DAY: usize = 3;
pub fn get_day(day_num: usize) -> Result<Box<dyn DayTrait>, ProviderError> {
match day_num {
1 => Ok(Box::new(day01::Day)),
2 => Ok(Box::new(day02::Day)),
3 => Ok(Box::new(day03::Day)),
_ => Err(ProviderError::InvalidNumber(day_num)),
}
}