fix: use strict > for min-count filters in wrapup stats
Some checks failed
CI / Check / Test (push) Failing after 8m38s
Some checks failed
CI / Check / Test (push) Failing after 8m38s
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user