Skip to content

Commit

Permalink
Revert "test reorder"
Browse files Browse the repository at this point in the history
This reverts commit cc3e904.
  • Loading branch information
Geal committed May 5, 2024
1 parent cc3e904 commit d520e47
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)),
Err(Err::Incomplete(e)) => return Err(Err::Incomplete(e)),
}

loop {
Expand All @@ -416,6 +416,9 @@ 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 @@ -428,21 +431,18 @@ 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)),
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)),
Err(Err::Incomplete(e)) => return Err(Err::Incomplete(e)),
}
}
}
Expand Down

0 comments on commit d520e47

Please sign in to comment.