mirror of
https://github.com/actix/actix-web.git
synced 2024-11-25 11:01:14 +00:00
From Boxed ResponseError impl added (#3388)
* From Boxed ResponseError impl added * docs: update changelog --------- Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
parent
ebd8bb266d
commit
85655f731d
2 changed files with 10 additions and 0 deletions
|
@ -2,6 +2,10 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Added
|
||||
|
||||
- Implement `From<Box<dyn ResponseError>>` for `Error`.
|
||||
|
||||
## 4.6.0
|
||||
|
||||
### Added
|
||||
|
|
|
@ -60,6 +60,12 @@ impl<T: ResponseError + 'static> From<T> for Error {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Box<dyn ResponseError>> for Error {
|
||||
fn from(value: Box<dyn ResponseError>) -> Self {
|
||||
Error { cause: value }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Error> for Response<BoxBody> {
|
||||
fn from(err: Error) -> Response<BoxBody> {
|
||||
err.error_response().into()
|
||||
|
|
Loading…
Reference in a new issue