Skip to content

Commit

Permalink
Fix NONCONSUMPTION_IS_OK for Flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojakim Stahl committed Feb 2, 2025
1 parent 0cbbcbd commit 10934a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/combinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2187,7 +2187,10 @@ where
{
type IterState<M: Mode> = (A::IterState<M>, Option<M::Output<O::IntoIter>>);

const NONCONSUMPTION_IS_OK: bool = A::NONCONSUMPTION_IS_OK;
// A::NONCONSUMPTION_IS_OK cannot be used because if we are iterating
// over O, we are not consuming any input (input has probably
// already been comsumed when constructing O)
const NONCONSUMPTION_IS_OK: bool = true;

#[inline(always)]
fn make_iter<M: Mode>(
Expand Down

0 comments on commit 10934a4

Please sign in to comment.