mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 03:16:29 +03:00
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:
@@ -671,7 +671,7 @@ impl MimeMessage {
|
|||||||
&& self
|
&& self
|
||||||
.parts
|
.parts
|
||||||
.get(1)
|
.get(1)
|
||||||
.map_or(false, |filepart| match filepart.typ {
|
.is_some_and(|filepart| match filepart.typ {
|
||||||
Viewtype::Image
|
Viewtype::Image
|
||||||
| Viewtype::Gif
|
| Viewtype::Gif
|
||||||
| Viewtype::Sticker
|
| Viewtype::Sticker
|
||||||
|
|||||||
12
src/sql.rs
12
src/sql.rs
@@ -887,13 +887,11 @@ pub async fn remove_unused_files(context: &Context) -> Result<()> {
|
|||||||
}
|
}
|
||||||
unreferenced_count += 1;
|
unreferenced_count += 1;
|
||||||
let recently_created =
|
let recently_created =
|
||||||
stats.created().map_or(false, |t| t > keep_files_newer_than);
|
stats.created().is_ok_and(|t| t > keep_files_newer_than);
|
||||||
let recently_modified = stats
|
let recently_modified =
|
||||||
.modified()
|
stats.modified().is_ok_and(|t| t > keep_files_newer_than);
|
||||||
.map_or(false, |t| t > keep_files_newer_than);
|
let recently_accessed =
|
||||||
let recently_accessed = stats
|
stats.accessed().is_ok_and(|t| t > keep_files_newer_than);
|
||||||
.accessed()
|
|
||||||
.map_or(false, |t| t > keep_files_newer_than);
|
|
||||||
|
|
||||||
if p == blobdir
|
if p == blobdir
|
||||||
&& (recently_created || recently_modified || recently_accessed)
|
&& (recently_created || recently_modified || recently_accessed)
|
||||||
|
|||||||
Reference in New Issue
Block a user