From c201cb385007938a16e0e18928631256b15e3473 Mon Sep 17 00:00:00 2001 From: Damian Poddebniak Date: Tue, 10 Oct 2023 15:00:21 +0200 Subject: [PATCH] fix: Don't log `Rectified missing text to \"...\" unnecessarily` --- imap-codec/src/response.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/imap-codec/src/response.rs b/imap-codec/src/response.rs index a05ab85f..f15efcf2 100644 --- a/imap-codec/src/response.rs +++ b/imap-codec/src/response.rs @@ -101,14 +101,11 @@ pub(crate) fn resp_text(input: &[u8]) -> IMAPResult<&[u8], (Option, Text)> #[cfg(feature = "quirk_missing_text")] alt(( preceded(sp, text), - value( - { - log::warn!("Rectified missing `text` to \"...\""); + map(peek(crlf), |_| { + log::warn!("Rectified missing `text` to \"...\""); - Text::unvalidated("...") - }, - peek(crlf), - ), + Text::unvalidated("...") + }), )), ))(input) } else {