Apply cargo fmt
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Valentin Brandl 2023-07-27 10:38:34 +02:00
parent 410a602638
commit 25aea0f04d

View File

@ -41,16 +41,15 @@ impl ResponseError for Error {
fn error_response(&self) -> HttpResponse {
let mut buf = Vec::new();
if let Error::BranchNotFound = self {
templates::p404_no_master_html(&mut buf, VERSION_INFO, 0).unwrap();
HttpResponse::NotFound().content_type("text/html").body(buf)
}
else {
templates::p500_html(&mut buf, VERSION_INFO, 0).unwrap();
HttpResponse::InternalServerError()
.content_type("text/html")
.body(buf)
}
if let Error::BranchNotFound = self {
templates::p404_no_master_html(&mut buf, VERSION_INFO, 0).unwrap();
HttpResponse::NotFound().content_type("text/html").body(buf)
} else {
templates::p500_html(&mut buf, VERSION_INFO, 0).unwrap();
HttpResponse::InternalServerError()
.content_type("text/html")
.body(buf)
}
}
}