From d48d893ada6411554cc39563ff649ba92efc7cb0 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 21 Nov 2022 15:47:25 -0800 Subject: [PATCH] Apply clippy suggestions --- src/parse/response.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/parse/response.rs b/src/parse/response.rs index 3c18d26..61bf21b 100644 --- a/src/parse/response.rs +++ b/src/parse/response.rs @@ -103,8 +103,7 @@ pub fn reply_lines(input: &[u8]) -> IResult<&[u8], Response> { tag("\r\n"), )), |(intermediate, code, text, _)| { - let mut lines = - Vec::with_capacity(intermediate.len() + if text.is_some() { 1 } else { 0 }); + let mut lines = Vec::with_capacity(intermediate.len() + usize::from(text.is_some())); for (_, _, text, _) in intermediate { if let Some(line) = text { lines.push(line.into_owned());