mirror of https://github.com/fafhrd91/actix-web
amend changelog
This commit is contained in:
parent
9f65271f73
commit
434d8a4a2f
|
@ -3,16 +3,16 @@
|
|||
## Unreleased - 2021-xx-xx
|
||||
### Added
|
||||
* The method `Either<web::Json<T>, web::Form<T>>::into_inner()` which returns the inner type for
|
||||
whichever variant was created. Also works for `Either<web::Form<T>, web::Json<T>>`. [#????]
|
||||
whichever variant was created. Also works for `Either<web::Form<T>, web::Json<T>>`. [#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/????
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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::<PayloadError>().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::<ContentTypeError>();
|
||||
assert!(not_err.is_none());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue