diff --git a/src/solution.rs b/src/solution.rs
index 7ea35f3..bae0c7c 100644
--- a/src/solution.rs
+++ b/src/solution.rs
@@ -19,7 +19,7 @@ pub trait Solution {
fn part_1(input: &Input) -> Output;
fn part_2(input: &Input) -> Output;
- fn main() -> Result<()>
+ fn run(type_of_input: &str) -> Result<()>
where
Self: Sized,
{
@@ -33,13 +33,20 @@ pub trait Solution {
.init();
color_eyre::install()?;
- let input = Self::parse_input(format!("inputs/{}.txt", Self::day()));
+ let input = Self::parse_input(format!("{}s/{}.txt", type_of_input, Self::day()));
info!("Part 1: {}", Self::part_1(&input));
info!("Part 2: {}", Self::part_2(&input));
Ok(())
}
+
+ fn main() -> Result<()>
+ where
+ Self: Sized,
+ {
+ Self::run("input")
+ }
}
#[macro_export]