Fix for service as bottom handler (#27)

Would previously fail because of a mismatch in error types.
This commit is contained in:
David Pedersen
2021-07-06 09:40:25 +02:00
committed by GitHub
parent c4d266e94d
commit 3cd4a1d6a6
5 changed files with 60 additions and 26 deletions
+2 -2
View File
@@ -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 {