Skip to content

Commit a65a9f2

Browse files
committed
Remove an unnecessary String allocation
1 parent 1716bc9 commit a65a9f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hyperium_http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ impl From<http::Method> for Method {
1313

1414
impl From<Method> for http::Method {
1515
fn from(method: Method) -> Self {
16-
http::Method::from_str(&format!("{}", method)).unwrap()
16+
http::Method::from_str(method.as_ref()).unwrap()
1717
}
1818
}
1919

0 commit comments

Comments
 (0)