mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-03 00:00:07 +02:00
Add Error::into_inner (#1476)
This commit is contained in:
@@ -8,8 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
- **added:** Add `DefaultBodyLimit::max` for changing the default body limit ([#1397])
|
- **added:** Add `DefaultBodyLimit::max` for changing the default body limit ([#1397])
|
||||||
|
- **added:** Add `Error::into_inner` for converting `Error` to `BoxError` without allocating ([#1476])
|
||||||
|
|
||||||
[#1397]: https://github.com/tokio-rs/axum/pull/1397
|
[#1397]: https://github.com/tokio-rs/axum/pull/1397
|
||||||
|
[#1476]: https://github.com/tokio-rs/axum/pull/1476
|
||||||
|
|
||||||
# 0.3.0-rc.2 (10. September, 2022)
|
# 0.3.0-rc.2 (10. September, 2022)
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ impl Error {
|
|||||||
inner: error.into(),
|
inner: error.into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Convert an `Error` back into the underlying boxed trait object.
|
||||||
|
pub fn into_inner(self) -> BoxError {
|
||||||
|
self.inner
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Error {
|
impl fmt::Display for Error {
|
||||||
|
|||||||
Reference in New Issue
Block a user