Apply cargo fmt

This commit is contained in:
Valentin Brandl 2020-03-21 13:02:53 +01:00
parent 7af58de9fa
commit 9fef178a27
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -43,13 +43,17 @@ impl ResponseError for Error {
let mut buf = Vec::new(); let mut buf = Vec::new();
match self { match self {
Error::GitNoMaster => { Error::GitNoMaster => {
templates::p404_no_master(&mut buf, VERSION_INFO, REPO_COUNT.load(Ordering::Relaxed)).unwrap(); templates::p404_no_master(
HttpResponse::NotFound() &mut buf,
.content_type("text/html") VERSION_INFO,
.body(buf) REPO_COUNT.load(Ordering::Relaxed),
}, )
.unwrap();
HttpResponse::NotFound().content_type("text/html").body(buf)
}
_ => { _ => {
templates::p500(&mut buf, VERSION_INFO, REPO_COUNT.load(Ordering::Relaxed)).unwrap(); templates::p500(&mut buf, VERSION_INFO, REPO_COUNT.load(Ordering::Relaxed))
.unwrap();
HttpResponse::InternalServerError() HttpResponse::InternalServerError()
.content_type("text/html") .content_type("text/html")
.body(buf) .body(buf)