mirror of
https://github.com/tokio-rs/axum.git
synced 2025-09-30 14:31:16 +00:00
Add Error::into_inner (#1476)
This commit is contained in:
parent
199a7a66b8
commit
b378fb283f
@ -8,8 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
# Unreleased
|
||||
|
||||
- **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
|
||||
[#1476]: https://github.com/tokio-rs/axum/pull/1476
|
||||
|
||||
# 0.3.0-rc.2 (10. September, 2022)
|
||||
|
||||
|
@ -14,6 +14,11 @@ impl Error {
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user