Loosened type constraint on `ws` argument
The argument type of `ws` is changed from Fn to FnMut, allowing it to accept functions such as `alt` (a.k.a. functions it really should've accepted in the first place). Note that using FnOnce instead will fail to compile because of the type constraint on `delimited`.
@@ -37,7 +37,7 @@ use nom::{
/// trailing whitespace, returning the output of `inner`.
fn ws<'a, F: 'a, O, E: ParseError<&'a str>>(inner: F) -> impl FnMut(&'a str) -> IResult<&'a str, O, E>
where
- F: Fn(&'a str) -> IResult<&'a str, O, E>,
+ F: FnMut(&'a str) -> IResult<&'a str, O, E>,
{
delimited(
multispace0,
