qol
This commit is contained in:
parent
19fe0a53ff
commit
2c9790a690
7 changed files with 48 additions and 26 deletions
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue