refactor: clippy warnings

This commit is contained in:
Greg Heartsfield 2022-12-14 22:07:56 -06:00
parent 9e9c494367
commit bbe359364a

View File

@ -471,7 +471,7 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec<Box<dyn ToSql>>) {
} }
} }
} }
if authvec.len() > 0 { if !authvec.is_empty() {
let authors_clause = format!("({})", auth_searches.join(" OR ")); let authors_clause = format!("({})", auth_searches.join(" OR "));
filter_components.push(authors_clause); filter_components.push(authors_clause);
} else { } else {
@ -511,7 +511,7 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec<Box<dyn ToSql>>) {
} }
} }
} }
if idvec.len() > 0 { if !idvec.is_empty() {
let id_clause = format!("({})", id_searches.join(" OR ")); let id_clause = format!("({})", id_searches.join(" OR "));
filter_components.push(id_clause); filter_components.push(id_clause);
} else { } else {