Skip to content

Commit

Permalink
combine errors in the alt implementation for arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed Aug 10, 2023
1 parent c143f7e commit 8c68e22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/branch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,10 @@ impl<

for branch in &mut self.parser {
match branch.process::<OM>(input.clone()) {
//branch.parse(input.clone()) {
Err(Err::Error(e)) => error = Some(e),
Err(Err::Error(e)) => match error {
None => error = Some(e),
Some(err) => error = Some(OM::Error::combine(err, e, |e1, e2| e1.or(e2))),
},
res => return res,
}
}
Expand Down

0 comments on commit 8c68e22

Please sign in to comment.