day10 finished

This commit is contained in:
Ruediger Ludwig 2023-02-05 16:12:44 +01:00
parent f630ef6874
commit 54fd03233a
6 changed files with 464 additions and 2 deletions

View file

@ -7,6 +7,7 @@ mod day06;
mod day07;
mod day08;
mod day09;
mod day10;
mod template;
pub use template::DayTrait;
@ -16,7 +17,7 @@ pub mod day_provider {
use super::*;
use thiserror::Error;
const MAX_DAY: usize = 9;
const MAX_DAY: usize = 10;
pub fn get_day(day_num: usize) -> Result<Box<dyn DayTrait>, ProviderError> {
match day_num {
@ -29,6 +30,7 @@ pub mod day_provider {
7 => Ok(Box::new(day07::Day)),
8 => Ok(Box::new(day08::Day)),
9 => Ok(Box::new(day09::Day)),
10 => Ok(Box::new(day10::Day)),
_ => Err(ProviderError::InvalidNumber(day_num)),
}
}