diff --git a/Cargo.toml b/Cargo.toml
index f2ce46ee..cee40136 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,6 +24,7 @@ name = "actix_web"
path = "src/lib.rs"
[workspace]
+resolver = "2"
members = [
".",
"awc",
diff --git a/actix-http/src/body/body.rs b/actix-http/src/body/body.rs
index f04837d0..cd3e4c5c 100644
--- a/actix-http/src/body/body.rs
+++ b/actix-http/src/body/body.rs
@@ -7,7 +7,7 @@ use std::{
};
use bytes::{Bytes, BytesMut};
-use futures_core::{ready, Stream};
+use futures_core::Stream;
use crate::error::Error;
@@ -74,14 +74,10 @@ impl MessageBody for AnyBody {
}
}
- // TODO: MSRV 1.51: poll_map_err
- AnyBody::Message(body) => match ready!(body.as_pin_mut().poll_next(cx)) {
- Some(Err(err)) => {
- Poll::Ready(Some(Err(Error::new_body().with_cause(err))))
- }
- Some(Ok(val)) => Poll::Ready(Some(Ok(val))),
- None => Poll::Ready(None),
- },
+ AnyBody::Message(body) => body
+ .as_pin_mut()
+ .poll_next(cx)
+ .map_err(|err| Error::new_body().with_cause(err)),
}
}
}
@@ -223,11 +219,9 @@ impl MessageBody for BoxAnyBody {
mut self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll