Clippy fixes

This commit is contained in:
mdecimus
2025-08-18 11:44:58 +01:00
parent d6531be012
commit e10aa551eb
102 changed files with 1336 additions and 1411 deletions

View File

@@ -33,18 +33,17 @@ pub(crate) async fn update_email_cache(
};
for (document_id, is_update) in changed_ids {
if *is_update {
if let Some(archive) = server
if *is_update
&& let Some(archive) = server
.get_archive(account_id, Collection::Email, *document_id)
.await
.caused_by(trc::location!())?
{
insert_item(
&mut new_cache,
*document_id,
archive.to_unarchived::<MessageData>()?,
);
}
{
insert_item(
&mut new_cache,
*document_id,
archive.to_unarchived::<MessageData>()?,
);
}
}

View File

@@ -28,18 +28,17 @@ pub(crate) async fn update_mailbox_cache(
};
for (document_id, is_update) in changed_ids {
if *is_update {
if let Some(archive) = server
if *is_update
&& let Some(archive) = server
.get_archive(account_id, Collection::Mailbox, *document_id)
.await
.caused_by(trc::location!())?
{
insert_item(
&mut new_cache,
*document_id,
archive.unarchive::<Mailbox>()?,
);
}
{
insert_item(
&mut new_cache,
*document_id,
archive.unarchive::<Mailbox>()?,
);
}
}