day05 finished

This commit is contained in:
Ruediger Ludwig 2023-02-01 21:48:01 +01:00
parent 01f6afed9e
commit 8e4face21e
4 changed files with 780 additions and 1 deletions

View file

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