summaryrefslogtreecommitdiffstats
path: root/src/2020/3/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/2020/3/mod.rs')
-rw-r--r--src/2020/3/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/2020/3/mod.rs b/src/2020/3/mod.rs
index f80bd43..4676a45 100644
--- a/src/2020/3/mod.rs
+++ b/src/2020/3/mod.rs
@@ -5,7 +5,7 @@ struct Map {
}
impl Map {
- fn parse(s: &[u8]) -> anyhow::Result<Self> {
+ fn parse(s: impl Iterator<Item = u8>) -> anyhow::Result<Self> {
let mut grid = vec![];
let mut current_row = vec![];
for c in s {
@@ -79,7 +79,7 @@ pub fn part2() -> anyhow::Result<i64> {
}
fn read_map() -> anyhow::Result<Map> {
- Map::parse(&data_bytes!()?)
+ Map::parse(data_bytes!()?)
}
#[test]