Skip to content

Commit e71c63c

Browse files
committed
style: Use nightly Rust formatter
1 parent 4475a63 commit e71c63c

File tree

4 files changed

+19
-23
lines changed

4 files changed

+19
-23
lines changed

justfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import? 'cargo.just'
22

3+
set allow-duplicate-recipes := true
4+
35
default:
46
@just --list
57

68
fetch:
79
curl https://raw.githubusercontent.com/Fuwn/justfiles/a6ca8a1b0475966ad10b68c44311ba3cb8b72a31/cargo.just > cargo.just
10+
11+
fmt:
12+
cargo +nightly fmt

src/html.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
use {germ::ast::Node, std::env::var, std::fmt::Write, url::Url};
1+
use {
2+
germ::ast::Node,
3+
std::{env::var, fmt::Write},
4+
url::Url,
5+
};
26

37
fn link_from_host_href(url: &Url, href: &str) -> Option<String> {
48
Some(format!(

src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ mod html;
1414
mod response;
1515
mod url;
1616

17-
#[macro_use]
18-
extern crate log;
17+
#[macro_use] extern crate log;
1918

2019
use {actix_web::web, response::default, std::env::var};
2120

src/response/configuration.rs

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pub struct Configuration {
2-
is_proxy: bool,
3-
is_raw: bool,
2+
is_proxy: bool,
3+
is_raw: bool,
44
is_no_css: bool,
55
}
66

@@ -9,27 +9,15 @@ impl Configuration {
99
Self { is_proxy: false, is_raw: false, is_no_css: false }
1010
}
1111

12-
pub const fn is_proxy(&self) -> bool {
13-
self.is_proxy
14-
}
12+
pub const fn is_proxy(&self) -> bool { self.is_proxy }
1513

16-
pub const fn is_raw(&self) -> bool {
17-
self.is_raw
18-
}
14+
pub const fn is_raw(&self) -> bool { self.is_raw }
1915

20-
pub const fn is_no_css(&self) -> bool {
21-
self.is_no_css
22-
}
16+
pub const fn is_no_css(&self) -> bool { self.is_no_css }
2317

24-
pub fn set_proxy(&mut self, is_proxy: bool) {
25-
self.is_proxy = is_proxy;
26-
}
18+
pub fn set_proxy(&mut self, is_proxy: bool) { self.is_proxy = is_proxy; }
2719

28-
pub fn set_raw(&mut self, is_raw: bool) {
29-
self.is_raw = is_raw;
30-
}
20+
pub fn set_raw(&mut self, is_raw: bool) { self.is_raw = is_raw; }
3121

32-
pub fn set_no_css(&mut self, is_no_css: bool) {
33-
self.is_no_css = is_no_css;
34-
}
22+
pub fn set_no_css(&mut self, is_no_css: bool) { self.is_no_css = is_no_css; }
3523
}

0 commit comments

Comments
 (0)