diff options
| author | Fuwn <[email protected]> | 2025-06-02 12:48:06 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-02 12:48:06 +0000 |
| commit | 2e8b40b36486b32b1e15a24a5313e5b604224d36 (patch) | |
| tree | 42f1054e27ed3719a46adf779f22fbf61caf94c0 | |
| parent | chore(just): Pin Fuwn/justfiles cargo.just (diff) | |
| download | september-2e8b40b36486b32b1e15a24a5313e5b604224d36.tar.xz september-2e8b40b36486b32b1e15a24a5313e5b604224d36.zip | |
style: Use nightly Rust formatter
| -rw-r--r-- | justfile | 5 | ||||
| -rw-r--r-- | src/html.rs | 6 | ||||
| -rw-r--r-- | src/main.rs | 3 | ||||
| -rw-r--r-- | src/response/configuration.rs | 28 |
4 files changed, 19 insertions, 23 deletions
@@ -1,7 +1,12 @@ import? 'cargo.just' +set allow-duplicate-recipes := true + default: @just --list fetch: curl https://raw.githubusercontent.com/Fuwn/justfiles/a6ca8a1b0475966ad10b68c44311ba3cb8b72a31/cargo.just > cargo.just + +fmt: + cargo +nightly fmt diff --git a/src/html.rs b/src/html.rs index 7c19578..c0425df 100644 --- a/src/html.rs +++ b/src/html.rs @@ -1,4 +1,8 @@ -use {germ::ast::Node, std::env::var, std::fmt::Write, url::Url}; +use { + germ::ast::Node, + std::{env::var, fmt::Write}, + url::Url, +}; fn link_from_host_href(url: &Url, href: &str) -> Option<String> { Some(format!( diff --git a/src/main.rs b/src/main.rs index b7e3129..070612c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,8 +14,7 @@ mod html; mod response; mod url; -#[macro_use] -extern crate log; +#[macro_use] extern crate log; use {actix_web::web, response::default, std::env::var}; diff --git a/src/response/configuration.rs b/src/response/configuration.rs index 42b42f1..4278516 100644 --- a/src/response/configuration.rs +++ b/src/response/configuration.rs @@ -1,6 +1,6 @@ pub struct Configuration { - is_proxy: bool, - is_raw: bool, + is_proxy: bool, + is_raw: bool, is_no_css: bool, } @@ -9,27 +9,15 @@ impl Configuration { Self { is_proxy: false, is_raw: false, is_no_css: false } } - pub const fn is_proxy(&self) -> bool { - self.is_proxy - } + pub const fn is_proxy(&self) -> bool { self.is_proxy } - pub const fn is_raw(&self) -> bool { - self.is_raw - } + pub const fn is_raw(&self) -> bool { self.is_raw } - pub const fn is_no_css(&self) -> bool { - self.is_no_css - } + pub const fn is_no_css(&self) -> bool { self.is_no_css } - pub fn set_proxy(&mut self, is_proxy: bool) { - self.is_proxy = is_proxy; - } + pub fn set_proxy(&mut self, is_proxy: bool) { self.is_proxy = is_proxy; } - pub fn set_raw(&mut self, is_raw: bool) { - self.is_raw = is_raw; - } + pub fn set_raw(&mut self, is_raw: bool) { self.is_raw = is_raw; } - pub fn set_no_css(&mut self, is_no_css: bool) { - self.is_no_css = is_no_css; - } + pub fn set_no_css(&mut self, is_no_css: bool) { self.is_no_css = is_no_css; } } |