fix(clippy): use sort_by_key in findurl (clippy 1.96 unnecessary_sort_by)

CI's stable toolchain is clippy 1.96, which flags unnecessary_sort_by that local
1.94 did not. hits.sort_by(|a,b| b.date_added.cmp(&a.date_added)) -> sort_by_key
with Reverse.
This commit is contained in:
leeguooooo
2026-06-10 12:04:39 +09:00
parent d95d32831e
commit 68e2e351b1
+1 -1
View File
@@ -90,7 +90,7 @@ pub fn run_find_url(args: &[String], json: bool) {
}
// Most-recently-added first (date_added is microseconds since 1601).
hits.sort_by(|a, b| b.date_added.cmp(&a.date_added));
hits.sort_by_key(|b| std::cmp::Reverse(b.date_added));
hits.truncate(limit);
if json {