Remove checked_expr

This commit is contained in:
Omid Rad 2021-10-11 17:16:53 +02:00
parent 93112644d3
commit f1fbeb8ed1
2 changed files with 4 additions and 10 deletions

View File

@ -11,8 +11,12 @@
### Fixed ### Fixed
* Fix quality parse error in Accept-Encoding header. [#2344] * 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 [#2325]: https://github.com/actix/actix-web/pull/2325
[#2344]: https://github.com/actix/actix-web/pull/2344 [#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 ## 4.0.0-beta.8 - 2021-06-26

View File

@ -393,16 +393,6 @@ impl<B> ServiceResponse<B> {
self.response.headers_mut() self.response.headers_mut()
} }
/// Execute closure and in case of error convert it to response.
pub fn checked_expr<F, E>(mut self, f: F) -> Result<Self, Error>
where
F: FnOnce(&mut Self) -> Result<(), E>,
E: Into<Error>,
{
f(&mut self).map_err(Into::into)?;
Ok(self)
}
/// Extract response body /// Extract response body
pub fn into_body(self) -> B { pub fn into_body(self) -> B {
self.response.into_body() self.response.into_body()