aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-12 08:23:38 +0000
committerFuwn <[email protected]>2023-12-12 08:23:38 +0000
commitfd666010226b7aaaa001b283347d34a0763416a1 (patch)
tree1cd1acc1f8cda40e1e0945713f252a05ffd9ebd2 /src
parentdeps(germ): bump from 0.3.9 to 0.3.10 (diff)
downloadseptember-fd666010226b7aaaa001b283347d34a0763416a1.tar.xz
september-fd666010226b7aaaa001b283347d34a0763416a1.zip
style: use rustfmt
Diffstat (limited to 'src')
-rw-r--r--src/html.rs4
-rw-r--r--src/response.rs6
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()