Add Error::into_inner (#1476)

This commit is contained in:
Jonas Platte
2022-10-13 11:44:54 +02:00
committed by GitHub
parent 199a7a66b8
commit b378fb283f
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -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 {