cargo fmt

This commit is contained in:
Daniel S. 2020-12-18 03:14:16 +01:00
parent 3a72256177
commit a22fbfbaee
2 changed files with 3 additions and 2 deletions

View file

@ -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 {

View file

@ -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));
}
}