mirror of
https://github.com/RussellChamp/advent-of-code-2025-cursor.git
synced 2026-10-27 23:52:34 +00:00
Format code with cargo fmt
This commit is contained in:
1 parent
d3bc3493ee
commit
6f492ae3a1
3 files changed
+23
-6
No files matched your search
+4
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user