mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
Remove checked_expr (#2401)
This commit is contained in:
parent
a3806cde19
commit
a6707fb7ee
@ -8,9 +8,13 @@
|
|||||||
* Associated type `FromRequest::Config` was removed. [#2233]
|
* Associated type `FromRequest::Config` was removed. [#2233]
|
||||||
* Inner field made private on `web::Payload`. [#2384]
|
* Inner field made private on `web::Payload`. [#2384]
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
* `ServiceResponse::checked_expr` was a legacy and just removed. [#2401]
|
||||||
|
|
||||||
[#2233]: https://github.com/actix/actix-web/pull/2233
|
[#2233]: https://github.com/actix/actix-web/pull/2233
|
||||||
[#2362]: https://github.com/actix/actix-web/pull/2362
|
[#2362]: https://github.com/actix/actix-web/pull/2362
|
||||||
[#2384]: https://github.com/actix/actix-web/pull/2384
|
[#2384]: https://github.com/actix/actix-web/pull/2384
|
||||||
|
[#2401]: https://github.com/actix/actix-web/pull/2401
|
||||||
|
|
||||||
|
|
||||||
## 4.0.0-beta.9 - 2021-09-09
|
## 4.0.0-beta.9 - 2021-09-09
|
||||||
|
@ -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
Block a user