From f27c7f895666be4f2610e67b6ca9b40143f35a58 Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Sat, 11 Jun 2022 13:35:45 +0200 Subject: [PATCH] Remove deprecated `extractor_middleware` function (#1077) --- axum/CHANGELOG.md | 4 ++++ axum/src/extract/extractor_middleware.rs | 16 ---------------- axum/src/extract/mod.rs | 2 -- 3 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 axum/src/extract/extractor_middleware.rs diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index 447aecbd40..ac60ea38a6 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -30,7 +30,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 extractor ([#1078]) - **added:** Implement `IntoResponse` for `Form` ([#1095]) - **change:** axum's MSRV is now 1.56 ([#1098]) +- **breaking:** Remove `extractor_middleware` which was previously deprecated. + Use `axum::middleware::from_extractor` instead ([#1077]) +[#1077]: https://github.com/tokio-rs/axum/pull/1077 +[#1078]: https://github.com/tokio-rs/axum/pull/1078 [#1078]: https://github.com/tokio-rs/axum/pull/1078 [#1095]: https://github.com/tokio-rs/axum/pull/1095 [#1098]: https://github.com/tokio-rs/axum/pull/1098 diff --git a/axum/src/extract/extractor_middleware.rs b/axum/src/extract/extractor_middleware.rs deleted file mode 100644 index 9e3c1942ce..0000000000 --- a/axum/src/extract/extractor_middleware.rs +++ /dev/null @@ -1,16 +0,0 @@ -//! Convert an extractor into a middleware. -//! -//! See [`extractor_middleware`] for more details. - -use crate::middleware::from_extractor; - -pub use crate::middleware::{ - future::FromExtractorResponseFuture as ResponseFuture, FromExtractor as ExtractorMiddleware, - FromExtractorLayer as ExtractorMiddlewareLayer, -}; - -/// Convert an extractor into a middleware. -#[deprecated(note = "Please use `axum::middleware::from_extractor` instead")] -pub fn extractor_middleware() -> ExtractorMiddlewareLayer { - from_extractor() -} diff --git a/axum/src/extract/mod.rs b/axum/src/extract/mod.rs index 41a255116a..6f0435f6e9 100644 --- a/axum/src/extract/mod.rs +++ b/axum/src/extract/mod.rs @@ -4,7 +4,6 @@ use http::header; use rejection::*; pub mod connect_info; -pub mod extractor_middleware; pub mod path; pub mod rejection; @@ -24,7 +23,6 @@ pub use axum_core::extract::{FromRequest, RequestParts}; pub use self::{ connect_info::ConnectInfo, content_length_limit::ContentLengthLimit, - extractor_middleware::extractor_middleware, host::Host, path::Path, raw_query::RawQuery,