Skip to content

Commit

Permalink
docs: fix compile errors for whitespace wrapper recipe (#1764)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgb authored Jul 26, 2024
1 parent 392c486 commit 561fb6b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions doc/nom_recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ use nom::{

/// A combinator that takes a parser `inner` and produces a parser that also consumes both leading and
/// trailing whitespace, returning the output of `inner`.
fn ws<'a, F, O, E: ParseError<&'a str>>(inner: F) -> impl Parser<&'a str>
where
F: Parser<&'a str>,
pub fn ws<'a, O, E: ParseError<&'a str>, F>(
inner: F,
) -> impl FnMut(&'a str) -> IResult<&'a str, O, E>
where
F: Parser<&'a str, O, E>,
{
delimited(
multispace0,
inner,
multispace0
)
delimited(multispace0, inner, multispace0)
}
```

Expand Down

0 comments on commit 561fb6b

Please sign in to comment.