fix(audio-applet): Render input volume level instead of output. #1041
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#L301
warning: this `if` statement can be collapsed
--> cosmic-applet-audio/src/mouse_area.rs:301:9
|
301 | / if !state.is_out_of_bounds {
302 | | if widget
303 | | .on_mouse_enter
304 | | .as_ref()
... |
315 | | }
316 | | }
| |_________^
|
= 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
|
301 ~ if !state.is_out_of_bounds && widget
302 + .on_mouse_enter
303 + .as_ref()
304 + .or(widget.on_mouse_exit.as_ref())
305 + .is_some() {
306 + if let Event::Mouse(mouse::Event::CursorMoved { .. }) = event {
307 + state.is_out_of_bounds = true;
308 + if let Some(message) = widget.on_mouse_exit.as_ref() {
309 + shell.publish(message.clone());
310 + }
311 + return event::Status::Captured;
312 + }
313 + }
|
|
variant `OpenSettings` is never constructed:
cosmic-applet-notifications/src/lib.rs#L95
warning: variant `OpenSettings` is never constructed
--> cosmic-applet-notifications/src/lib.rs:95:5
|
83 | enum Message {
| ------- variant in this enum
...
95 | OpenSettings,
| ^^^^^^^^^^^^
|
= 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
|
field `0` is never read:
cosmic-applet-audio/src/pulse.rs#L454
warning: field `0` is never read
--> cosmic-applet-audio/src/pulse.rs:454:16
|
454 | IterateErr(IterateResult),
| ---------- ^^^^^^^^^^^^^
| |
| field in this variant
|
= note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
454 | IterateErr(()),
| ~~
|
field `0` is never read:
cosmic-applet-audio/src/pulse.rs#L455
warning: field `0` is never read
--> cosmic-applet-audio/src/pulse.rs:455:16
|
455 | ContextErr(pulse::context::State),
| ---------- ^^^^^^^^^^^^^^^^^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
455 | ContextErr(()),
| ~~
|
field `0` is never read:
cosmic-applet-audio/src/pulse.rs#L456
warning: field `0` is never read
--> cosmic-applet-audio/src/pulse.rs:456:18
|
456 | OperationErr(pulse::operation::State),
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
456 | OperationErr(()),
| ~~
|
field `0` is never read:
cosmic-applet-audio/src/pulse.rs#L457
warning: field `0` is never read
--> cosmic-applet-audio/src/pulse.rs:457:11
|
457 | PAErr(PAErr),
| ----- ^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
457 | PAErr(()),
| ~~
|
field `0` is never read:
cosmic-applet-audio/src/pulse.rs#L459
warning: field `0` is never read
--> cosmic-applet-audio/src/pulse.rs:459:10
|
459 | Misc(&'a str),
| ---- ^^^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
459 | Misc(()),
| ~~
|
fields `user_name`, `host_name`, `server_version`, `server_name`, and `cookie` are never read:
cosmic-applet-audio/src/pulse.rs#L812
warning: fields `user_name`, `host_name`, `server_version`, `server_name`, and `cookie` are never read
--> cosmic-applet-audio/src/pulse.rs:812:9
|
810 | pub struct ServerInfo {
| ---------- fields in this struct
811 | /// User name of the daemon process.
812 | pub user_name: Option<String>,
| ^^^^^^^^^
813 | /// Host name the daemon is running on.
814 | pub host_name: Option<String>,
| ^^^^^^^^^
815 | /// Version string of the daemon.
816 | pub server_version: Option<String>,
| ^^^^^^^^^^^^^^
817 | /// Server package name (usually “pulseaudio”).
818 | pub server_name: Option<String>,
| ^^^^^^^^^^^
...
826 | pub cookie: u32,
| ^^^^^^
|
= note: `ServerInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
|
using `.iter().next()` on an array:
cosmic-applet-audio/src/mouse_area.rs#L268
warning: using `.iter().next()` on an array
--> cosmic-applet-audio/src/mouse_area.rs:268:30
|
268 | if let Some(state) = state.children.iter().next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling: `state.children.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice
= note: `#[warn(clippy::iter_next_slice)]` on by default
|