fix(clippy): 修复 collapsible_match 和 unnecessary_sort_by 警告

This commit is contained in:
fawney19
2026-04-17 01:12:43 +08:00
parent 05ab09c469
commit 6730e821b2
3 changed files with 22 additions and 28 deletions

View File

@@ -117,7 +117,7 @@ impl VideoTaskReadRepository for InMemoryVideoTaskRepository {
.filter(|task| task.status.is_active())
.cloned()
.collect::<Vec<_>>();
tasks.sort_by(|left, right| right.updated_at_unix_secs.cmp(&left.updated_at_unix_secs));
tasks.sort_by_key(|right| std::cmp::Reverse(right.updated_at_unix_secs));
tasks.truncate(limit);
Ok(tasks)
}