diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/html.rs | 4 | ||||
| -rw-r--r-- | src/response.rs | 6 |
2 files changed, 3 insertions, 7 deletions
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<String> { 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<HttpResponse, Error> { - 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() |