diff --git a/src/server/conn/auto.rs b/src/server/conn/auto.rs index 4761c45..fcb370b 100644 --- a/src/server/conn/auto.rs +++ b/src/server/conn/auto.rs @@ -67,11 +67,10 @@ impl Builder { /// Bind a connection together with a [`Service`]. pub async fn serve_connection(&self, io: I, service: S) -> Result<()> where - S: Service, Response = Response> + Send, + S: Service, Response = Response>, S::Future: 'static, S::Error: Into>, - B: Body + Send + 'static, - B::Data: Send, + B: Body + 'static, B::Error: Into>, I: Read + Write + Unpin + 'static, E: Http2ServerConnExec, @@ -90,11 +89,10 @@ impl Builder { /// `Send`. pub async fn serve_connection_with_upgrades(&self, io: I, service: S) -> Result<()> where - S: Service, Response = Response> + Send, + S: Service, Response = Response>, S::Future: 'static, S::Error: Into>, - B: Body + Send + 'static, - B::Data: Send, + B: Body + 'static, B::Error: Into>, I: Read + Write + Unpin + Send + 'static, E: Http2ServerConnExec, @@ -295,11 +293,10 @@ impl Http1Builder<'_, E> { /// Bind a connection together with a [`Service`]. pub async fn serve_connection(&self, io: I, service: S) -> Result<()> where - S: Service, Response = Response> + Send, - S::Future: Send + 'static, + S: Service, Response = Response>, + S::Future: 'static, S::Error: Into>, - B: Body + Send + 'static, - B::Data: Send, + B: Body + 'static, B::Error: Into>, I: Read + Write + Unpin + 'static, E: Http2ServerConnExec, @@ -443,11 +440,10 @@ impl Http2Builder<'_, E> { /// Bind a connection together with a [`Service`]. pub async fn serve_connection(&self, io: I, service: S) -> Result<()> where - S: Service, Response = Response> + Send, - S::Future: Send + 'static, + S: Service, Response = Response>, + S::Future: 'static, S::Error: Into>, - B: Body + Send + 'static, - B::Data: Send, + B: Body + 'static, B::Error: Into>, I: Read + Write + Unpin + 'static, E: Http2ServerConnExec,