diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-01 17:00:31 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-01 17:00:31 -0500 |
commit | f9573cf0b5de23e258791fbdc424fd3abbc4fdc5 (patch) | |
tree | 9a46aa790605dbe0a7d3d9de9eebe0a0ac1dc6fb /src/2020/2/mod.rs | |
parent | a40f68453cf4b59f166d70e769ce8fd6ceeeb831 (diff) | |
download | advent-of-code-f9573cf0b5de23e258791fbdc424fd3abbc4fdc5.tar.gz advent-of-code-f9573cf0b5de23e258791fbdc424fd3abbc4fdc5.zip |
simplify getting data
Diffstat (limited to 'src/2020/2/mod.rs')
-rw-r--r-- | src/2020/2/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/2020/2/mod.rs b/src/2020/2/mod.rs index d2cf88d..0f9af6a 100644 --- a/src/2020/2/mod.rs +++ b/src/2020/2/mod.rs @@ -65,8 +65,7 @@ pub fn part2() -> anyhow::Result<i64> { } fn read_lines() -> anyhow::Result<Vec<Line>> { - let f = std::fs::File::open("data/2020/2.txt") - .context("couldn't find data file 2.txt")?; + let f = data!()?; let f = std::io::BufReader::new(f); f.lines() .map(|l| Line::parse(&l.context("failed to read a line")?)) |