File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -267,13 +267,11 @@ impl MessageParser {
267
267
let is_inline = is_inline
268
268
&& part_headers
269
269
. 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 ( ) ) )
273
271
&& ( state. parts == 1
274
272
|| state. mime_type != MimeType :: MultipartRelated
275
273
&& ( 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" ) ) ) ) ;
277
275
278
276
// if message consists of single text/plain part, classify as text regardless
279
277
// of encoding issues: see malformed/018.eml
You can’t perform that action at this time.
0 commit comments