mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-08 00:00:24 +02:00
axum-extra: Remove unused extract::rejection module (#3636)
This commit is contained in:
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning].
|
|||||||
|
|
||||||
- **breaking:** Remove the deprecated `Host`, `Scheme` and `OptionalPath`
|
- **breaking:** Remove the deprecated `Host`, `Scheme` and `OptionalPath`
|
||||||
extractors ([#3599])
|
extractors ([#3599])
|
||||||
|
- Also remove `HostRejection` which only had `FailedToResolveHost`
|
||||||
|
previously used in the `Host` extractor ([#3636])
|
||||||
- **breaking:** Change `routing::RouterExt::route_with_tsr` to only redirect
|
- **breaking:** Change `routing::RouterExt::route_with_tsr` to only redirect
|
||||||
the HTTP methods that the supplied `MethodRouter` handles. This allows the
|
the HTTP methods that the supplied `MethodRouter` handles. This allows the
|
||||||
following pattern which lead to a panic before because the two
|
following pattern which lead to a panic before because the two
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
//! Additional extractors.
|
//! Additional extractors.
|
||||||
|
|
||||||
pub mod rejection;
|
|
||||||
|
|
||||||
#[cfg(feature = "cached")]
|
#[cfg(feature = "cached")]
|
||||||
mod cached;
|
mod cached;
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
//! Rejection response types.
|
|
||||||
|
|
||||||
use axum_core::{
|
|
||||||
__composite_rejection as composite_rejection, __define_rejection as define_rejection,
|
|
||||||
};
|
|
||||||
|
|
||||||
define_rejection! {
|
|
||||||
#[status = BAD_REQUEST]
|
|
||||||
#[body = "No host found in request"]
|
|
||||||
/// Rejection type used if the [`Host`](super::Host) extractor is unable to
|
|
||||||
/// resolve a host.
|
|
||||||
pub struct FailedToResolveHost;
|
|
||||||
}
|
|
||||||
|
|
||||||
composite_rejection! {
|
|
||||||
/// Rejection used for [`Host`](super::Host).
|
|
||||||
///
|
|
||||||
/// Contains one variant for each way the [`Host`](super::Host) extractor
|
|
||||||
/// can fail.
|
|
||||||
pub enum HostRejection {
|
|
||||||
FailedToResolveHost,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user