mirror of https://github.com/fafhrd91/actix-web
Remove checked_expr
This commit is contained in:
parent
93112644d3
commit
f1fbeb8ed1
|
@ -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
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue