clippy
This commit is contained in:
parent
f3eeb570ce
commit
4995967cf4
@ -42,7 +42,7 @@ pub type CardFilter = Box<dyn Fn(&SearchCard) -> bool>;
|
||||
pub type RawCardFilter = (Field, Operator, Value);
|
||||
|
||||
pub fn fallback_filter(query: &str) -> Result<RawCardFilter, String> {
|
||||
if query.contains(&OPERATOR_CHARS[..]) {
|
||||
if query.contains(OPERATOR_CHARS) {
|
||||
return Err(format!("Invalid query: {query}"));
|
||||
}
|
||||
#[cfg(debug_assertions)]
|
||||
|
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user