Format code with cargo fmt

This commit is contained in:
Russell Champoux committed 2025-12-05 11:53:54 -05:00
1 parent d3bc3493ee
commit 6f492ae3a1
3 files changed
+23 -6

No files matched your search

+4 -1
View File
@@ -41,7 +41,10 @@ fn count_neighbors(grid: &[Vec<Cell>], row: usize, col: usize) -> usize {
}
let nr = row as i32 + dr;
let nc = col as i32 + dc;
if nr >= 0 && nr < rows && nc >= 0 && nc < cols
if nr >= 0
&& nr < rows
&& nc >= 0
&& nc < cols
&& grid[nr as usize][nc as usize].is_paper()
{
count += 1;