From 012ffa2e7ec51de3e269dd786199ce3fb326a46c Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 12 Dec 2023 08:23:38 +0000 Subject: style: use rustfmt --- src/html.rs | 4 +--- src/response.rs | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/html.rs b/src/html.rs index bdf4206..c30f5c0 100644 --- a/src/html.rs +++ b/src/html.rs @@ -21,9 +21,7 @@ fn link_from_host_href(url: &Url, href: &str) -> Option { Some(format!( "gemini://{}{}{}", url.domain()?, - { - if href.starts_with('/') { "" } else { "/" } - }, + { if href.starts_with('/') { "" } else { "/" } }, href )) } diff --git a/src/response.rs b/src/response.rs index 6c8c760..4f7c693 100644 --- a/src/response.rs +++ b/src/response.rs @@ -25,10 +25,8 @@ use { pub async fn default( req: actix_web::HttpRequest, ) -> Result { - if vec![ - "/proxy", "/proxy/", "/x", "/x/", "/raw", "/raw/", "/nocss", "/nocss/", - ] - .contains(&req.path()) + if ["/proxy", "/proxy/", "/x", "/x/", "/raw", "/raw/", "/nocss", "/nocss/"] + .contains(&req.path()) { return Ok( HttpResponse::Ok() -- cgit v1.2.3