1
0
Fork 0

day(11): format the expression

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2023-12-11 11:33:47 +01:00
parent bcdea3496b
commit 63d495b175
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -34,7 +34,12 @@ impl Day11 {
let min_x = min(x0, x1);
let max_x = max(x0, x1);
xd += to_add * self.empty_xs.iter().filter(|&&x| min_x < x && x < max_x).count();
xd += to_add
* self
.empty_xs
.iter()
.filter(|&&x| min_x < x && x < max_x)
.count();
yd += to_add * self.empty_ys.iter().filter(|&&y| y0 < y && y < y1).count();
xd + yd