mirror of https://github.com/fafhrd91/actix-web
From Boxed ResponseError impl added
This commit is contained in:
parent
dd84bcb609
commit
3d583f3d85
|
@ -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> {
|
impl From<Error> for Response<BoxBody> {
|
||||||
fn from(err: Error) -> Response<BoxBody> {
|
fn from(err: Error) -> Response<BoxBody> {
|
||||||
err.error_response().into()
|
err.error_response().into()
|
||||||
|
|
Loading…
Reference in New Issue