diff --git a/CHANGES.md b/CHANGES.md index 327fc3069..0c9a70812 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,16 +3,16 @@ ## Unreleased - 2021-xx-xx ### Added * The method `Either, web::Form>::into_inner()` which returns the inner type for - whichever variant was created. Also works for `Either, web::Json>`. [#????] + whichever variant was created. Also works for `Either, web::Json>`. [#1894] ### Changed * Rework `Responder` trait to be sync and returns `Response`/`HttpResponse` directly. Making it more simple and performant. [#1891] -* Our `Either` type now uses `Left`/`Right` variants (instead of `A`/`B`) [#????] +* Our `Either` type now uses `Left`/`Right` variants (instead of `A`/`B`) [#1894] ### Removed -* Public field of `web::Path` has been made private. [#????] -* Public field of `web::Query` has been made private. [#????] +* Public field of `web::Path` has been made private. [#1894] +* Public field of `web::Query` has been made private. [#1894] [#1891]: https://github.com/actix/actix-web/pull/1891 [#????]: https://github.com/actix/actix-web/pull/???? diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index 5dbe7362b..622ed55ea 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -1,9 +1,9 @@ # Changes ## Unreleased - 2021-xx-xx -* `Response::content_type` now takes an `impl IntoHeaderValue` to support `mime` types. [#????] +* `Response::content_type` now takes an `impl IntoHeaderValue` to support `mime` types. [#1894] -[#????]: https://github.com/actix/actix-web/pull/???? +[#1894]: https://github.com/actix/actix-web/pull/1894 ## 3.0.0-beta.1 - 2021-01-07 diff --git a/actix-http/src/error.rs b/actix-http/src/error.rs index 1fb2ac41a..852cf8e5c 100644 --- a/actix-http/src/error.rs +++ b/actix-http/src/error.rs @@ -1022,22 +1022,22 @@ mod tests { fn test_payload_error() { let err: PayloadError = io::Error::new(io::ErrorKind::Other, "ParseError").into(); - assert!(format!("{}", err).contains("ParseError")); + assert!(err.to_string().contains("ParseError")); let err = PayloadError::Incomplete(None); assert_eq!( - format!("{}", err), - "A payload reached EOF, but is not complete. With error: None" + err.to_string(), + "A payload reached EOF, but is not complete. Inner error: None" ); } macro_rules! from { ($from:expr => $error:pat) => { match ParseError::from($from) { - e @ $error => { - assert!(format!("{}", e).len() >= 5); + err @ $error => { + assert!(err.to_string().len() >= 5); } - e => unreachable!("{:?}", e), + err => unreachable!("{:?}", err), } }; } @@ -1080,7 +1080,7 @@ mod tests { let err = PayloadError::Overflow; let resp_err: &dyn ResponseError = &err; let err = resp_err.downcast_ref::().unwrap(); - assert_eq!(err.to_string(), "A payload reached size limit."); + assert_eq!(err.to_string(), "Payload reached size limit."); let not_err = resp_err.downcast_ref::(); assert!(not_err.is_none()); }