Skip to content

Commit

Permalink
Update pre-commit hooks, clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
OJFord committed Mar 11, 2024
1 parent 4baf968 commit 3528d58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: check-json
Expand All @@ -16,7 +16,7 @@ repos:
- id: clippy

- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.83.2
rev: v1.88.1
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand Down
4 changes: 2 additions & 2 deletions notmuch-more/src/parse/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub(crate) fn parse_body_part(part: &mailparse::ParsedMail) -> Result<EmlBody, N
},
content_base64: match part.get_body_encoded() {
mailparse::body::Body::Base64(body) => {
String::from_utf8(body.get_raw().into()).map_or_else(|_| None, Some)
String::from_utf8(body.get_raw().into()).ok()
}
_ => None,
},
Expand All @@ -64,7 +64,7 @@ pub(crate) fn parse_body_part(part: &mailparse::ParsedMail) -> Result<EmlBody, N
content: part.get_body()?,
content_base64: match part.get_body_encoded() {
mailparse::body::Body::Base64(body) => {
String::from_utf8(body.get_raw().into()).map_or_else(|_| None, Some)
String::from_utf8(body.get_raw().into()).ok()
}
_ => None,
},
Expand Down

0 comments on commit 3528d58

Please sign in to comment.