diff --git a/actix-http/src/error.rs b/actix-http/src/error.rs index 2c01c86db..c914f4321 100644 --- a/actix-http/src/error.rs +++ b/actix-http/src/error.rs @@ -132,6 +132,14 @@ impl std::error::Error for Error { } } +/// Convert `INTERNAL_SERVER_ERROR` to `std::convert::Infallible` +impl From for Error { + fn from(_: std::convert::Infallible) -> Self { + // `std::convert::Infallible` should never happen + unreachable!() + } +} + /// Convert `Error` to a `Response` instance impl From for Response { fn from(err: Error) -> Self {