1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-22 01:21:10 +00: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();