This commit is contained in:
Spectre 2024-12-03 02:06:24 +01:00
parent 19fe0a53ff
commit 2c9790a690
7 changed files with 48 additions and 26 deletions

View file

@ -5,7 +5,8 @@ pub fn load_actual(year: usize, day: usize) -> io::Result<String> {
fs::read_to_string(path)
}
pub fn load_test(year: usize, day: usize) -> io::Result<String> {
let path = format!("./examples/{year}/day{:02}", day);
fs::read_to_string(path)
pub fn load_test(year: usize, day: usize) -> (io::Result<String>, io::Result<String>) {
let input_path = format!("./examples/{year}/day{:02}", day);
let result_path = format!("./examples/{year}/day{:02}_solution", day);
(fs::read_to_string(input_path), fs::read_to_string(result_path))
}