diff --git a/actix-web-codegen/src/route.rs b/actix-web-codegen/src/route.rs index 69a90ee8f..5425bc531 100644 --- a/actix-web-codegen/src/route.rs +++ b/actix-web-codegen/src/route.rs @@ -27,13 +27,13 @@ macro_rules! method_type { fn parse(method: &str) -> Result { match method { $(stringify!($upper) => Ok(Self::$variant),)+ - _ => { if method.chars().all(|c| c.is_ascii_uppercase()) { - Ok(Self::Custom) - } else { - Err(format!("HTTP method must be uppercase: `{}`", method)) - } - }, - // _ => Err(format!("Unexpected HTTP method: `{}`", method)), + _ => { + if method.chars().all(|c| c.is_ascii_uppercase()) { + Ok(Self::Custom) + } else { + Err(format!("HTTP method must be uppercase: `{}`", method)) + } + }, } }