Skip to content

Commit

Permalink
Reapply "test reorder"
Browse files Browse the repository at this point in the history
This reverts commit d520e47.
  • Loading branch information
Geal committed May 5, 2024
1 parent d520e47 commit 95fd181
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/multi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,16 +398,16 @@ where
.parser
.process::<OutputM<OM::Output, Check, OM::Incomplete>>(i.clone())
{
Err(Err::Error(_)) => return Ok((i, res)),
Err(Err::Failure(e)) => return Err(Err::Failure(e)),
Err(Err::Incomplete(e)) => return Err(Err::Incomplete(e)),
Ok((i1, o)) => {
res = OM::Output::combine(res, o, |mut res, o| {
res.push(o);
res
});
i = i1;
}
Err(Err::Error(_)) => return Ok((i, res)),
Err(Err::Failure(e)) => return Err(Err::Failure(e)),

Check warning on line 409 in src/multi/mod.rs

View check run for this annotation

Codecov / codecov/patch

src/multi/mod.rs#L409

Added line #L409 was not covered by tests
Err(Err::Incomplete(e)) => return Err(Err::Incomplete(e)),
}

loop {
Expand All @@ -416,9 +416,6 @@ where
.separator
.process::<OutputM<Check, Check, OM::Incomplete>>(i.clone())
{
Err(Err::Error(_)) => return Ok((i, res)),
Err(Err::Failure(e)) => return Err(Err::Failure(e)),
Err(Err::Incomplete(e)) => return Err(Err::Incomplete(e)),
Ok((i1, _)) => {
// infinite loop check: the parser must always consume
if i1.input_len() == len {
Expand All @@ -431,18 +428,21 @@ where
.parser
.process::<OutputM<OM::Output, Check, OM::Incomplete>>(i1.clone())
{
Err(Err::Error(_)) => return Ok((i, res)),
Err(Err::Failure(e)) => return Err(Err::Failure(e)),
Err(Err::Incomplete(e)) => return Err(Err::Incomplete(e)),
Ok((i2, o)) => {
res = OM::Output::combine(res, o, |mut res, o| {
res.push(o);
res
});
i = i2;
}
Err(Err::Error(_)) => return Ok((i, res)),
Err(Err::Failure(e)) => return Err(Err::Failure(e)),

Check warning on line 439 in src/multi/mod.rs

View check run for this annotation

Codecov / codecov/patch

src/multi/mod.rs#L439

Added line #L439 was not covered by tests
Err(Err::Incomplete(e)) => return Err(Err::Incomplete(e)),
}
}
Err(Err::Error(_)) => return Ok((i, res)),
Err(Err::Failure(e)) => return Err(Err::Failure(e)),

Check warning on line 444 in src/multi/mod.rs

View check run for this annotation

Codecov / codecov/patch

src/multi/mod.rs#L444

Added line #L444 was not covered by tests
Err(Err::Incomplete(e)) => return Err(Err::Incomplete(e)),
}
}
}
Expand Down

0 comments on commit 95fd181

Please sign in to comment.