diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index 8e45a24c2..adc4c35c7 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -3,17 +3,17 @@ ## Unreleased - 2021-xx-xx ### Changes - `HeaderMap::get_all` now returns a `std::slice::Iter`. [#2527] -- `Payload` inner fields are now named. [#????] -- `impl Stream` for `Payload` no longer requires the `Stream` variant be `Unpin`. [#????] -- `impl Future` for `h1::SendResponse` no longer requires the body type be `Unpin`. [#????] -- `impl Stream` for `encoding::Decoder` no longer requires the stream type be `Unpin`. [#????] -- Rename `PayloadStream` to `BoxedPayloadStream`. [#????] +- `Payload` inner fields are now named. [#2545] +- `impl Stream` for `Payload` no longer requires the `Stream` variant be `Unpin`. [#2545] +- `impl Future` for `h1::SendResponse` no longer requires the body type be `Unpin`. [#2545] +- `impl Stream` for `encoding::Decoder` no longer requires the stream type be `Unpin`. [#2545] +- Rename `PayloadStream` to `BoxedPayloadStream`. [#2545] ### Removed -- `h1::Payload::readany`. [#????] +- `h1::Payload::readany`. [#2545] [#2527]: https://github.com/actix/actix-web/pull/2527 -[#????]: https://github.com/actix/actix-web/pull/???? +[#2545]: https://github.com/actix/actix-web/pull/2545 ## 3.0.0-beta.16 - 2021-12-17 diff --git a/actix-http/src/payload.rs b/actix-http/src/payload.rs index c494046f5..408767ba0 100644 --- a/actix-http/src/payload.rs +++ b/actix-http/src/payload.rs @@ -6,7 +6,6 @@ use std::{ use bytes::Bytes; use futures_core::Stream; -use h2::RecvStream; use crate::error::PayloadError; @@ -39,8 +38,8 @@ impl From for Payload { } } -impl From for Payload { - fn from(stream: RecvStream) -> Self { +impl From for Payload { + fn from(stream: h2::RecvStream) -> Self { Payload::H2 { payload: crate::h2::Payload::new(stream), } @@ -83,6 +82,5 @@ mod tests { use super::*; - assert_impl_all!(RecvStream: Unpin); assert_impl_all!(Payload: Unpin); } diff --git a/awc/src/client/h1proto.rs b/awc/src/client/h1proto.rs index 61fdf0165..cf716db72 100644 --- a/awc/src/client/h1proto.rs +++ b/awc/src/client/h1proto.rs @@ -13,16 +13,17 @@ use actix_http::{ Payload, RequestHeadType, ResponseHead, StatusCode, }; use actix_utils::future::poll_fn; -use bytes::buf::BufMut; -use bytes::{Bytes, BytesMut}; +use bytes::{buf::BufMut, Bytes, BytesMut}; use futures_core::{ready, Stream}; use futures_util::SinkExt as _; use pin_project_lite::pin_project; use crate::BoxError; -use super::connection::{ConnectionIo, H1Connection}; -use super::error::{ConnectError, SendRequestError}; +use super::{ + connection::{ConnectionIo, H1Connection}, + error::{ConnectError, SendRequestError}, +}; pub(crate) async fn send_request( io: H1Connection,