1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-23 16:21:06 +01:00

Remove checked_expr (#2401)

This commit is contained in:
Omid Rad 2021-10-11 19:28:09 +02:00 committed by GitHub
parent a3806cde19
commit a6707fb7ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 10 deletions

View File

@ -8,9 +8,13 @@
* Associated type `FromRequest::Config` was removed. [#2233]
* 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
[#2362]: https://github.com/actix/actix-web/pull/2362
[#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

View File

@ -393,16 +393,6 @@ impl<B> ServiceResponse<B> {
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
pub fn into_body(self) -> B {
self.response.into_body()