mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Fix typo in sealed trait used in Handler (#430)
This commit is contained in:
+3
-3
@@ -23,9 +23,9 @@ pub use self::into_service::IntoService;
|
|||||||
pub(crate) mod sealed {
|
pub(crate) mod sealed {
|
||||||
#![allow(unreachable_pub, missing_docs, missing_debug_implementations)]
|
#![allow(unreachable_pub, missing_docs, missing_debug_implementations)]
|
||||||
|
|
||||||
pub trait HiddentTrait {}
|
pub trait HiddenTrait {}
|
||||||
pub struct Hidden;
|
pub struct Hidden;
|
||||||
impl HiddentTrait for Hidden {}
|
impl HiddenTrait for Hidden {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Trait for async functions that can be used to handle requests.
|
/// Trait for async functions that can be used to handle requests.
|
||||||
@@ -39,7 +39,7 @@ pub trait Handler<B, T>: Clone + Send + Sized + 'static {
|
|||||||
// This seals the trait. We cannot use the regular "sealed super trait"
|
// This seals the trait. We cannot use the regular "sealed super trait"
|
||||||
// approach due to coherence.
|
// approach due to coherence.
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
type Sealed: sealed::HiddentTrait;
|
type Sealed: sealed::HiddenTrait;
|
||||||
|
|
||||||
/// Call the handler with the given request.
|
/// Call the handler with the given request.
|
||||||
async fn call(self, req: Request<B>) -> Response<BoxBody>;
|
async fn call(self, req: Request<B>) -> Response<BoxBody>;
|
||||||
|
|||||||
Reference in New Issue
Block a user