diff --git a/CHANGES.md b/CHANGES.md index 217ec4f78..2addf4dca 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,8 +11,12 @@ ### Fixed * Fix quality parse error in Accept-Encoding header. [#2344] +### Removed +* `ServiceResponse::checked_expr` was a legacy and just removed. [#11111] + [#2325]: https://github.com/actix/actix-web/pull/2325 [#2344]: https://github.com/actix/actix-web/pull/2344 +[#11111]: https://github.com/actix/actix-web/pull/11111 ## 4.0.0-beta.8 - 2021-06-26 diff --git a/src/service.rs b/src/service.rs index 48167e5b3..23ab4933c 100644 --- a/src/service.rs +++ b/src/service.rs @@ -393,16 +393,6 @@ impl ServiceResponse { self.response.headers_mut() } - /// Execute closure and in case of error convert it to response. - pub fn checked_expr(mut self, f: F) -> Result - where - F: FnOnce(&mut Self) -> Result<(), E>, - E: Into, - { - f(&mut self).map_err(Into::into)?; - Ok(self) - } - /// Extract response body pub fn into_body(self) -> B { self.response.into_body()