From c7a86b56efddda4b647be6fce10fef9c8322e140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Thu, 18 Aug 2022 13:16:56 +0200 Subject: [PATCH] Fix filter parser compilation error --- filter-parser/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/filter-parser/src/lib.rs b/filter-parser/src/lib.rs index ddb218759..33025e6e9 100644 --- a/filter-parser/src/lib.rs +++ b/filter-parser/src/lib.rs @@ -401,7 +401,7 @@ pub mod tests { fn parse() { use FilterCondition as Fc; - fn p(s: &str) -> impl std::fmt::Display { + fn p<'a>(s: &'a str) -> impl std::fmt::Display + 'a { Fc::parse(s).unwrap().unwrap() } @@ -487,14 +487,14 @@ pub mod tests { ); // Confusing keywords - insta::assert_display_snapshot!(p!(r#"NOT "OR" EXISTS AND "EXISTS" NOT EXISTS"#), @"AND[NOT ({OR} EXISTS), NOT ({EXISTS} EXISTS), ]"); + insta::assert_display_snapshot!(p(r#"NOT "OR" EXISTS AND "EXISTS" NOT EXISTS"#), @"AND[NOT ({OR} EXISTS), NOT ({EXISTS} EXISTS), ]"); } #[test] fn error() { use FilterCondition as Fc; - fn p(s: &str) -> impl std::fmt::Display { + fn p<'a>(s: &'a str) -> impl std::fmt::Display + 'a { Fc::parse(s).unwrap_err().to_string() }