diff --git a/integrations/axum/Cargo.toml b/integrations/axum/Cargo.toml index 292634cf..0277c77d 100644 --- a/integrations/axum/Cargo.toml +++ b/integrations/axum/Cargo.toml @@ -15,7 +15,7 @@ categories = ["network-programming", "asynchronous"] async-graphql = { path = "../..", version = "3.0.37" } async-trait = "0.1.51" -axum = { version = "0.4", features = ["ws", "headers"] } +axum = { version = "0.5", features = ["ws", "headers"] } bytes = "1.0.1" http-body = "0.4.2" serde_json = "1.0.66" diff --git a/integrations/axum/src/extract.rs b/integrations/axum/src/extract.rs index 264d48d8..df298cfa 100644 --- a/integrations/axum/src/extract.rs +++ b/integrations/axum/src/extract.rs @@ -106,7 +106,7 @@ where } else { let content_type = req .headers() - .and_then(|headers| headers.get(http::header::CONTENT_TYPE)) + .get(http::header::CONTENT_TYPE) .and_then(|value| value.to_str().ok()) .map(ToString::to_string); let body_stream = BodyStream::from_request(req) diff --git a/integrations/axum/src/subscription.rs b/integrations/axum/src/subscription.rs index 11c3fe4b..9333bb7e 100644 --- a/integrations/axum/src/subscription.rs +++ b/integrations/axum/src/subscription.rs @@ -29,7 +29,7 @@ impl FromRequest for GraphQLProtocol { async fn from_request(req: &mut RequestParts) -> Result { req.headers() - .and_then(|headers| headers.get(http::header::SEC_WEBSOCKET_PROTOCOL)) + .get(http::header::SEC_WEBSOCKET_PROTOCOL) .and_then(|value| value.to_str().ok()) .and_then(|protocols| { protocols