1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

refactor ResponseError trait

This commit is contained in:
Nikolay Kim
2019-11-26 16:07:39 +06:00
parent 4dc31aac93
commit f73f97353b
11 changed files with 105 additions and 111 deletions

View File

@ -35,7 +35,7 @@ pub enum UriSegmentError {
/// Return `BadRequest` for `UriSegmentError`
impl ResponseError for UriSegmentError {
fn error_response(&self) -> HttpResponse {
HttpResponse::new(StatusCode::BAD_REQUEST)
fn status_code(&self) -> StatusCode {
StatusCode::BAD_REQUEST
}
}