1
0
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:
Nikolay Kim
2018-05-15 19:07:43 -07:00
parent f82fa08d72
commit 0d36b8f826
2 changed files with 7 additions and 10 deletions

View File

@@ -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")
}
}