From 89c47ebe1f4ef48c5392756345de4d634f1cab4f Mon Sep 17 00:00:00 2001 From: phiresky Date: Tue, 16 Jan 2024 00:13:50 +0100 Subject: [PATCH] clippy fix --- flake.nix | 2 +- src/adapters/mbox.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 1fefdca..19bacb9 100644 --- a/flake.nix +++ b/flake.nix @@ -117,7 +117,7 @@ typos = { enable = true; types = [ "text" ]; - excludes = [ "exampledir/.*" ]; + excludes = [ "exampledir/*" ]; }; }; }; diff --git a/src/adapters/mbox.rs b/src/adapters/mbox.rs index 9004c68..ee39d0d 100644 --- a/src/adapters/mbox.rs +++ b/src/adapters/mbox.rs @@ -71,7 +71,7 @@ impl FileAdapter for MboxAdapter { let mut ais = vec![]; for mail_bytes in FROM_REGEX.splitn(&content, usize::MAX) { - let mail_content = mail_bytes.splitn(2, |x| *x == b'\n').skip(1).next().unwrap(); + let mail_content = mail_bytes.splitn(2, |x| *x == b'\n').nth(1).unwrap(); let mail = mailparse::parse_mail(mail_content); if mail.is_err() { continue; @@ -113,7 +113,7 @@ impl FileAdapter for MboxAdapter { archive_recursion_depth: archive_recursion_depth + 1, inp: Box::pin(Cursor::new(raw_body.unwrap())), line_prefix: line_prefix.to_string(), - config: config, + config, postprocess, }; ais.push(ai2);