diff options
| -rw-r--r-- | rustfmt.toml | 2 | ||||
| -rw-r--r-- | src/html.rs | 4 | ||||
| -rw-r--r-- | src/response.rs | 6 |
3 files changed, 3 insertions, 9 deletions
diff --git a/rustfmt.toml b/rustfmt.toml index 944c756..468dd47 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -10,13 +10,11 @@ inline_attribute_width = 80 match_arm_blocks = false max_width = 80 imports_granularity = "One" -merge_imports = true newline_style = "Unix" normalize_doc_attributes = true overflow_delimited_expr = true reorder_impl_items = true group_imports = "StdExternalCrate" -required_version = "1.5.2" struct_field_align_threshold = 40 tab_spaces = 2 use_field_init_shorthand = true 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() |