More work

This commit is contained in:
David Pedersen
2021-05-31 16:28:26 +02:00
parent 867dd8012c
commit f6b1a6f435
8 changed files with 600 additions and 27 deletions
+10
View File
@@ -49,6 +49,16 @@ pub enum Error {
InvalidUtf8,
}
impl Error {
/// Create an `Error` from a `BoxError` coming from a `Service`
pub(crate) fn from_service_error(error: BoxError) -> Error {
match error.downcast::<Error>() {
Ok(err) => *err,
Err(err) => Error::Service(err),
}
}
}
impl From<Infallible> for Error {
fn from(err: Infallible) -> Self {
match err {}