day06 finished

This commit is contained in:
Ruediger Ludwig 2023-02-02 19:41:46 +01:00
parent 8e4face21e
commit a390ad9988
4 changed files with 124 additions and 1 deletions

View file

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