Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sftse committed Dec 12, 2023
1 parent 705c82d commit aef66c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions src/parsers/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,10 @@ impl MessageParser {
} else {
PartType::Text(text)
}
} else if !is_inline {
PartType::Binary(bytes)
} else {
if !is_inline {
PartType::Binary(bytes)
} else {
PartType::InlineBinary(bytes)
}
PartType::InlineBinary(bytes)
}
} else {
message.attachments.push(message.parts.len());
Expand Down
6 changes: 3 additions & 3 deletions src/parsers/mime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ impl<'x> MessageStream<'x> {
self.checkpoint();

match (self.next(), self.peek()) {
(Some(&a), Some(&&b)) if a == b'\r' && b == b'\n' => {
(Some(b'\r'), Some(b'\n')) => {
self.next();
false
}
(Some(&a), Some(&&b)) if a == b'-' && b == b'-' => {
(Some(b'-'), Some(b'-')) => {
self.next();
true
}
(Some(&a), _) if a == b'\n' => false,
(Some(b'\n'), _) => false,
(Some(&a), _) if a.is_ascii_whitespace() => {
self.skip_crlf();
false
Expand Down

0 comments on commit aef66c0

Please sign in to comment.