#3365: sort the unmapped effects with sort_by_key (clippy)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
arnav-hiwarkarandClaude Opus 5.5 committed 2026-11-11 17:15:43 +05:30
1 parent 1f38431faf
commit 6708964046
1 file changed
+1 -1
+1 -1
View File
@@ -316,7 +316,7 @@ impl Collector {
if let Some(loss) = self.losses.get_mut(&LossCategory::Effects) {
// The most used effects first.
let mut named: Vec<(String, usize)> = std::mem::take(&mut self.unmapped_effects).into_values().collect();
named.sort_by(|a, b| b.1.cmp(&a.1));
named.sort_by_key(|n| std::cmp::Reverse(n.1));
let described = named.iter().fold(0usize, |sum, (_, n)| sum.saturating_add(*n));
loss.unlisted = loss.unlisted.saturating_sub(described);
let lines = named.into_iter().map(|(first, n)| match n {