mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
Make maybe_remove_bad_parts() non-async
This commit is contained in:
@@ -225,7 +225,7 @@ impl MimeMessage {
|
|||||||
failure_report: None,
|
failure_report: None,
|
||||||
};
|
};
|
||||||
parser.parse_mime_recursive(context, &mail).await?;
|
parser.parse_mime_recursive(context, &mail).await?;
|
||||||
parser.maybe_remove_bad_parts().await;
|
parser.maybe_remove_bad_parts();
|
||||||
parser.heuristically_parse_ndn(context).await;
|
parser.heuristically_parse_ndn(context).await;
|
||||||
parser.parse_headers(context)?;
|
parser.parse_headers(context)?;
|
||||||
|
|
||||||
@@ -1010,7 +1010,7 @@ impl MimeMessage {
|
|||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn maybe_remove_bad_parts(&mut self) {
|
fn maybe_remove_bad_parts(&mut self) {
|
||||||
let good_parts = self.parts.iter().filter(|p| !p.dehtml_failed).count();
|
let good_parts = self.parts.iter().filter(|p| !p.dehtml_failed).count();
|
||||||
if good_parts == 0 {
|
if good_parts == 0 {
|
||||||
// We have no good part but show at least one bad part in order to show anything at all
|
// We have no good part but show at least one bad part in order to show anything at all
|
||||||
|
|||||||
Reference in New Issue
Block a user