feat: add sub menus/categories #55
GitHub Actions / clippy
succeeded
Jun 16, 2024 in 0s
clippy
4 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 4 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check warning on line 112 in src/post.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> src/post.rs:103:5
|
103 | / pub fn new(
104 | | front_matter: FrontMatter,
105 | | excerpt: Option<String>,
106 | | content: String,
... |
111 | | ancestor_directories_names: Vec<String>,
112 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 190 in src/content.rs
github-actions / clippy
comparison to empty slice
warning: comparison to empty slice
--> src/content.rs:190:20
|
190 | if dir_index != "" {
| ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!dir_index.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
= note: `#[warn(clippy::comparison_to_empty)]` on by default
Check warning on line 174 in src/config/markup.rs
github-actions / clippy
assigning the result of `ToOwned::to_owned()` may be inefficient
warning: assigning the result of `ToOwned::to_owned()` may be inefficient
--> src/config/markup.rs:174:13
|
174 | target = "target=\"_blank\" ".to_owned();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `"target=\"_blank\" ".clone_into(&mut target)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
Check warning on line 200 in src/content.rs
github-actions / clippy
this `if` statement can be collapsed
warning: this `if` statement can be collapsed
--> src/content.rs:190:17
|
190 | / if dir_index != "" {
191 | | if site
192 | | .settings
193 | | .create_index_for
... |
199 | | }
200 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
190 ~ if dir_index != "" && site
191 + .settings
192 + .create_index_for
193 + .contains(&dir_index.to_string()) {
194 + let key = dir_index.to_string();
195 + let posts = indexes_to_create.entry(key).or_default();
196 + posts.push(post);
197 + }
|
Loading