From 4995967cf4cbfa19573f2ff8fdbfc0491f70e456 Mon Sep 17 00:00:00 2001 From: kageru Date: Thu, 26 Jan 2023 23:10:13 +0100 Subject: [PATCH] clippy --- src/filter.rs | 2 +- src/parser.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filter.rs b/src/filter.rs index 4389f52..a8a74bf 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -42,7 +42,7 @@ pub type CardFilter = Box bool>; pub type RawCardFilter = (Field, Operator, Value); pub fn fallback_filter(query: &str) -> Result { - if query.contains(&OPERATOR_CHARS[..]) { + if query.contains(OPERATOR_CHARS) { return Err(format!("Invalid query: {query}")); } #[cfg(debug_assertions)] diff --git a/src/parser.rs b/src/parser.rs index 727fe86..f30e632 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -30,7 +30,7 @@ fn word_non_empty(input: &str) -> IResult<&str, &str> { } fn parse_raw_filter(input: &str) -> IResult<&str, RawCardFilter> { - preceded(multispace0, alt((complete(tuple((field, operator, value))), map_res(word_non_empty, |q| fallback_filter(q)))))(input) + preceded(multispace0, alt((complete(tuple((field, operator, value))), map_res(word_non_empty, fallback_filter))))(input) } fn field(input: &str) -> IResult<&str, Field> {