2022 rust day 12

This commit is contained in:
Maciej Jur 2022-12-12 17:38:48 +01:00
parent 9ee78e0f27
commit 5093aae3e3

View file

@ -90,7 +90,7 @@ fn solve1((start, goal, grid): &Data) -> usize {
fn solve2((_, goal, grid): &Data) -> usize { fn solve2((_, goal, grid): &Data) -> usize {
// very ineffective! ideally we should execute the algorithm just once // TODO: very ineffective! ideally we should execute the algorithm just once
grid.cell_indices() grid.cell_indices()
.filter_map(|index| match grid[index] == 0 { .filter_map(|index| match grid[index] == 0 {
true => Some(index), true => Some(index),