1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00
This commit is contained in:
Rob Ede 2023-02-13 21:09:20 +00:00
parent 85d88ffada
commit dc08ea044b
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933

View File

@ -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"
);
@ -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();