Formatting

This commit is contained in:
Antoine Gersant 2018-10-28 17:03:25 -07:00
parent 8354eeff1d
commit 9f84b352b9

View file

@ -63,12 +63,14 @@ error_chain! {
impl<'r> rocket::response::Responder<'r> for Error { impl<'r> rocket::response::Responder<'r> for Error {
fn respond_to(self, _: &rocket::request::Request) -> rocket::response::Result<'r> { fn respond_to(self, _: &rocket::request::Request) -> rocket::response::Result<'r> {
let mut build = rocket::response::Response::build(); let mut build = rocket::response::Response::build();
build.status(match self.0 { build
ErrorKind::FileNotFound => rocket::http::Status::NotFound, .status(match self.0 {
_ => rocket::http::Status::InternalServerError, ErrorKind::FileNotFound => rocket::http::Status::NotFound,
}).ok() _ => rocket::http::Status::InternalServerError,
} })
.ok()
}
} }
impl From<Error> for IronError { impl From<Error> for IronError {