From df99ff1e06ab6f81e4e0c0d3fd849e54219af305 Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 14 Mar 2020 01:54:35 -0700 Subject: [PATCH] Specialize to strings --- schala-lang/language/src/parser.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/schala-lang/language/src/parser.rs b/schala-lang/language/src/parser.rs index e7db2fc..74c98b8 100644 --- a/schala-lang/language/src/parser.rs +++ b/schala-lang/language/src/parser.rs @@ -17,11 +17,9 @@ use crate::builtin::Builtin; type ParseResult<'a, T> = IResult<&'a str, T, VerboseError<&'a str>>; -pub fn ws, F>(parser: F) -> impl Fn(I) -> IResult +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, - ::Item: nom::AsChar + Clone, - F: Fn(I) -> IResult, + F: Fn(&'a str) -> IResult<&'a str, O, E>, { delimited(space0, parser, space0) }