Skip to content

Commit f47cdde

Browse files
committed
refactor(16/2024): make code more rusty
1 parent c217286 commit f47cdde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/solutions/year2024/day16.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ impl Day16 {
5959
vectors
6060
.into_iter()
6161
.filter(|vec| {
62-
let element = grid.get_for_point(&vec.position());
63-
element == Some(&'.') || element == Some(&'E')
62+
grid.get_for_point(&vec.position())
63+
.is_some_and(|element| ['.', 'E'].contains(element))
6464
})
6565
.collect_vec()
6666
})

0 commit comments

Comments
 (0)