Skip to content

feat: publish neovim post #96

feat: publish neovim post

feat: publish neovim post #96

Triggered via push July 16, 2024 08:08
Status Success
Total duration 1m 16s
Artifacts

rust.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

16 warnings
this function has too many arguments (8/7): src/post.rs#L140
warning: this function has too many arguments (8/7) --> src/post.rs:140:5 | 140 | / pub fn new( 141 | | front_matter: FrontMatter, 142 | | excerpt: Option<String>, 143 | | content: String, ... | 148 | | ancestor_directories_names: Vec<String>, 149 | | ) -> 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
comparison to empty slice: src/content.rs#L447
warning: comparison to empty slice --> src/content.rs:447:20 | 447 | 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
the following explicit lifetimes could be elided: 'a: src/content.rs#L420
warning: the following explicit lifetimes could be elided: 'a --> src/content.rs:420:27 | 420 | pub fn get_posts_per_tags<'a>(posts: &'a [Post]) -> HashMap<String, Vec<&'a Post>> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 420 - pub fn get_posts_per_tags<'a>(posts: &'a [Post]) -> HashMap<String, Vec<&'a Post>> { 420 + pub fn get_posts_per_tags(posts: &[Post]) -> HashMap<String, Vec<&Post>> { |
unnecessary use of `to_string`: src/content.rs#L411
warning: unnecessary use of `to_string` --> src/content.rs:411:21 | 411 | slugify(tag.to_string()) | ^^^^^^^^^^^^^^^ help: use: `tag` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned = note: `#[warn(clippy::unnecessary_to_owned)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/content.rs#L348
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/content.rs:348:13 | 348 | &post, | ^^^^^ help: change this to: `post` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
useless conversion to the same type: `std::option::Option<pulldown_cmark::CowStr<'_>>`: src/content.rs#L222
warning: useless conversion to the same type: `std::option::Option<pulldown_cmark::CowStr<'_>>` --> src/content.rs:222:29 | 222 | id: id.clone().or(Some(slug.clone().into())).into(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `id.clone().or(Some(slug.clone().into()))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
this expression creates a reference which is immediately dereferenced by the compiler: src/content.rs#L153
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/content.rs:153:9 | 153 | &site.settings.website_title.as_str(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `site.settings.website_title.as_str()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/content.rs#L152
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/content.rs:152:9 | 152 | &site.settings.author.as_str(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `site.settings.author.as_str()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/content.rs#L151
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/content.rs:151:9 | 151 | &site.settings.base_url.as_str(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `site.settings.base_url.as_str()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/content.rs#L145
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/content.rs:145:9 | 145 | &site.settings.base_url.as_str(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `site.settings.base_url.as_str()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
useless conversion to the same type: `std::string::String`: src/content.rs#L96
warning: useless conversion to the same type: `std::string::String` --> src/content.rs:96:9 | 96 | / match *i { 97 | | 0 => anchor, 98 | | i => format!("{}-{}", anchor, i), 99 | | } 100 | | .into() | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default help: consider removing `.into()` | 96 ~ match *i { 97 + 0 => anchor, 98 + i => format!("{}-{}", anchor, i), 99 + } |
assigning the result of `ToOwned::to_owned()` may be inefficient: src/config/markup.rs#L174
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
this `if` statement can be collapsed: src/content.rs#L447
warning: this `if` statement can be collapsed --> src/content.rs:447:17 | 447 | / if dir_index != "" { 448 | | if site 449 | | .settings 450 | | .create_index_for ... | 456 | | } 457 | | } | |_________________^ | = 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 | 447 ~ if dir_index != "" && site 448 + .settings 449 + .create_index_for 450 + .contains(&dir_index.to_string()) { 451 + let key = dir_index.to_string(); 452 + let posts = indexes_to_create.entry(key).or_default(); 453 + posts.push(post); 454 + } |
this `else { if .. }` block can be collapsed: src/content.rs#L178
warning: this `else { if .. }` block can be collapsed --> src/content.rs:178:24 | 178 | } else { | ________________________^ 179 | | if let Some(ref mut code_block) = code_block { 180 | | let html = code_block.highlight(&text); 181 | | events.push(Event::Html(html.into())); ... | 185 | | } 186 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 178 ~ } else if let Some(ref mut code_block) = code_block { 179 + let html = code_block.highlight(&text); 180 + events.push(Event::Html(html.into())); 181 + } else { 182 + events.push(Event::Text(text)); 183 + continue; 184 + } |
build
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/