summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index e0c7fa0..0d5a164 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -445,10 +445,16 @@ where
while !it.is_finished() {
it = match self.parser.next::<OM, EM>(it.clone(), &mut state) {
Some(Ok((rest, output))) => {
+ debug_assert!(
+ rest.position() > it.position(),
+ "iterator failed to make progress"
+ );
+
outputs = OM::combine(outputs, output, |mut acc, e| {
acc.push(e);
acc
});
+
rest
}
_ => break,