From 25aea0f04d17838b934a6d62b3d2eec09e19a7d8 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Thu, 27 Jul 2023 10:38:34 +0200 Subject: [PATCH] Apply `cargo fmt` --- src/error.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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) + } } }