mirror of https://github.com/fafhrd91/actix-web
fmt
This commit is contained in:
parent
d6a09f0bed
commit
f86afa1e51
|
@ -27,13 +27,13 @@ macro_rules! method_type {
|
|||
fn parse(method: &str) -> Result<Self, String> {
|
||||
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))
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue