Specialize to strings
This commit is contained in:
parent
7ffd6b2bd7
commit
df99ff1e06
@ -17,11 +17,9 @@ use crate::builtin::Builtin;
|
||||
|
||||
type ParseResult<'a, T> = IResult<&'a str, T, VerboseError<&'a str>>;
|
||||
|
||||
pub fn ws<I, O, E: ParseError<I>, F>(parser: F) -> impl Fn(I) -> IResult<I, O, E>
|
||||
pub fn ws<'a, O, E: ParseError<&'a str>, F>(parser: F) -> impl Fn(&'a str) -> IResult<&'a str, O, E>
|
||||
where
|
||||
I: nom::InputTakeAtPosition,
|
||||
<I as nom::InputTakeAtPosition>::Item: nom::AsChar + Clone,
|
||||
F: Fn(I) -> IResult<I, O, E>,
|
||||
F: Fn(&'a str) -> IResult<&'a str, O, E>,
|
||||
{
|
||||
delimited(space0, parser, space0)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user