Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Feb 13, 2023
1 parent 85d88ff commit dc08ea0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actix-web-codegen/src/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl MethodTypeExt {
/// Returns a multi-method guard chain token stream.
fn to_tokens_multi_guard(&self, or_chain: Vec<impl ToTokens>) -> TokenStream2 {
debug_assert!(
or_chain.len() > 0,
!or_chain.is_empty(),
"empty or_chain passed to multi-guard constructor"
);

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit dc08ea0

Please sign in to comment.