day5: fix build error

This commit is contained in:
Ishan Jain 2023-12-05 16:41:25 +05:30
parent b478bfaf9d
commit dbe738c17e
Signed by: ishan
GPG Key ID: 0506DB2A1CC75C27

View File

@ -31,15 +31,13 @@ fn process(data: &str) -> i64 {
.lines() .lines()
.skip(1) .skip(1)
.map(|line| { .map(|line| {
line.split_ascii_whitespace() let y: Vec<i64> = line
.split_ascii_whitespace()
.map(|y| y.parse::<i64>().unwrap()) .map(|y| y.parse::<i64>().unwrap())
.array_chunks::<2>() .collect();
.map(|y| { let size = y[2];
let size = y[2];
(y[1]..y[1] + size, y[0]..y[0] + size) (y[1]..y[1] + size, y[0]..y[0] + size)
})
.collect()
}) })
.collect() .collect()
}) })