From 5d74ebd5e56c411b46be9e737de664dbb94ff6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Thu, 18 Aug 2022 11:36:38 +0200 Subject: [PATCH] Cargo fmt --- filter-parser/src/error.rs | 1 - filter-parser/src/lib.rs | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/filter-parser/src/error.rs b/filter-parser/src/error.rs index 05fc3a276..d5d36bd8e 100644 --- a/filter-parser/src/error.rs +++ b/filter-parser/src/error.rs @@ -140,7 +140,6 @@ impl<'a> Display for Error<'a> { ErrorKind::MissingClosingDelimiter(c) => { writeln!(f, "Expression `{}` is missing the following closing delimiter: `{}`.", escaped_input, c)? } - ErrorKind::InvalidPrimary if input.trim().is_empty() => { writeln!(f, "Was expecting an operation `=`, `!=`, `>=`, `>`, `<=`, `<`, `TO`, `EXISTS`, `NOT EXISTS`, or `_geoRadius` but instead got nothing.")? } diff --git a/filter-parser/src/lib.rs b/filter-parser/src/lib.rs index b8d3272c8..014b76bc5 100644 --- a/filter-parser/src/lib.rs +++ b/filter-parser/src/lib.rs @@ -43,6 +43,9 @@ mod condition; mod error; mod value; +use std::fmt::Debug; +use std::str::FromStr; + pub use condition::{parse_condition, parse_to, Condition}; use condition::{parse_exists, parse_not_exists}; use error::{cut_with_err, ExpectedValueKind, NomErrorExt}; @@ -56,8 +59,6 @@ use nom::number::complete::recognize_float; use nom::sequence::{delimited, preceded, terminated, tuple}; use nom::Finish; use nom_locate::LocatedSpan; -use std::fmt::Debug; -use std::str::FromStr; pub(crate) use value::parse_value; use value::word_exact; @@ -182,7 +183,7 @@ fn parse_value_list<'a>(input: Span<'a>) -> IResult>> { } } -/// "IN" "[" value_list "]" +/// "IN" WS* "[" value_list "]" fn parse_in_body(input: Span) -> IResult> { let (input, _) = ws(word_exact("IN"))(input)?;