From a22fbfbaee63cc4e562155f6aa3252d28a7c2af4 Mon Sep 17 00:00:00 2001 From: Daniel Seiller Date: Fri, 18 Dec 2020 03:14:16 +0100 Subject: [PATCH] cargo fmt --- src/day13.rs | 2 +- src/day17p1.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/day13.rs b/src/day13.rs index bc5fe4a..e138b83 100644 --- a/src/day13.rs +++ b/src/day13.rs @@ -55,7 +55,7 @@ pub fn solve_part2(input: &Data) -> i64 { let target: i64 = b.iter().map(|(_, b)| b).product(); loop { let mut cnt = 0; - let dt: i64= b + let dt: i64 = b .iter() .filter_map(|(i, n)| { if (t + i) % n == 0 { diff --git a/src/day17p1.rs b/src/day17p1.rs index 63191b7..06f992e 100644 --- a/src/day17p1.rs +++ b/src/day17p1.rs @@ -24,6 +24,7 @@ impl Data { } ret } + pub fn update(&mut self) { let mut checked = HashSet::new(); let mut next_active = HashSet::new(); @@ -37,7 +38,7 @@ impl Data { } let nb = self.count_neighbors(nx, ny, nz); let is_active = self.active.contains(&(nx, ny, nz)); - if nb == 3 || is_active && nb == 2 { + if nb == 3 || is_active && nb == 2 { next_active.insert((nx, ny, nz)); } }