diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index 21627cec7..2beda3dcc 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -2,16 +2,16 @@ ## Unreleased - 2021-xx-xx ### Added -* `AnyBody::empty` for quickly creating an empty body. [???] +* `AnyBody::empty` for quickly creating an empty body. [#2446] ### Changed -* Rename `AnyBody::{Message => Stream}`. [#????] +* Rename `AnyBody::{Message => Stream}`. [#2446] ### Removed -* `AnyBody::Empty`; an empty body can now only be represented as a zero-length `Bytes` variant. [#????] -* `BodySize::Empty`; an empty body can now only be represented as a `Sized(0)` variant. [#????] +* `AnyBody::Empty`; an empty body can now only be represented as a zero-length `Bytes` variant. [#2446] +* `BodySize::Empty`; an empty body can now only be represented as a `Sized(0)` variant. [#2446] -[#????]: https://github.com/actix/actix-web/pull/???? +[#2446]: https://github.com/actix/actix-web/pull/2446 ## 3.0.0-beta.12 - 2021-11-15 diff --git a/actix-http/src/body/mod.rs b/actix-http/src/body/mod.rs index 5e317b454..0d5b0f079 100644 --- a/actix-http/src/body/mod.rs +++ b/actix-http/src/body/mod.rs @@ -33,7 +33,7 @@ pub use self::sized_stream::SizedStream; /// use bytes::Bytes; /// /// # async fn test_to_bytes() { -/// let body = Body::Empty; +/// let body = Body::None; /// let bytes = to_bytes(body).await.unwrap(); /// assert!(bytes.is_empty()); /// diff --git a/actix-http/src/body/size.rs b/actix-http/src/body/size.rs index 22f93f3a2..e238eadac 100644 --- a/actix-http/src/body/size.rs +++ b/actix-http/src/body/size.rs @@ -25,7 +25,6 @@ impl BodySize { /// ``` /// # use actix_http::body::BodySize; /// assert!(BodySize::None.is_eof()); - /// assert!(BodySize::Empty.is_eof()); /// assert!(BodySize::Sized(0).is_eof()); /// /// assert!(!BodySize::Sized(64).is_eof());