Further improvement - return None if there are no non-zero stats on this round.

This commit is contained in:
Herbert Wolverson 2024-05-14 13:20:06 -05:00
parent 53e5611d50
commit ba694719d4

View File

@ -90,7 +90,11 @@ impl CakeTracker {
up.retain(|u| u.drops > 0 || u.marks > 0);
down.retain(|d| d.drops > 0 || d.marks > 0);
Some((up, down))
if up.is_empty() && down.is_empty() {
None
} else {
Some((up, down))
}
}
}
}