Skip to content

Commit 10e932a

Browse files
committed
Another fix cargo clippy
1 parent af7a1ba commit 10e932a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/bin/20.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ fn compute_distances(
3939
for (dr, dc) in DIRECTIONS {
4040
let (rr, cc) = (r.wrapping_add(dr as usize), c.wrapping_add(dc as usize));
4141
if g.get(rr)
42-
.and_then(|row| row.get(cc))
43-
.map_or(false, |&cell| cell != b'#')
42+
.and_then(|row| row.get(cc)).is_some_and(|&cell| cell != b'#')
4443
{
4544
q.push_back((rr, cc, n + 1));
4645
}

0 commit comments

Comments
 (0)