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 {
fn respond_to(self, _: &rocket::request::Request) -> rocket::response::Result<'r> {
let mut build = rocket::response::Response::build();
build.status(match self.0 {
ErrorKind::FileNotFound => rocket::http::Status::NotFound,
_ => rocket::http::Status::InternalServerError,
}).ok()
}
let mut build = rocket::response::Response::build();
build
.status(match self.0 {
ErrorKind::FileNotFound => rocket::http::Status::NotFound,
_ => rocket::http::Status::InternalServerError,
})
.ok()
}
}
impl From<Error> for IronError {