Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

clippy

Richie McIlroy1507c61e463f
diff --git a/crates/rendering/src/decoder/multi_position.rs b/crates/rendering/src/decoder/multi_position.rs
index 318c0d4d8..98e7cd97e 100644
--- a/crates/rendering/src/decoder/multi_position.rs
+++ b/crates/rendering/src/decoder/multi_position.rs
@@ -204,7 +204,7 @@ impl DecoderPoolManager {
.iter()
.map(|(&frame, &count)| (frame, count))
.collect();
- hotspots.sort_by(|a, b| b.1.cmp(&a.1));
+ hotspots.sort_by_key(|b| std::cmp::Reverse(b.1));
let top_hotspots: Vec<f32> = hotspots
.into_iter()
diff --git a/crates/scap-targets/src/platform/macos.rs b/crates/scap-targets/src/platform/macos.rs
index 7436b01e5..3b7b13963 100644
--- a/crates/scap-targets/src/platform/macos.rs
+++ b/crates/scap-targets/src/platform/macos.rs
@@ -290,7 +290,7 @@ impl WindowImpl {
})
.collect::<Vec<_>>();
- windows_with_level.sort_by(|a, b| b.1.cmp(&a.1));
+ windows_with_level.sort_by_key(|b| std::cmp::Reverse(b.1));
windows_with_level.first().map(|(window, _)| *window)
}