From 2c47500bc3b9f0d78f1ff29f3331f062ccf33b4e Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 13 Dec 2022 15:29:52 +0100 Subject: [PATCH] fix two nightly errors --- filter-parser/src/error.rs | 2 +- filter-parser/src/lib.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/filter-parser/src/error.rs b/filter-parser/src/error.rs index 8a628156a..ea95caba7 100644 --- a/filter-parser/src/error.rs +++ b/filter-parser/src/error.rs @@ -33,7 +33,7 @@ impl NomErrorExt for nom::Err { /// cut a parser and map the error pub fn cut_with_err<'a, O>( - mut parser: impl FnMut(Span<'a>) -> IResult, + mut parser: impl FnMut(Span<'a>) -> IResult<'a, O>, mut with: impl FnMut(Error<'a>) -> Error<'a>, ) -> impl FnMut(Span<'a>) -> IResult { move |input| match parser.parse(input) { diff --git a/filter-parser/src/lib.rs b/filter-parser/src/lib.rs index 61801e3d4..d10136ace 100644 --- a/filter-parser/src/lib.rs +++ b/filter-parser/src/lib.rs @@ -170,7 +170,9 @@ impl<'a> FilterCondition<'a> { } /// remove OPTIONAL whitespaces before AND after the provided parser. -fn ws<'a, O>(inner: impl FnMut(Span<'a>) -> IResult) -> impl FnMut(Span<'a>) -> IResult { +fn ws<'a, O>( + inner: impl FnMut(Span<'a>) -> IResult<'a, O>, +) -> impl FnMut(Span<'a>) -> IResult<'a, O> { delimited(multispace0, inner, multispace0) }