diff options
author | mathiasmagnusson <mathiasmagnussons@gmail.com> | 2022-12-09 18:00:02 +0100 |
---|---|---|
committer | mathiasmagnusson <mathiasmagnussons@gmail.com> | 2022-12-09 18:00:02 +0100 |
commit | e41e6c8bc72e3300a0fa137f198454341bc315b1 (patch) | |
tree | a26e34327b7e68adf9b1dc802a897b9b0626de86 /aoc22/lib/src | |
parent | 444d543b1af11ff8718cf07c690944ddacb29105 (diff) | |
download | programming-problem-solving-e41e6c8bc72e3300a0fa137f198454341bc315b1.tar.gz |
Add aoc
Diffstat (limited to 'aoc22/lib/src')
-rw-r--r-- | aoc22/lib/src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/aoc22/lib/src/lib.rs b/aoc22/lib/src/lib.rs new file mode 100644 index 0000000..ffe4e46 --- /dev/null +++ b/aoc22/lib/src/lib.rs @@ -0,0 +1,9 @@ +use std::fs; + +pub mod prelude { + pub use std::error::Error; +} + +pub fn read_input(day: usize) -> String { + fs::read_to_string(format!("day{}/input", day)).expect("Could not read input") +} |