Skip to content

Commit b0ba8db

Browse files
committed
Clippy fix
1 parent 60fe70d commit b0ba8db

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/parsers/message.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,11 @@ impl MessageParser {
267267
let is_inline = is_inline
268268
&& part_headers
269269
.header_value(&HeaderName::ContentDisposition)
270-
.map_or(true, |d| {
271-
!d.as_content_type().is_some_and(|ct| ct.is_attachment())
272-
})
270+
.is_none_or(|d| !d.as_content_type().is_some_and(|ct| ct.is_attachment()))
273271
&& (state.parts == 1
274272
|| state.mime_type != MimeType::MultipartRelated
275273
&& (mime_type == MimeType::Inline
276-
|| content_type.map_or(true, |c| !c.has_attribute("name"))));
274+
|| content_type.is_none_or(|c| !c.has_attribute("name"))));
277275

278276
// if message consists of single text/plain part, classify as text regardless
279277
// of encoding issues: see malformed/018.eml

0 commit comments

Comments
 (0)