Skip to content

feat: a11y applet #1097

feat: a11y applet

feat: a11y applet #1097

Triggered via pull request November 1, 2024 14:31
@wash2wash2
synchronize #703
a11y
Status Success
Total duration 2m 37s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
taken reference of right operand: cosmic-app-list/cosmic-app-list-config/src/lib.rs#L45
warning: taken reference of right operand --> cosmic-app-list/cosmic-app-list-config/src/lib.rs:45:63 | 45 | if let Some(pos) = self.favorites.iter().position(|e| e == &id) { | ^^^^^--- | | | help: use the right value directly: `id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref = note: `#[warn(clippy::op_ref)]` on by default
this `if` statement can be collapsed: cosmic-applet-audio/src/mouse_area.rs#L303
warning: this `if` statement can be collapsed --> cosmic-applet-audio/src/mouse_area.rs:303:9 | 303 | / if !state.is_out_of_bounds { 304 | | if widget 305 | | .on_mouse_enter 306 | | .as_ref() ... | 317 | | } 318 | | } | |_________^ | = 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 | 303 ~ if !state.is_out_of_bounds && widget 304 + .on_mouse_enter 305 + .as_ref() 306 + .or(widget.on_mouse_exit.as_ref()) 307 + .is_some() { 308 + if let Event::Mouse(mouse::Event::CursorMoved { .. }) = event { 309 + state.is_out_of_bounds = true; 310 + if let Some(message) = widget.on_mouse_exit.as_ref() { 311 + shell.publish(message.clone()); 312 + } 313 + return event::Status::Captured; 314 + } 315 + } |
variants `StartListeningForDnd` and `StopListeningForDnd` are never constructed: cosmic-app-list/src/app.rs#L367
warning: variants `StartListeningForDnd` and `StopListeningForDnd` are never constructed --> cosmic-app-list/src/app.rs:367:5 | 343 | enum Message { | ------- variants in this enum ... 367 | StartListeningForDnd, | ^^^^^^^^^^^^^^^^^^^^ 368 | StopListeningForDnd, | ^^^^^^^^^^^^^^^^^^^ | = note: `Message` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default
this function has too many arguments (9/7): cosmic-app-list/src/app.rs#L142
warning: this function has too many arguments (9/7) --> cosmic-app-list/src/app.rs:142:5 | 142 | / fn as_icon( 143 | | &self, 144 | | applet: &Context, 145 | | rectangle_tracker: Option<&RectangleTracker<DockItemId>>, ... | 151 | | window_id: window::Id, 152 | | ) -> Element<'_, Message> { | |_____________________________^ | = 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
useless conversion to the same type: `u32`: cosmic-app-list/src/app.rs#L256
warning: useless conversion to the same type: `u32` --> cosmic-app-list/src/app.rs:256:57 | 256 | Some(Message::TopLevelListPopup((*id).into(), window_id)) | ^^^^^^^^^^^^ help: consider removing `.into()`: `(*id)` | = 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
useless conversion to the same type: `u32`: cosmic-app-list/src/app.rs#L261
warning: useless conversion to the same type: `u32` --> cosmic-app-list/src/app.rs:261:46 | 261 | .on_right_release(Message::Popup((*id).into(), window_id)) | ^^^^^^^^^^^^ help: consider removing `.into()`: `(*id)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `u32`: cosmic-app-list/src/app.rs#L264
warning: useless conversion to the same type: `u32` --> cosmic-app-list/src/app.rs:264:55 | 264 | .unwrap_or_else(|| Message::Popup((*id).into(), window_id)) | ^^^^^^^^^^^^ help: consider removing `.into()`: `(*id)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
casting to the same type is unnecessary (`usize` -> `usize`): cosmic-app-list/src/app.rs#L1276
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> cosmic-app-list/src/app.rs:1276:25 | 1276 | (active_popup_cutoff.unwrap_or_default()).saturating_sub(1) as usize, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(active_popup_cutoff.unwrap_or_default()).saturating_sub(1)` | = 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
casting to the same type is unnecessary (`usize` -> `usize`): cosmic-app-list/src/app.rs#L1332
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> cosmic-app-list/src/app.rs:1332:25 | 1332 | favorite_popup_cutoff.unwrap_or_default().saturating_sub(1) as usize, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `favorite_popup_cutoff.unwrap_or_default().saturating_sub(1)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
length comparison to zero: cosmic-app-list/src/app.rs#L1773
warning: length comparison to zero --> cosmic-app-list/src/app.rs:1773:24 | 1773 | if toplevels.len() > 0 { | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!toplevels.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default