chore: Beta clippy suggestions (#6271)

Already apply rust beta (1.84) clippy suggestions now, before they let
CI fail in 6 weeks.

The newly used functions are available since 1.70, our MSRV is 1.77, so
we can use them.
This commit is contained in:
Hocuri
2024-12-02 19:57:01 +01:00
committed by GitHub
parent 06a7c63f2d
commit 587ea02ffa
2 changed files with 6 additions and 8 deletions

View File

@@ -887,13 +887,11 @@ pub async fn remove_unused_files(context: &Context) -> Result<()> {
}
unreferenced_count += 1;
let recently_created =
stats.created().map_or(false, |t| t > keep_files_newer_than);
let recently_modified = stats
.modified()
.map_or(false, |t| t > keep_files_newer_than);
let recently_accessed = stats
.accessed()
.map_or(false, |t| t > keep_files_newer_than);
stats.created().is_ok_and(|t| t > keep_files_newer_than);
let recently_modified =
stats.modified().is_ok_and(|t| t > keep_files_newer_than);
let recently_accessed =
stats.accessed().is_ok_and(|t| t > keep_files_newer_than);
if p == blobdir
&& (recently_created || recently_modified || recently_accessed)