Apply cargo fmt
This commit is contained in:
parent
7af58de9fa
commit
9fef178a27
16
src/error.rs
16
src/error.rs
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user