This commit is contained in:
spectre 2023-12-04 01:00:28 +01:00
commit 1299527ab2
19 changed files with 1335 additions and 0 deletions

6
src/load_data.rs Normal file
View file

@ -0,0 +1,6 @@
use std::{fs, io};
pub fn load(year: u32, day:u32) -> io::Result<String> {
let path = format!("./data/{year}/day{:02}", day);
fs::read_to_string(path)
}

12
src/main.rs Normal file
View file

@ -0,0 +1,12 @@
use shared::Solution;
mod load_data;
use aoc2023;
use load_data::load;
fn main() {
let Ok(data) = load(2023, 1)
else { return; };
print!("{}", aoc2023::day02::Day02.part_1(&data));
}