diff --git a/actix-http/src/encoding/encoder.rs b/actix-http/src/encoding/encoder.rs index ecba9cbe2..d5525f985 100644 --- a/actix-http/src/encoding/encoder.rs +++ b/actix-http/src/encoding/encoder.rs @@ -160,10 +160,10 @@ impl> MessageBody for Encoder { } } - let result = ready!(this.body.as_mut().poll_next(cx).map_err(Into::into)); + let result = ready!(this.body.as_mut().poll_next(cx)); match result { - Some(Err(err)) => return Poll::Ready(Some(Err(err))), + Some(Err(err)) => return Poll::Ready(Some(Err(err.into()))), Some(Ok(chunk)) => { if let Some(mut encoder) = this.encoder.take() {