Apply clippy suggestions

This commit is contained in:
Dirkjan Ochtman 2022-11-21 15:47:25 -08:00
parent 0f74c4686d
commit d48d893ada
1 changed files with 1 additions and 2 deletions

View File

@ -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());