summaryrefslogtreecommitdiffstats
path: root/src/2020/5/mod.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-12-01 17:00:31 -0500
committerJesse Luehrs <doy@tozt.net>2021-12-01 17:00:31 -0500
commitf9573cf0b5de23e258791fbdc424fd3abbc4fdc5 (patch)
tree9a46aa790605dbe0a7d3d9de9eebe0a0ac1dc6fb /src/2020/5/mod.rs
parenta40f68453cf4b59f166d70e769ce8fd6ceeeb831 (diff)
downloadadvent-of-code-f9573cf0b5de23e258791fbdc424fd3abbc4fdc5.tar.gz
advent-of-code-f9573cf0b5de23e258791fbdc424fd3abbc4fdc5.zip
simplify getting data
Diffstat (limited to 'src/2020/5/mod.rs')
-rw-r--r--src/2020/5/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/2020/5/mod.rs b/src/2020/5/mod.rs
index e574a45..1fa1147 100644
--- a/src/2020/5/mod.rs
+++ b/src/2020/5/mod.rs
@@ -2,7 +2,7 @@ use anyhow::Context as _;
use std::convert::TryInto as _;
pub fn part1() -> anyhow::Result<i64> {
- let input = crate::util::read_file_str("data/2020/5.txt")?;
+ let input = data_str!()?;
let mut max = 0;
for line in input.lines() {
let id = seat_id(line)?;
@@ -15,7 +15,7 @@ pub fn part1() -> anyhow::Result<i64> {
pub fn part2() -> anyhow::Result<i64> {
let mut seats = vec![false; 1024];
- let input = crate::util::read_file_str("data/2020/5.txt")?;
+ let input = data_str!()?;
for line in input.lines() {
let id = seat_id(line)?;
seats[id as usize] = true;