diff --git a/actix-http/src/encoding/encoder.rs b/actix-http/src/encoding/encoder.rs index c02c24804..425c985f3 100644 --- a/actix-http/src/encoding/encoder.rs +++ b/actix-http/src/encoding/encoder.rs @@ -134,7 +134,7 @@ where EncoderBodyProj::BoxedStream(ref mut b) => { match ready!(b.as_pin_mut().poll_next(cx)) { Some(Err(err)) => { - Poll::Ready(Some(Err(EncoderError::Boxed(err.into())))) + Poll::Ready(Some(Err(EncoderError::Boxed(err)))) } Some(Ok(val)) => Poll::Ready(Some(Ok(val))), None => Poll::Ready(None), diff --git a/src/error/internal.rs b/src/error/internal.rs index 5b59495a5..3708f0fd6 100644 --- a/src/error/internal.rs +++ b/src/error/internal.rs @@ -93,7 +93,7 @@ where InternalErrorType::Response(ref resp) => { if let Some(resp) = resp.borrow_mut().take() { - resp.into() + resp } else { HttpResponse::new(StatusCode::INTERNAL_SERVER_ERROR) }