Skip to content

Commit

Permalink
make Methods parse case insensitively
Browse files Browse the repository at this point in the history
this is a small performance regression but other than that there's no reason _not_ to accept lowercase methods
  • Loading branch information
jbr committed Oct 25, 2020
1 parent 4165546 commit 648c84a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl FromStr for Method {
type Err = crate::Error;

fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
match &*s.to_ascii_uppercase() {
"GET" => Ok(Self::Get),
"HEAD" => Ok(Self::Head),
"POST" => Ok(Self::Post),
Expand Down

0 comments on commit 648c84a

Please sign in to comment.