diff --git a/src/client/conn.rs b/src/client/conn.rs index 29d02cbf7b..6072a86663 100644 --- a/src/client/conn.rs +++ b/src/client/conn.rs @@ -332,7 +332,6 @@ impl Connection where T: AsyncRead + AsyncWrite + Unpin + Send + 'static, B: Payload + Unpin + 'static, - B::Data: Unpin, { /// Return the inner IO object, and additional information. /// @@ -384,7 +383,7 @@ where impl Future for Connection where T: AsyncRead + AsyncWrite + Unpin + Send + 'static, - B: Payload + Unpin + 'static, + B: Payload + 'static, { type Output = crate::Result<()>; @@ -591,7 +590,7 @@ impl fmt::Debug for ResponseFuture { impl Future for ProtoClient where T: AsyncRead + AsyncWrite + Send + Unpin + 'static, - B: Payload + Unpin + 'static, + B: Payload + 'static, { type Output = crate::Result; diff --git a/src/client/mod.rs b/src/client/mod.rs index a094c913ca..851e17e6a8 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -152,7 +152,7 @@ where C: Connect + Clone + Send + Sync + 'static, C::Transport: Unpin + Send + 'static, C::Future: Unpin + Send + 'static, - B: Payload + Unpin + Send + 'static, + B: Payload + Send + 'static, B::Data: Send, { /// Send a `GET` request to the supplied `Uri`. @@ -550,7 +550,7 @@ where C: Connect + Clone + Send + Sync + 'static, C::Transport: Unpin + Send + 'static, C::Future: Unpin + Send + 'static, - B: Payload + Unpin + Send + 'static, + B: Payload + Send + 'static, B::Data: Send, { type Response = Response; diff --git a/src/proto/h2/client.rs b/src/proto/h2/client.rs index f05abca2f3..ea58fa2514 100644 --- a/src/proto/h2/client.rs +++ b/src/proto/h2/client.rs @@ -91,7 +91,7 @@ where impl Future for ClientTask where - B: Payload + Unpin + 'static, + B: Payload + 'static, { type Output = crate::Result; @@ -133,7 +133,7 @@ where }; if !eos { - let mut pipe = PipeToSendStream::new(body, body_tx).map(|res| { + let mut pipe = Box::pin(PipeToSendStream::new(body, body_tx)).map(|res| { if let Err(e) = res { debug!("client request body error: {}", e); }