Format all

This commit is contained in:
James Hogge
2025-12-27 06:45:39 +00:00
parent 0db0cff560
commit 4533333153
8 changed files with 187 additions and 134 deletions
+2 -4
View File
@@ -15,9 +15,7 @@ const NEIGHBOURS: [(i32, i32); 8] = [
];
fn parse_grid_line(line: &str) -> Vec<bool> {
line.chars()
.map(|c| c == '@')
.collect()
line.chars().map(|c| c == '@').collect()
}
fn get_grid_cell(grid: &[Vec<bool>], x: i32, y: i32) -> bool {
@@ -65,7 +63,7 @@ fn main() -> Result<(), io::Error> {
.lines()
.map(|line| Ok(parse_grid_line(&line?)))
.collect::<Result<_, io::Error>>()?;
let mut current_grid = original_grid.clone();
let last_grid = loop {
let next_grid = update_grid(&current_grid);