diff --git a/hyper/src/common/exec.rs b/hyper/src/common/exec.rs index 6c39158..ef4b08d 100644 --- a/hyper/src/common/exec.rs +++ b/hyper/src/common/exec.rs @@ -21,6 +21,7 @@ pub trait ConnStreamExec: Clone { pub trait NewSvcExec>: Clone { fn execute_new_svc(&mut self, fut: NewSvcTask); } + pub(crate) type BoxSendFuture = Pin + Send>>; #[derive(Clone)] pub enum Exec { @@ -42,6 +43,7 @@ where loop {} } } + #[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))] impl NewSvcExec for Exec where @@ -53,7 +55,7 @@ where loop {} } } -#[cfg(feature = "server")] + impl ConnStreamExec for E where E: Executor> + Clone, @@ -64,34 +66,3 @@ where loop {} } } -#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))] -impl NewSvcExec for E -where - E: Executor> + Clone, - NewSvcTask: Future, - S: HttpService, - W: Watcher, -{ - fn execute_new_svc(&mut self, fut: NewSvcTask) { - loop {} - } -} -#[cfg(not(feature = "http2"))] -#[allow(missing_debug_implementations)] -pub(crate) struct H2Stream(std::marker::PhantomData<(F, B)>); -#[cfg(not(feature = "http2"))] -impl Future for H2Stream -where - F: Future, E>>, - B: crate::body::HttpBody, - B::Error: Into>, - E: Into>, -{ - type Output = (); - fn poll( - self: Pin<&mut Self>, - _cx: &mut std::task::Context<'_>, - ) -> std::task::Poll { - loop {} - } -} diff --git a/hyper/src/server/server.rs b/hyper/src/server/server.rs index e7a7b4f..4739f33 100644 --- a/hyper/src/server/server.rs +++ b/hyper/src/server/server.rs @@ -119,7 +119,6 @@ pub(crate) mod new_svc { } impl Future for NewSvcTask where - I: AsyncRead + AsyncWrite + Unpin + Send + 'static, S: HttpService, B: HttpBody + 'static, B::Error: Into>,