mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Fix for service as bottom handler (#27)
Would previously fail because of a mismatch in error types.
This commit is contained in:
+2
-2
@@ -679,13 +679,13 @@ pub mod prelude {
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if `description` doesn't start with `/`.
|
||||
pub fn route<S, B>(description: &str, service: S) -> Route<S, EmptyRouter>
|
||||
pub fn route<S, B>(description: &str, service: S) -> Route<S, EmptyRouter<S::Error>>
|
||||
where
|
||||
S: Service<Request<B>> + Clone,
|
||||
{
|
||||
use routing::RoutingDsl;
|
||||
|
||||
routing::EmptyRouter.route(description, service)
|
||||
routing::EmptyRouter::new().route(description, service)
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
|
||||
Reference in New Issue
Block a user