refactor(client): remove Unpin requirement from request body
This commit is contained in:
@@ -332,7 +332,6 @@ impl<T, B> Connection<T, B>
|
|||||||
where
|
where
|
||||||
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
|
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
|
||||||
B: Payload + Unpin + 'static,
|
B: Payload + Unpin + 'static,
|
||||||
B::Data: Unpin,
|
|
||||||
{
|
{
|
||||||
/// Return the inner IO object, and additional information.
|
/// Return the inner IO object, and additional information.
|
||||||
///
|
///
|
||||||
@@ -384,7 +383,7 @@ where
|
|||||||
impl<T, B> Future for Connection<T, B>
|
impl<T, B> Future for Connection<T, B>
|
||||||
where
|
where
|
||||||
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
|
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
|
||||||
B: Payload + Unpin + 'static,
|
B: Payload + 'static,
|
||||||
{
|
{
|
||||||
type Output = crate::Result<()>;
|
type Output = crate::Result<()>;
|
||||||
|
|
||||||
@@ -591,7 +590,7 @@ impl fmt::Debug for ResponseFuture {
|
|||||||
impl<T, B> Future for ProtoClient<T, B>
|
impl<T, B> Future for ProtoClient<T, B>
|
||||||
where
|
where
|
||||||
T: AsyncRead + AsyncWrite + Send + Unpin + 'static,
|
T: AsyncRead + AsyncWrite + Send + Unpin + 'static,
|
||||||
B: Payload + Unpin + 'static,
|
B: Payload + 'static,
|
||||||
{
|
{
|
||||||
type Output = crate::Result<proto::Dispatched>;
|
type Output = crate::Result<proto::Dispatched>;
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ where
|
|||||||
C: Connect + Clone + Send + Sync + 'static,
|
C: Connect + Clone + Send + Sync + 'static,
|
||||||
C::Transport: Unpin + Send + 'static,
|
C::Transport: Unpin + Send + 'static,
|
||||||
C::Future: Unpin + Send + 'static,
|
C::Future: Unpin + Send + 'static,
|
||||||
B: Payload + Unpin + Send + 'static,
|
B: Payload + Send + 'static,
|
||||||
B::Data: Send,
|
B::Data: Send,
|
||||||
{
|
{
|
||||||
/// Send a `GET` request to the supplied `Uri`.
|
/// Send a `GET` request to the supplied `Uri`.
|
||||||
@@ -550,7 +550,7 @@ where
|
|||||||
C: Connect + Clone + Send + Sync + 'static,
|
C: Connect + Clone + Send + Sync + 'static,
|
||||||
C::Transport: Unpin + Send + 'static,
|
C::Transport: Unpin + Send + 'static,
|
||||||
C::Future: Unpin + Send + 'static,
|
C::Future: Unpin + Send + 'static,
|
||||||
B: Payload + Unpin + Send + 'static,
|
B: Payload + Send + 'static,
|
||||||
B::Data: Send,
|
B::Data: Send,
|
||||||
{
|
{
|
||||||
type Response = Response<Body>;
|
type Response = Response<Body>;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ where
|
|||||||
|
|
||||||
impl<B> Future for ClientTask<B>
|
impl<B> Future for ClientTask<B>
|
||||||
where
|
where
|
||||||
B: Payload + Unpin + 'static,
|
B: Payload + 'static,
|
||||||
{
|
{
|
||||||
type Output = crate::Result<Dispatched>;
|
type Output = crate::Result<Dispatched>;
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ where
|
|||||||
};
|
};
|
||||||
|
|
||||||
if !eos {
|
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 {
|
if let Err(e) = res {
|
||||||
debug!("client request body error: {}", e);
|
debug!("client request body error: {}", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user