1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 14:49:20 +02:00

rollback changes to actix-web, awc and test-server for now

This commit is contained in:
Maksym Vorobiov
2020-01-31 10:29:10 +02:00
committed by Yuki Okushi
parent 62aba424e2
commit 09a391a3ca
6 changed files with 27 additions and 30 deletions

View File

@ -383,7 +383,7 @@ where
{
pub fn new(stream: S) -> Self {
BodyStream {
stream: Box::pin(stream),
stream,
_t: PhantomData,
}
}
@ -420,7 +420,8 @@ where
#[pin_project]
pub struct SizedStream<S: Unpin> {
size: u64,
stream: Pin<Box<S>>,
#[pin]
stream: S,
}
impl<S> SizedStream<S>
@ -428,10 +429,7 @@ where
S: Stream<Item = Result<Bytes, Error>> + Unpin,
{
pub fn new(size: u64, stream: S) -> Self {
SizedStream {
size,
stream: Box::pin(stream),
}
SizedStream { size, stream }
}
}