Apply clippy suggestions
This commit is contained in:
parent
0f74c4686d
commit
d48d893ada
|
@ -103,8 +103,7 @@ pub fn reply_lines(input: &[u8]) -> IResult<&[u8], Response> {
|
||||||
tag("\r\n"),
|
tag("\r\n"),
|
||||||
)),
|
)),
|
||||||
|(intermediate, code, text, _)| {
|
|(intermediate, code, text, _)| {
|
||||||
let mut lines =
|
let mut lines = Vec::with_capacity(intermediate.len() + usize::from(text.is_some()));
|
||||||
Vec::with_capacity(intermediate.len() + if text.is_some() { 1 } else { 0 });
|
|
||||||
for (_, _, text, _) in intermediate {
|
for (_, _, text, _) in intermediate {
|
||||||
if let Some(line) = text {
|
if let Some(line) = text {
|
||||||
lines.push(line.into_owned());
|
lines.push(line.into_owned());
|
||||||
|
|
Loading…
Reference in New Issue