diff --git a/src/error.rs b/src/error.rs index 4274a30..96b9974 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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) + } } }