Skip to content

Commit 6a53004

Browse files
committed
fix: Resolve Clippy linters + format
1 parent 7b37f4b commit 6a53004

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

crate/src/lib.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// @TODO: uncomment once https://github.com/rust-lang/rust/issues/54726 stable
22
//#![rustfmt::skip::macros(class)]
33

4-
#![allow(clippy::used_underscore_binding)]
5-
#![allow(clippy::non_ascii_literal)]
6-
#![allow(clippy::enum_glob_use)]
7-
#![allow(clippy::must_use_candidate)]
4+
#![allow(
5+
clippy::used_underscore_binding,
6+
clippy::non_ascii_literal,
7+
clippy::enum_glob_use,
8+
clippy::must_use_candidate,
9+
clippy::wildcard_imports
10+
)]
811

912
mod generated;
1013
mod page;
@@ -111,6 +114,7 @@ impl<'a> Urls<'a> {
111114
pub fn home(self) -> Url {
112115
self.base_url()
113116
}
117+
114118
pub fn about(self) -> Url {
115119
self.base_url().add_path_part(ABOUT)
116120
}
@@ -188,7 +192,6 @@ pub fn image_src(image: &str) -> String {
188192
format!("{}/{}", IMAGES_PATH, image)
189193
}
190194

191-
192195
pub fn asset_path(asset: &str) -> String {
193196
format!("{}/{}", STATIC_PATH, asset)
194197
}

crate/src/page/home.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::{
2-
generated::css_classes::C, image_src, Msg, MAIL_TO_HELLWEB, Urls,
2+
generated::css_classes::C, image_src, Msg, Urls, MAIL_TO_HELLWEB,
33
MAIL_TO_KAVIK,
44
};
55
use seed::{prelude::*, *};

crate/src/page/partial/header.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
use crate::{
22
asset_path,
33
generated::css_classes::C,
4-
image_src, Model, Msg, Page, ScrollHistory,
4+
image_src, Model, Msg, Page, ScrollHistory, Urls,
55
Visibility::{self, *},
6-
Urls,
76
};
87
use seed::{prelude::*, *};
98

@@ -17,8 +16,8 @@ fn header_visibility(
1716
let scrolling_up = scroll_history.front() >= scroll_history.back();
1817

1918
if menu_is_visible || at_the_top_or_higher || scrolling_up {
20-
return Visible
21-
}
19+
return Visible;
20+
}
2221
Hidden
2322
}
2423

0 commit comments

Comments
 (0)