From 3528d58cd61461cbfa25299e18ef33171d1568f1 Mon Sep 17 00:00:00 2001 From: Oliver Ford Date: Mon, 11 Mar 2024 22:03:11 +0000 Subject: [PATCH] Update pre-commit hooks, clippy --- .pre-commit-config.yaml | 4 ++-- notmuch-more/src/parse/body.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e6af4b..3571c21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 diff --git a/notmuch-more/src/parse/body.rs b/notmuch-more/src/parse/body.rs index 9400a1c..03f47e8 100644 --- a/notmuch-more/src/parse/body.rs +++ b/notmuch-more/src/parse/body.rs @@ -48,7 +48,7 @@ pub(crate) fn parse_body_part(part: &mailparse::ParsedMail) -> Result { - String::from_utf8(body.get_raw().into()).map_or_else(|_| None, Some) + String::from_utf8(body.get_raw().into()).ok() } _ => None, }, @@ -64,7 +64,7 @@ pub(crate) fn parse_body_part(part: &mailparse::ParsedMail) -> Result { - String::from_utf8(body.get_raw().into()).map_or_else(|_| None, Some) + String::from_utf8(body.get_raw().into()).ok() } _ => None, },