From bbe359364a20559ecfed9d45304de480bb8a87ae Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Wed, 14 Dec 2022 22:07:56 -0600 Subject: [PATCH] refactor: clippy warnings --- src/db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db.rs b/src/db.rs index c367e63..07abfc3 100644 --- a/src/db.rs +++ b/src/db.rs @@ -471,7 +471,7 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec>) { } } } - if authvec.len() > 0 { + if !authvec.is_empty() { let authors_clause = format!("({})", auth_searches.join(" OR ")); filter_components.push(authors_clause); } else { @@ -511,7 +511,7 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec>) { } } } - if idvec.len() > 0 { + if !idvec.is_empty() { let id_clause = format!("({})", id_searches.join(" OR ")); filter_components.push(id_clause); } else {