mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 00:44:26 +02:00
use released versions of actix-net
This commit is contained in:
@ -21,7 +21,7 @@ pub struct Decoder<S> {
|
||||
decoder: Option<ContentDecoder>,
|
||||
stream: S,
|
||||
eof: bool,
|
||||
fut: Option<CpuFuture<Result<(Option<Bytes>, ContentDecoder), io::Error>>>,
|
||||
fut: Option<CpuFuture<(Option<Bytes>, ContentDecoder), io::Error>>,
|
||||
}
|
||||
|
||||
impl<S> Decoder<S>
|
||||
@ -85,8 +85,7 @@ where
|
||||
loop {
|
||||
if let Some(ref mut fut) = self.fut {
|
||||
let (chunk, decoder) = match ready!(Pin::new(fut).poll(cx)) {
|
||||
Ok(Ok(item)) => item,
|
||||
Ok(Err(e)) => return Poll::Ready(Some(Err(e.into()))),
|
||||
Ok(item) => item,
|
||||
Err(e) => return Poll::Ready(Some(Err(e.into()))),
|
||||
};
|
||||
self.decoder = Some(decoder);
|
||||
|
@ -24,7 +24,7 @@ pub struct Encoder<B> {
|
||||
eof: bool,
|
||||
body: EncoderBody<B>,
|
||||
encoder: Option<ContentEncoder>,
|
||||
fut: Option<CpuFuture<Result<ContentEncoder, io::Error>>>,
|
||||
fut: Option<CpuFuture<ContentEncoder, io::Error>>,
|
||||
}
|
||||
|
||||
impl<B: MessageBody> Encoder<B> {
|
||||
@ -104,8 +104,7 @@ impl<B: MessageBody> MessageBody for Encoder<B> {
|
||||
|
||||
if let Some(ref mut fut) = self.fut {
|
||||
let mut encoder = match futures::ready!(Pin::new(fut).poll(cx)) {
|
||||
Ok(Ok(item)) => item,
|
||||
Ok(Err(e)) => return Poll::Ready(Some(Err(e.into()))),
|
||||
Ok(item) => item,
|
||||
Err(e) => return Poll::Ready(Some(Err(e.into()))),
|
||||
};
|
||||
let chunk = encoder.take();
|
||||
|
Reference in New Issue
Block a user