mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 08:57:00 +02:00
fix 1.24 compatibility
This commit is contained in:
@@ -88,7 +88,7 @@ impl fmt::Debug for Error {
|
||||
}
|
||||
}
|
||||
|
||||
/// `HttpResponse` for `Error`
|
||||
/// Convert `Error` to a `HttpResponse` instance
|
||||
impl From<Error> for HttpResponse {
|
||||
fn from(err: Error) -> Self {
|
||||
HttpResponse::from_error(err)
|
||||
@@ -317,10 +317,7 @@ pub enum HttpRangeError {
|
||||
/// Return `BadRequest` for `HttpRangeError`
|
||||
impl ResponseError for HttpRangeError {
|
||||
fn error_response(&self) -> HttpResponse {
|
||||
HttpResponse::with_body(
|
||||
StatusCode::BAD_REQUEST,
|
||||
"Invalid Range header provided",
|
||||
)
|
||||
HttpResponse::with_body(StatusCode::BAD_REQUEST, "Invalid Range header provided")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user