From dc08ea044b75a3f21fac632c9ab364cebe1ad61c Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 13 Feb 2023 21:09:20 +0000 Subject: [PATCH] clippy --- actix-web-codegen/src/route.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actix-web-codegen/src/route.rs b/actix-web-codegen/src/route.rs index 717ac844c..0772dbd94 100644 --- a/actix-web-codegen/src/route.rs +++ b/actix-web-codegen/src/route.rs @@ -97,7 +97,7 @@ impl MethodTypeExt { /// Returns a multi-method guard chain token stream. fn to_tokens_multi_guard(&self, or_chain: Vec) -> TokenStream2 { debug_assert!( - or_chain.len() > 0, + !or_chain.is_empty(), "empty or_chain passed to multi-guard constructor" ); @@ -405,7 +405,7 @@ impl ToTokens for Route { .map_or_else(|| name.to_string(), LitStr::value); let method_guards = { - debug_assert!(methods.len() > 0, "Args::methods should not be empty"); + debug_assert!(!methods.is_empty(), "Args::methods should not be empty"); let mut others = methods.iter(); let first = others.next().unwrap();