Merge branch 'master' into master

This commit is contained in:
Rob Ede 2024-06-07 15:12:51 +01:00 committed by GitHub
commit a585ecfe7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -2,9 +2,10 @@
## Unreleased
# Added
### Added
- Add `guard::GuardContext::app_data()` method.
- Implement `From<Box<dyn ResponseError>>` for `Error`.
## 4.6.0

View File

@ -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()