fix: use strict > for min-count filters in wrapup stats
Some checks failed
CI / Check / Test (push) Failing after 8m38s

This commit is contained in:
2026-07-10 21:42:29 +02:00
parent 587dcc04de
commit 1a7448fd3d

View File

@@ -230,7 +230,7 @@ fn compute_director_stats(rows: &[WrapUpMovieRow]) -> (Vec<PersonStat>, u32) {
} }
}) })
.collect(); .collect();
stats.retain(|s| s.count >= MIN_PERSON_COUNT); stats.retain(|s| s.count > MIN_PERSON_COUNT);
stats.sort_by(|a, b| { stats.sort_by(|a, b| {
b.count b.count
.cmp(&a.count) .cmp(&a.count)
@@ -275,7 +275,7 @@ fn compute_actor_stats(rows: &[WrapUpMovieRow]) -> (Vec<PersonStat>, u32, Vec<St
} }
}) })
.collect(); .collect();
stats.retain(|s| s.count >= MIN_PERSON_COUNT); stats.retain(|s| s.count > MIN_PERSON_COUNT);
stats.sort_by(|a, b| { stats.sort_by(|a, b| {
b.count b.count
.cmp(&a.count) .cmp(&a.count)
@@ -321,7 +321,7 @@ fn compute_genre_stats(
.map(|g| g.genre.clone()); .map(|g| g.genre.clone());
let lowest = stats let lowest = stats
.iter() .iter()
.filter(|g| g.count >= 3) .filter(|g| g.count > 3)
.min_by(|a, b| a.avg_rating.total_cmp(&b.avg_rating)) .min_by(|a, b| a.avg_rating.total_cmp(&b.avg_rating))
.map(|g| g.genre.clone()); .map(|g| g.genre.clone());
stats.truncate(5); stats.truncate(5);