From ce52c671625ed746b42f55f5848c8d850ad29831 Mon Sep 17 00:00:00 2001 From: Anton Yemelyanov Date: Sat, 14 Sep 2024 22:48:40 +0300 Subject: [PATCH] lints --- src/status.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/status.rs b/src/status.rs index f452b86..1462f6d 100644 --- a/src/status.rs +++ b/src/status.rs @@ -17,7 +17,7 @@ pub enum RequestKind { #[template(path = "index.html", escape = "none")] struct IndexTemplate { access: bool, - version : &'static str, + version: &'static str, } pub async fn logout_handler(resolver: &Arc, req: Request) -> impl IntoResponse { @@ -120,7 +120,10 @@ pub async fn status_handler(resolver: &Arc, req: RequestKind) -> impl Ok((Some(session), cookie)) => { session.touch(); - let index = IndexTemplate { access: true, version : crate::VERSION }; + let index = IndexTemplate { + access: true, + version: crate::VERSION, + }; if let Some(cookie) = cookie { Response::builder() @@ -152,11 +155,17 @@ pub async fn status_handler(resolver: &Arc, req: RequestKind) -> impl .body(Body::from(msg)) .unwrap(), Err(Error::Unauthorized) => { - let index = IndexTemplate { access: false, version : crate::VERSION }; + let index = IndexTemplate { + access: false, + version: crate::VERSION, + }; NoCacheHtml(index.render().unwrap()).into_response() } _ => { - let index = IndexTemplate { access: false, version : crate::VERSION }; + let index = IndexTemplate { + access: false, + version: crate::VERSION, + }; NoCacheHtml(index.render().unwrap()).into_response() } }