Revert "Simplify handler trait (#221)" (#223)

This reverts commit 44c58bdf5f.
This commit is contained in:
David Pedersen
2021-08-20 23:56:16 +02:00
committed by GitHub
parent f984198440
commit 971c0a394a
4 changed files with 110 additions and 108 deletions
+8 -2
View File
@@ -2,7 +2,10 @@
use crate::body::{box_body, BoxBody};
use crate::util::{Either, EitherProj};
use futures_util::{future::BoxFuture, ready};
use futures_util::{
future::{BoxFuture, Map},
ready,
};
use http::{Method, Request, Response};
use http_body::Empty;
use pin_project_lite::pin_project;
@@ -64,5 +67,8 @@ where
opaque_future! {
/// The response future for [`IntoService`](super::IntoService).
pub type IntoServiceFuture =
BoxFuture<'static, Result<Response<BoxBody>, Infallible>>;
Map<
BoxFuture<'static, Response<BoxBody>>,
fn(Response<BoxBody>) -> Result<Response<BoxBody>, Infallible>,
>;
}