diff options
| author | Fuwn <[email protected]> | 2023-12-12 08:23:38 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-12 08:23:38 +0000 |
| commit | 012ffa2e7ec51de3e269dd786199ce3fb326a46c (patch) | |
| tree | 40929c513c2b0d689d31bdeff85dd3d71d6aac55 | |
| parent | deps(germ): bump from 0.3.9 to 0.3.10 (diff) | |
| download | september-012ffa2e7ec51de3e269dd786199ce3fb326a46c.tar.xz september-012ffa2e7ec51de3e269dd786199ce3fb326a46c.zip | |
style: use rustfmt
| -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() |