Skip to content

ci: don't run release-plz on pull requests #9

ci: don't run release-plz on pull requests

ci: don't run release-plz on pull requests #9

Triggered via pull request August 3, 2024 03:11
Status Success
Total duration 43s
Artifacts

rust-check.yml

on: pull_request
stable / fmt
9s
stable / fmt
nightly / doc
18s
nightly / doc
Matrix: clippy
Fit to window
Zoom out
Zoom in

Annotations

16 warnings
this `else { if .. }` block can be collapsed: src/lib.rs#L265
warning: this `else { if .. }` block can be collapsed --> src/lib.rs:265:20 | 265 | } else { | ____________________^ 266 | | if let Some(ref data) = item.data { 267 | | self.events.push(MenuEvent::Selected(data.clone())); 268 | | } 269 | | } | |_____________^ | = 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 | 265 ~ } else if let Some(ref data) = item.data { 266 + self.events.push(MenuEvent::Selected(data.clone())); 267 + } |
redundant guard: src/lib.rs#L113
warning: redundant guard --> src/lib.rs:113:30 | 113 | Some(idx) if idx == 0 => { | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards = note: `#[warn(clippy::redundant_guards)]` on by default help: try | 113 - Some(idx) if idx == 0 => { 113 + Some(0) => { |
called `.iter_mut().nth()` on a `Vec`: src/lib.rs#L364
warning: called `.iter_mut().nth()` on a `Vec` --> src/lib.rs:364:31 | 364 | if let Some(it) = self.children.iter_mut().nth(0) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth = note: `#[warn(clippy::iter_nth)]` on by default help: `get_mut` is equivalent but more concise | 364 | if let Some(it) = self.children.get_mut(0) { | ~~~~~~~
called `map(..).flatten()` on `Option`: src/lib.rs#L471
warning: called `map(..).flatten()` on `Option` --> src/lib.rs:471:14 | 471 | .map(|x| x.highlight_child_mut()) | ______________^ 472 | | .flatten() | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|x| x.highlight_child_mut())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten = note: `#[warn(clippy::map_flatten)]` on by default
you should consider adding a `Default` implementation for `Menu<T>`: src/lib.rs#L495
warning: you should consider adding a `Default` implementation for `Menu<T>` --> src/lib.rs:495:5 | 495 | / pub fn new() -> Self { 496 | | Self { 497 | | highlight_item_style: Style::default().fg(Color::White).bg(Color::LightBlue), 498 | | default_item_style: Style::default().fg(Color::White), ... | 502 | | } 503 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 494 + impl<T> Default for Menu<T> { 495 + fn default() -> Self { 496 + Self::new() 497 + } 498 + } |
casting to the same type is unnecessary (`u16` -> `u16`): src/lib.rs#L547
warning: casting to the same type is unnecessary (`u16` -> `u16`) --> src/lib.rs:547:17 | 547 | x as u16, | ^^^^^^^^ help: try: `x` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
parameter is only used in recursion: src/lib.rs#L536
warning: parameter is only used in recursion --> src/lib.rs:536:9 | 536 | depth: usize, | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` | note: parameter used here --> src/lib.rs:567:21 | 567 | depth + 1, | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion = note: `#[warn(clippy::only_used_in_recursion)]` on by default
casting to the same type is unnecessary (`u16` -> `u16`): src/lib.rs#L597
warning: casting to the same type is unnecessary (`u16` -> `u16`) --> src/lib.rs:597:59 | 597 | self.render_drop_down(group_x_pos as u16, y_pos as u16 + 1, &item.children, buf, 1); | ^^^^^^^^^^^^ help: try: `y_pos` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
this `else { if .. }` block can be collapsed: src/lib.rs#L265
warning: this `else { if .. }` block can be collapsed --> src/lib.rs:265:20 | 265 | } else { | ____________________^ 266 | | if let Some(ref data) = item.data { 267 | | self.events.push(MenuEvent::Selected(data.clone())); 268 | | } 269 | | } | |_____________^ | = 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 | 265 ~ } else if let Some(ref data) = item.data { 266 + self.events.push(MenuEvent::Selected(data.clone())); 267 + } |
redundant guard: src/lib.rs#L113
warning: redundant guard --> src/lib.rs:113:30 | 113 | Some(idx) if idx == 0 => { | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards = note: `#[warn(clippy::redundant_guards)]` on by default help: try | 113 - Some(idx) if idx == 0 => { 113 + Some(0) => { |
called `.iter_mut().nth()` on a `Vec`: src/lib.rs#L364
warning: called `.iter_mut().nth()` on a `Vec` --> src/lib.rs:364:31 | 364 | if let Some(it) = self.children.iter_mut().nth(0) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth = note: `#[warn(clippy::iter_nth)]` on by default help: `get_mut` is equivalent but more concise | 364 | if let Some(it) = self.children.get_mut(0) { | ~~~~~~~
called `map(..).flatten()` on `Option`: src/lib.rs#L471
warning: called `map(..).flatten()` on `Option` --> src/lib.rs:471:14 | 471 | .map(|x| x.highlight_child_mut()) | ______________^ 472 | | .flatten() | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|x| x.highlight_child_mut())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten = note: `#[warn(clippy::map_flatten)]` on by default
you should consider adding a `Default` implementation for `Menu<T>`: src/lib.rs#L495
warning: you should consider adding a `Default` implementation for `Menu<T>` --> src/lib.rs:495:5 | 495 | / pub fn new() -> Self { 496 | | Self { 497 | | highlight_item_style: Style::default().fg(Color::White).bg(Color::LightBlue), 498 | | default_item_style: Style::default().fg(Color::White), ... | 502 | | } 503 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 494 + impl<T> Default for Menu<T> { 495 + fn default() -> Self { 496 + Self::new() 497 + } 498 + } |
casting to the same type is unnecessary (`u16` -> `u16`): src/lib.rs#L547
warning: casting to the same type is unnecessary (`u16` -> `u16`) --> src/lib.rs:547:17 | 547 | x as u16, | ^^^^^^^^ help: try: `x` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
parameter is only used in recursion: src/lib.rs#L536
warning: parameter is only used in recursion --> src/lib.rs:536:9 | 536 | depth: usize, | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` | note: parameter used here --> src/lib.rs:567:21 | 567 | depth + 1, | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion = note: `#[warn(clippy::only_used_in_recursion)]` on by default
casting to the same type is unnecessary (`u16` -> `u16`): src/lib.rs#L597
warning: casting to the same type is unnecessary (`u16` -> `u16`) --> src/lib.rs:597:59 | 597 | self.render_drop_down(group_x_pos as u16, y_pos as u16 + 1, &item.children, buf, 1); | ^^^^^^^^^^^^ help: try: `y_pos` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast