mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-01 01:16:59 +02:00
relax unpin bounds on payload types (#2545)
This commit is contained in:
@@ -13,16 +13,17 @@ use actix_http::{
|
||||
Payload, RequestHeadType, ResponseHead, StatusCode,
|
||||
};
|
||||
use actix_utils::future::poll_fn;
|
||||
use bytes::buf::BufMut;
|
||||
use bytes::{Bytes, BytesMut};
|
||||
use bytes::{buf::BufMut, Bytes, BytesMut};
|
||||
use futures_core::{ready, Stream};
|
||||
use futures_util::SinkExt as _;
|
||||
use pin_project_lite::pin_project;
|
||||
|
||||
use crate::BoxError;
|
||||
|
||||
use super::connection::{ConnectionIo, H1Connection};
|
||||
use super::error::{ConnectError, SendRequestError};
|
||||
use super::{
|
||||
connection::{ConnectionIo, H1Connection},
|
||||
error::{ConnectError, SendRequestError},
|
||||
};
|
||||
|
||||
pub(crate) async fn send_request<Io, B>(
|
||||
io: H1Connection<Io>,
|
||||
@@ -123,7 +124,12 @@ where
|
||||
|
||||
Ok((head, Payload::None))
|
||||
}
|
||||
_ => Ok((head, Payload::Stream(Box::pin(PlStream::new(framed))))),
|
||||
_ => Ok((
|
||||
head,
|
||||
Payload::Stream {
|
||||
payload: Box::pin(PlStream::new(framed)),
|
||||
},
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user