Skip to content

Commit

Permalink
stipulate sep parser must consume (#1723)
Browse files Browse the repository at this point in the history
the separator parser cannot be any parser but must be a consuming parser, contrary to documentation. Ideally, we should have a trait to assert this constraint as well.
  • Loading branch information
gdennie authored Apr 21, 2024
1 parent fc6bc5a commit 19e8bb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/multi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ where
/// [`cut`][crate::combinator::cut].
///
/// # Arguments
/// * `sep` Parses the separator between list elements.
/// * `sep` Parses the separator between list elements. Must be consuming.
/// * `f` Parses the elements of the list.
///
/// ```rust
Expand Down Expand Up @@ -458,7 +458,7 @@ where
/// [`cut`][crate::combinator::cut].
///
/// # Arguments
/// * `sep` Parses the separator between list elements.
/// * `sep` Parses the separator between list elements. Must be consuming.
/// * `f` Parses the elements of the list.
/// ```rust
/// # use nom::{Err, error::{Error, ErrorKind}, Needed, IResult, Parser};
Expand Down

0 comments on commit 19e8bb8

Please sign in to comment.