Refactor TypedHeader extractor (#189)

I should use `HeaderMapExt::typed_try_get` rather than implementing it
manually.
This commit is contained in:
David Pedersen
2021-08-16 09:05:10 +02:00
committed by GitHub
parent 48afd30491
commit be7e9e9bc6
5 changed files with 107 additions and 78 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ mod for_services {
async fn get_handles_head() {
let app = route(
"/",
get(service_fn(|req: Request<Body>| async move {
get(service_fn(|_req: Request<Body>| async move {
let res = Response::builder()
.header("x-some-header", "foobar".parse::<HeaderValue>().unwrap())
.body(Body::from("you shouldn't see this"))