[INFO] fetching crate stasis 1.1.0... [INFO] linting stasis-1.1.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate stasis 1.1.0 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate stasis 1.1.0 [INFO] finished tweaking crates.io crate stasis 1.1.0 [INFO] tweaked toml for crates.io crate stasis 1.1.0 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate stasis 1.1.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate stasis 1.1.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded async-signal v0.2.13 [INFO] [stderr] Downloaded zbus_macros v5.14.0 [INFO] [stderr] Downloaded endi v1.1.1 [INFO] [stderr] Downloaded eventline v0.7.4 [INFO] [stderr] Downloaded wayland-sys v0.31.8 [INFO] [stderr] Downloaded zvariant_derive v5.10.0 [INFO] [stderr] Downloaded zvariant_utils v3.3.0 [INFO] [stderr] Downloaded zmij v1.0.15 [INFO] [stderr] Downloaded async-executor v1.13.3 [INFO] [stderr] Downloaded wayland-client v0.31.12 [INFO] [stderr] Downloaded wayland-scanner v0.31.8 [INFO] [stderr] Downloaded procfs-core v0.18.0 [INFO] [stderr] Downloaded rune-cfg v0.4.3 [INFO] [stderr] Downloaded wayland-backend v0.3.12 [INFO] [stderr] Downloaded procfs v0.18.0 [INFO] [stderr] Downloaded sysinfo v0.38.2 [INFO] [stderr] Downloaded zbus v5.14.0 [INFO] [stderr] Downloaded zvariant v5.10.0 [INFO] [stderr] Downloaded ntapi v0.4.2 [INFO] [stderr] Downloaded wayland-protocols v0.32.10 [INFO] [stderr] Downloaded async-process v2.5.0 [INFO] [stderr] Downloaded zbus_names v4.3.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 8deb40f94db2a7f4e1095b885a8db2664cb763bbffc24f89a56d06bd419a8d74 [INFO] running `Command { std: "docker" "start" "-a" "8deb40f94db2a7f4e1095b885a8db2664cb763bbffc24f89a56d06bd419a8d74", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8deb40f94db2a7f4e1095b885a8db2664cb763bbffc24f89a56d06bd419a8d74", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8deb40f94db2a7f4e1095b885a8db2664cb763bbffc24f89a56d06bd419a8d74", kill_on_drop: false }` [INFO] [stdout] 8deb40f94db2a7f4e1095b885a8db2664cb763bbffc24f89a56d06bd419a8d74 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 243b9738e7fe6cb9740c5d369ac62230cd23a2e6986b85b41daeede6e6601a1d [INFO] running `Command { std: "docker" "start" "-a" "243b9738e7fe6cb9740c5d369ac62230cd23a2e6986b85b41daeede6e6601a1d", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.105 [INFO] [stderr] Compiling quote v1.0.43 [INFO] [stderr] Checking pin-project-lite v0.2.16 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Checking futures-core v0.3.32 [INFO] [stderr] Checking parking v2.2.1 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Checking futures-io v0.3.32 [INFO] [stderr] Compiling rustix v1.1.4 [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking linux-raw-sys v0.12.1 [INFO] [stderr] Compiling toml_parser v1.0.6+spec-1.1.0 [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Checking cfg-if v1.0.4 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking slab v0.4.11 [INFO] [stderr] Checking fastrand v2.3.0 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking unicode-ident v1.0.22 [INFO] [stderr] Compiling find-msvc-tools v0.1.8 [INFO] [stderr] Compiling wayland-sys v0.31.8 [INFO] [stderr] Checking futures-lite v2.6.1 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Compiling async-io v2.6.0 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Checking winnow v0.7.14 [INFO] [stderr] Checking lock_api v0.4.14 [INFO] [stderr] Compiling cc v1.2.53 [INFO] [stderr] Checking utf8parse v0.2.2 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Compiling toml_edit v0.23.10+spec-1.0.0 [INFO] [stderr] Checking concurrent-queue v2.5.0 [INFO] [stderr] Checking async-task v4.7.1 [INFO] [stderr] Compiling endi v1.1.1 [INFO] [stderr] Checking futures-sink v0.3.32 [INFO] [stderr] Checking event-listener v5.4.1 [INFO] [stderr] Compiling zmij v1.0.15 [INFO] [stderr] Checking futures-channel v0.3.32 [INFO] [stderr] Checking anstyle-parse v0.2.7 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Compiling quick-xml v0.38.4 [INFO] [stderr] Checking colorchoice v1.0.4 [INFO] [stderr] Checking hex v0.4.3 [INFO] [stderr] Checking atomic-waker v1.1.2 [INFO] [stderr] Checking event-listener-strategy v0.5.4 [INFO] [stderr] Checking anstyle-query v1.1.5 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Checking futures-task v0.3.32 [INFO] [stderr] Checking downcast-rs v1.2.1 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Compiling wayland-client v0.31.12 [INFO] [stderr] Checking async-channel v2.5.0 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Checking is_terminal_polyfill v1.70.2 [INFO] [stderr] Checking anstyle v1.0.13 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking async-lock v3.4.2 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking piper v0.2.4 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Compiling proc-macro-crate v3.4.0 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking bytes v1.11.0 [INFO] [stderr] Checking equivalent v1.0.2 [INFO] [stderr] Compiling wayland-scanner v0.31.8 [INFO] [stderr] Checking itoa v1.0.17 [INFO] [stderr] Compiling procfs v0.18.0 [INFO] [stderr] Checking hashbrown v0.16.1 [INFO] [stderr] Checking option-ext v0.2.0 [INFO] [stderr] Checking strsim v0.11.1 [INFO] [stderr] Checking clap_lex v1.0.0 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking blocking v1.6.2 [INFO] [stderr] Checking sysinfo v0.38.2 [INFO] [stderr] Checking async-broadcast v0.7.2 [INFO] [stderr] Checking clap_builder v4.5.60 [INFO] [stderr] Checking indexmap v2.13.0 [INFO] [stderr] Checking procfs-core v0.18.0 [INFO] [stderr] Checking async-executor v1.13.3 [INFO] [stderr] Checking ordered-stream v0.2.0 [INFO] [stderr] Compiling wayland-backend v0.3.12 [INFO] [stderr] Checking iana-time-zone v0.1.64 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Checking chrono v0.4.44 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling enumflags2_derive v0.7.12 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling async-recursion v1.1.1 [INFO] [stderr] Compiling clap_derive v4.5.55 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Checking polling v3.11.0 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking async-signal v0.2.13 [INFO] [stderr] Checking async-process v2.5.0 [INFO] [stderr] Checking clap v4.5.60 [INFO] [stderr] Checking wayland-protocols v0.32.10 [INFO] [stderr] Checking futures-executor v0.3.32 [INFO] [stderr] Checking futures v0.3.32 [INFO] [stderr] Checking zvariant_utils v3.3.0 [INFO] [stderr] Checking enumflags2 v0.7.12 [INFO] [stderr] Checking rune-cfg v0.4.3 [INFO] [stderr] Checking eventline v0.7.4 [INFO] [stderr] Compiling zvariant_derive v5.10.0 [INFO] [stderr] Compiling zvariant v5.10.0 [INFO] [stderr] Checking zbus_names v4.3.1 [INFO] [stderr] Compiling zbus_macros v5.14.0 [INFO] [stderr] Checking zbus v5.14.0 [INFO] [stderr] Checking stasis v1.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/app/command.rs:120:29 [INFO] [stdout] | [INFO] [stdout] 120 | ... r#"{"text":"","alt":"not_running","class":"not_running","tooltip":"Stasis not running","profile":null}"# [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 119 - "{}", [INFO] [stdout] 120 - r#"{"text":"","alt":"not_running","class":"not_running","tooltip":"Stasis not running","profile":null}"# [INFO] [stdout] 119 + "{{\"text\":\"\",\"alt\":\"not_running\",\"class\":\"not_running\",\"tooltip\":\"Stasis not running\",\"profile\":null}}" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app/platform.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / if let Ok(display) = std::env::var("WAYLAND_DISPLAY") { [INFO] [stdout] 78 | | if !display.is_empty() { [INFO] [stdout] 79 | | return Ok(rt.join(display)); [INFO] [stdout] 80 | | } [INFO] [stdout] 81 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 77 ~ if let Ok(display) = std::env::var("WAYLAND_DISPLAY") [INFO] [stdout] 78 ~ && !display.is_empty() { [INFO] [stdout] 79 | return Ok(rt.join(display)); [INFO] [stdout] 80 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/bootstrap.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / if let Some(dir) = path.parent() { [INFO] [stdout] 17 | | if !dir.exists() { [INFO] [stdout] 18 | | fs::create_dir_all(dir)?; [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 16 ~ if let Some(dir) = path.parent() [INFO] [stdout] 17 ~ && !dir.exists() { [INFO] [stdout] 18 | fs::create_dir_all(dir)?; [INFO] [stdout] 19 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/app/command.rs:120:29 [INFO] [stdout] | [INFO] [stdout] 120 | ... r#"{"text":"","alt":"not_running","class":"not_running","tooltip":"Stasis not running","profile":null}"# [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 119 - "{}", [INFO] [stdout] 120 - r#"{"text":"","alt":"not_running","class":"not_running","tooltip":"Stasis not running","profile":null}"# [INFO] [stdout] 119 + "{{\"text\":\"\",\"alt\":\"not_running\",\"class\":\"not_running\",\"tooltip\":\"Stasis not running\",\"profile\":null}}" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/config/migrate.rs:402:32 [INFO] [stdout] | [INFO] [stdout] 402 | && l.raw_value.trim().split_whitespace().next() == Some("true") [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `fallbacks.get(0)` [INFO] [stdout] --> src/config/mod.rs:60:33 [INFO] [stdout] | [INFO] [stdout] 60 | if etc != primary && etc != fallbacks.get(0).cloned().unwrap_or_default() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `fallbacks.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app/platform.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / if let Ok(display) = std::env::var("WAYLAND_DISPLAY") { [INFO] [stdout] 78 | | if !display.is_empty() { [INFO] [stdout] 79 | | return Ok(rt.join(display)); [INFO] [stdout] 80 | | } [INFO] [stdout] 81 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 77 ~ if let Ok(display) = std::env::var("WAYLAND_DISPLAY") [INFO] [stdout] 78 ~ && !display.is_empty() { [INFO] [stdout] 79 | return Ok(rt.join(display)); [INFO] [stdout] 80 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/config/mod.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 384 | pc.enable_loginctl = opt_bool(rc, format!("{name}.enable_loginctl"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::config::PartialConfig { enable_loginctl: opt_bool(rc, format!("{name}.enable_loginctl"))?, enable_dbus_inhibit: opt_bool(rc, format!("{name}.enable_dbus_inhibit"))?, pre_suspend_command: opt_nullable_string2(rc, format!("{name}.pre_suspend_command"))?, monitor_media: opt_bool(rc, format!("{name}.monitor_media"))?, ignore_remote_media: opt_bool(rc, format!("{name}.ignore_remote_media"))?, media_blacklist: opt_vec_pattern(rc, &format!("{name}.media_blacklist"))?, debounce_seconds: opt_u64(rc, format!("{name}.debounce_seconds"))?, notify_on_unpause: opt_bool(rc, format!("{name}.notify_on_unpause"))?, notify_before_action: opt_bool(rc, format!("{name}.notify_before_action"))?, inhibit_apps: opt_vec_pattern(rc, &format!("{name}.inhibit_apps"))?, lid_close_action: parse_lid_action_override(rc, &format!("{name}.lid_close_action"))?, lid_open_action: parse_lid_action_override(rc, &format!("{name}.lid_open_action"))?, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/config/mod.rs:381:9 [INFO] [stdout] | [INFO] [stdout] 381 | let mut pc = PartialConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/bootstrap.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / if let Some(dir) = path.parent() { [INFO] [stdout] 17 | | if !dir.exists() { [INFO] [stdout] 18 | | fs::create_dir_all(dir)?; [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 16 ~ if let Some(dir) = path.parent() [INFO] [stdout] 17 ~ && !dir.exists() { [INFO] [stdout] 18 | fs::create_dir_all(dir)?; [INFO] [stdout] 19 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/core/config.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | / impl Default for ProfileMode { [INFO] [stdout] 16 | | fn default() -> Self { [INFO] [stdout] 17 | | // If mode is omitted, overlay is least surprising. [INFO] [stdout] 18 | | ProfileMode::Overlay [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 8 + #[derive(Default)] [INFO] [stdout] 9 | pub enum ProfileMode { [INFO] [stdout] 10 | /// Start from a fully disabled config; only fields set in the profile apply. [INFO] [stdout] 11 | Fresh, [INFO] [stdout] 12 | /// Start from `default`, then override fields set in the profile (globals + blocks). [INFO] [stdout] 13 ~ #[default] [INFO] [stdout] 14 ~ Overlay, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/config/migrate.rs:402:32 [INFO] [stdout] | [INFO] [stdout] 402 | && l.raw_value.trim().split_whitespace().next() == Some("true") [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `fallbacks.get(0)` [INFO] [stdout] --> src/config/mod.rs:60:33 [INFO] [stdout] | [INFO] [stdout] 60 | if etc != primary && etc != fallbacks.get(0).cloned().unwrap_or_default() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `fallbacks.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:411:16 [INFO] [stdout] | [INFO] [stdout] 411 | } else if was_paused && !new_paused { [INFO] [stdout] | ________________^ [INFO] [stdout] 412 | | if let Some(t0) = state.take_pause_started_ms() { [INFO] [stdout] 413 | | let dt = now_ms.saturating_sub(t0); [INFO] [stdout] 414 | | state.set_step_base_ms(state.step_base_ms().saturating_add(dt)); [INFO] [stdout] ... | [INFO] [stdout] 420 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 411 ~ } else if was_paused && !new_paused [INFO] [stdout] 412 ~ && let Some(t0) = state.take_pause_started_ms() { [INFO] [stdout] 413 | let dt = now_ms.saturating_sub(t0); [INFO] [stdout] ... [INFO] [stdout] 418 | } [INFO] [stdout] 419 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/config/mod.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 384 | pc.enable_loginctl = opt_bool(rc, format!("{name}.enable_loginctl"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `core::config::PartialConfig { enable_loginctl: opt_bool(rc, format!("{name}.enable_loginctl"))?, enable_dbus_inhibit: opt_bool(rc, format!("{name}.enable_dbus_inhibit"))?, pre_suspend_command: opt_nullable_string2(rc, format!("{name}.pre_suspend_command"))?, monitor_media: opt_bool(rc, format!("{name}.monitor_media"))?, ignore_remote_media: opt_bool(rc, format!("{name}.ignore_remote_media"))?, media_blacklist: opt_vec_pattern(rc, &format!("{name}.media_blacklist"))?, debounce_seconds: opt_u64(rc, format!("{name}.debounce_seconds"))?, notify_on_unpause: opt_bool(rc, format!("{name}.notify_on_unpause"))?, notify_before_action: opt_bool(rc, format!("{name}.notify_before_action"))?, inhibit_apps: opt_vec_pattern(rc, &format!("{name}.inhibit_apps"))?, lid_close_action: parse_lid_action_override(rc, &format!("{name}.lid_close_action"))?, lid_open_action: parse_lid_action_override(rc, &format!("{name}.lid_open_action"))?, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/config/mod.rs:381:9 [INFO] [stdout] | [INFO] [stdout] 381 | let mut pc = PartialConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:764:9 [INFO] [stdout] | [INFO] [stdout] 764 | / if let Some(idx) = state.last_dpms_fired_idx() { [INFO] [stdout] 765 | | if idx < cfg.plan.len() { [INFO] [stdout] 766 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 767 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] ... | [INFO] [stdout] 770 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 764 ~ if let Some(idx) = state.last_dpms_fired_idx() [INFO] [stdout] 765 ~ && idx < cfg.plan.len() { [INFO] [stdout] 766 | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 767 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 768 | } [INFO] [stdout] 769 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:765:13 [INFO] [stdout] | [INFO] [stdout] 765 | / if idx < cfg.plan.len() { [INFO] [stdout] 766 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 767 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 768 | | } [INFO] [stdout] 769 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 765 ~ if idx < cfg.plan.len() [INFO] [stdout] 766 ~ && let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 767 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 768 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:772:9 [INFO] [stdout] | [INFO] [stdout] 772 | / if let Some(idx) = state.last_brightness_fired_idx() { [INFO] [stdout] 773 | | if idx < cfg.plan.len() { [INFO] [stdout] 774 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 775 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] ... | [INFO] [stdout] 778 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 772 ~ if let Some(idx) = state.last_brightness_fired_idx() [INFO] [stdout] 773 ~ && idx < cfg.plan.len() { [INFO] [stdout] 774 | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 775 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 776 | } [INFO] [stdout] 777 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:773:13 [INFO] [stdout] | [INFO] [stdout] 773 | / if idx < cfg.plan.len() { [INFO] [stdout] 774 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 775 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 776 | | } [INFO] [stdout] 777 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 773 ~ if idx < cfg.plan.len() [INFO] [stdout] 774 ~ && let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 775 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 776 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:783:13 [INFO] [stdout] | [INFO] [stdout] 783 | / if let Some(idx) = state.last_lock_fired_idx() { [INFO] [stdout] 784 | | if idx < cfg.plan.len() && cfg.plan[idx].resume_command.is_some() { [INFO] [stdout] 785 | | needs_defer_until_unlock = true; [INFO] [stdout] 786 | | } [INFO] [stdout] 787 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 783 ~ if let Some(idx) = state.last_lock_fired_idx() [INFO] [stdout] 784 ~ && idx < cfg.plan.len() && cfg.plan[idx].resume_command.is_some() { [INFO] [stdout] 785 | needs_defer_until_unlock = true; [INFO] [stdout] 786 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:810:9 [INFO] [stdout] | [INFO] [stdout] 810 | / if let Some(idx) = state.last_lock_fired_idx() { [INFO] [stdout] 811 | | if idx < cfg.plan.len() { [INFO] [stdout] 812 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 813 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] ... | [INFO] [stdout] 816 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 810 ~ if let Some(idx) = state.last_lock_fired_idx() [INFO] [stdout] 811 ~ && idx < cfg.plan.len() { [INFO] [stdout] 812 | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 813 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 814 | } [INFO] [stdout] 815 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:811:13 [INFO] [stdout] | [INFO] [stdout] 811 | / if idx < cfg.plan.len() { [INFO] [stdout] 812 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 813 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 814 | | } [INFO] [stdout] 815 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 811 ~ if idx < cfg.plan.len() [INFO] [stdout] 812 ~ && let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 813 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 814 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:823:13 [INFO] [stdout] | [INFO] [stdout] 823 | / if !skip && last < cfg.plan.len() { [INFO] [stdout] 824 | | if let Some(cmd) = cfg.plan[last].resume_command.clone() { [INFO] [stdout] 825 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 826 | | } [INFO] [stdout] 827 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 823 ~ if !skip && last < cfg.plan.len() [INFO] [stdout] 824 ~ && let Some(cmd) = cfg.plan[last].resume_command.clone() { [INFO] [stdout] 825 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 826 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/core/manager/list.rs:46:23 [INFO] [stdout] | [INFO] [stdout] 46 | let cmd = if let Some(c) = step.command.as_deref() { [INFO] [stdout] | _______________________^ [INFO] [stdout] 47 | | c [INFO] [stdout] 48 | | } else { [INFO] [stdout] 49 | | "" [INFO] [stdout] 50 | | }; [INFO] [stdout] | |_____________^ help: replace with: `step.command.as_deref().unwrap_or("")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/core/config.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | / impl Default for ProfileMode { [INFO] [stdout] 16 | | fn default() -> Self { [INFO] [stdout] 17 | | // If mode is omitted, overlay is least surprising. [INFO] [stdout] 18 | | ProfileMode::Overlay [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 8 + #[derive(Default)] [INFO] [stdout] 9 | pub enum ProfileMode { [INFO] [stdout] 10 | /// Start from a fully disabled config; only fields set in the profile apply. [INFO] [stdout] 11 | Fresh, [INFO] [stdout] 12 | /// Start from `default`, then override fields set in the profile (globals + blocks). [INFO] [stdout] 13 ~ #[default] [INFO] [stdout] 14 ~ Overlay, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | / if let Ok(typ) = std::fs::read_to_string(path.join("type")) { [INFO] [stdout] 50 | | if typ.trim() == "Mains" { [INFO] [stdout] 51 | | if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 52 | | if online.trim() == "1" { [INFO] [stdout] ... | [INFO] [stdout] 57 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 49 ~ if let Ok(typ) = std::fs::read_to_string(path.join("type")) [INFO] [stdout] 50 ~ && typ.trim() == "Mains" { [INFO] [stdout] 51 | if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] ... [INFO] [stdout] 55 | } [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:50:17 [INFO] [stdout] | [INFO] [stdout] 50 | / if typ.trim() == "Mains" { [INFO] [stdout] 51 | | if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 52 | | if online.trim() == "1" { [INFO] [stdout] 53 | | return true; [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if typ.trim() == "Mains" [INFO] [stdout] 51 ~ && let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 52 | if online.trim() == "1" { [INFO] [stdout] 53 | return true; [INFO] [stdout] 54 | } [INFO] [stdout] 55 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:51:21 [INFO] [stdout] | [INFO] [stdout] 51 | / if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 52 | | if online.trim() == "1" { [INFO] [stdout] 53 | | return true; [INFO] [stdout] 54 | | } [INFO] [stdout] 55 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 51 ~ if let Ok(online) = std::fs::read_to_string(path.join("online")) [INFO] [stdout] 52 ~ && online.trim() == "1" { [INFO] [stdout] 53 | return true; [INFO] [stdout] 54 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | / if let Some(name) = path.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 61 | | if ["AC", "AC0", "ADP", "ADP0", "ACAD"] [INFO] [stdout] 62 | | .iter() [INFO] [stdout] 63 | | .any(|p| name.starts_with(p)) [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 60 ~ if let Some(name) = path.file_name().and_then(|n| n.to_str()) [INFO] [stdout] 61 ~ && ["AC", "AC0", "ADP", "ADP0", "ACAD"] [INFO] [stdout] 62 | .iter() [INFO] [stdout] ... [INFO] [stdout] 69 | } [INFO] [stdout] 70 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / if ["AC", "AC0", "ADP", "ADP0", "ACAD"] [INFO] [stdout] 62 | | .iter() [INFO] [stdout] 63 | | .any(|p| name.starts_with(p)) [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 63 ~ .any(|p| name.starts_with(p)) [INFO] [stdout] 64 ~ && let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 65 | if online.trim() == "1" { [INFO] [stdout] 66 | return true; [INFO] [stdout] 67 | } [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:65:21 [INFO] [stdout] | [INFO] [stdout] 65 | / if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 66 | | if online.trim() == "1" { [INFO] [stdout] 67 | | return true; [INFO] [stdout] 68 | | } [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 65 ~ if let Ok(online) = std::fs::read_to_string(path.join("online")) [INFO] [stdout] 66 ~ && online.trim() == "1" { [INFO] [stdout] 67 | return true; [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:411:16 [INFO] [stdout] | [INFO] [stdout] 411 | } else if was_paused && !new_paused { [INFO] [stdout] | ________________^ [INFO] [stdout] 412 | | if let Some(t0) = state.take_pause_started_ms() { [INFO] [stdout] 413 | | let dt = now_ms.saturating_sub(t0); [INFO] [stdout] 414 | | state.set_step_base_ms(state.step_base_ms().saturating_add(dt)); [INFO] [stdout] ... | [INFO] [stdout] 420 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 411 ~ } else if was_paused && !new_paused [INFO] [stdout] 412 ~ && let Some(t0) = state.take_pause_started_ms() { [INFO] [stdout] 413 | let dt = now_ms.saturating_sub(t0); [INFO] [stdout] ... [INFO] [stdout] 418 | } [INFO] [stdout] 419 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:764:9 [INFO] [stdout] | [INFO] [stdout] 764 | / if let Some(idx) = state.last_dpms_fired_idx() { [INFO] [stdout] 765 | | if idx < cfg.plan.len() { [INFO] [stdout] 766 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 767 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] ... | [INFO] [stdout] 770 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 764 ~ if let Some(idx) = state.last_dpms_fired_idx() [INFO] [stdout] 765 ~ && idx < cfg.plan.len() { [INFO] [stdout] 766 | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 767 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 768 | } [INFO] [stdout] 769 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:765:13 [INFO] [stdout] | [INFO] [stdout] 765 | / if idx < cfg.plan.len() { [INFO] [stdout] 766 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 767 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 768 | | } [INFO] [stdout] 769 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 765 ~ if idx < cfg.plan.len() [INFO] [stdout] 766 ~ && let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 767 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 768 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:772:9 [INFO] [stdout] | [INFO] [stdout] 772 | / if let Some(idx) = state.last_brightness_fired_idx() { [INFO] [stdout] 773 | | if idx < cfg.plan.len() { [INFO] [stdout] 774 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 775 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] ... | [INFO] [stdout] 778 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 772 ~ if let Some(idx) = state.last_brightness_fired_idx() [INFO] [stdout] 773 ~ && idx < cfg.plan.len() { [INFO] [stdout] 774 | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 775 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 776 | } [INFO] [stdout] 777 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:773:13 [INFO] [stdout] | [INFO] [stdout] 773 | / if idx < cfg.plan.len() { [INFO] [stdout] 774 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 775 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 776 | | } [INFO] [stdout] 777 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 773 ~ if idx < cfg.plan.len() [INFO] [stdout] 774 ~ && let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 775 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 776 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:783:13 [INFO] [stdout] | [INFO] [stdout] 783 | / if let Some(idx) = state.last_lock_fired_idx() { [INFO] [stdout] 784 | | if idx < cfg.plan.len() && cfg.plan[idx].resume_command.is_some() { [INFO] [stdout] 785 | | needs_defer_until_unlock = true; [INFO] [stdout] 786 | | } [INFO] [stdout] 787 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 783 ~ if let Some(idx) = state.last_lock_fired_idx() [INFO] [stdout] 784 ~ && idx < cfg.plan.len() && cfg.plan[idx].resume_command.is_some() { [INFO] [stdout] 785 | needs_defer_until_unlock = true; [INFO] [stdout] 786 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:810:9 [INFO] [stdout] | [INFO] [stdout] 810 | / if let Some(idx) = state.last_lock_fired_idx() { [INFO] [stdout] 811 | | if idx < cfg.plan.len() { [INFO] [stdout] 812 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 813 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] ... | [INFO] [stdout] 816 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 810 ~ if let Some(idx) = state.last_lock_fired_idx() [INFO] [stdout] 811 ~ && idx < cfg.plan.len() { [INFO] [stdout] 812 | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 813 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 814 | } [INFO] [stdout] 815 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:811:13 [INFO] [stdout] | [INFO] [stdout] 811 | / if idx < cfg.plan.len() { [INFO] [stdout] 812 | | if let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 813 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 814 | | } [INFO] [stdout] 815 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 811 ~ if idx < cfg.plan.len() [INFO] [stdout] 812 ~ && let Some(cmd) = cfg.plan[idx].resume_command.clone() { [INFO] [stdout] 813 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 814 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/manager/engine.rs:823:13 [INFO] [stdout] | [INFO] [stdout] 823 | / if !skip && last < cfg.plan.len() { [INFO] [stdout] 824 | | if let Some(cmd) = cfg.plan[last].resume_command.clone() { [INFO] [stdout] 825 | | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 826 | | } [INFO] [stdout] 827 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 823 ~ if !skip && last < cfg.plan.len() [INFO] [stdout] 824 ~ && let Some(cmd) = cfg.plan[last].resume_command.clone() { [INFO] [stdout] 825 | out.push(Action::RunResumeCommand { command: cmd }); [INFO] [stdout] 826 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/ipc/handlers/pause.rs:245:8 [INFO] [stdout] | [INFO] [stdout] 245 | if min < 0 || min > 59 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=59).contains(&min)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/ipc/handlers/pause.rs:253:12 [INFO] [stdout] | [INFO] [stdout] 253 | if hour < 1 || hour > 12 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=12).contains(&hour)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/ipc/handlers/pause.rs:264:12 [INFO] [stdout] | [INFO] [stdout] 264 | if hour < 0 || hour > 23 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=23).contains(&hour)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/core/manager/list.rs:46:23 [INFO] [stdout] | [INFO] [stdout] 46 | let cmd = if let Some(c) = step.command.as_deref() { [INFO] [stdout] | _______________________^ [INFO] [stdout] 47 | | c [INFO] [stdout] 48 | | } else { [INFO] [stdout] 49 | | "" [INFO] [stdout] 50 | | }; [INFO] [stdout] | |_____________^ help: replace with: `step.command.as_deref().unwrap_or("")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/services/app_inhibit.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | /// log "0 -> N" ONLY when N != 0 [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | / if let Ok(typ) = std::fs::read_to_string(path.join("type")) { [INFO] [stdout] 50 | | if typ.trim() == "Mains" { [INFO] [stdout] 51 | | if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 52 | | if online.trim() == "1" { [INFO] [stdout] ... | [INFO] [stdout] 57 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 49 ~ if let Ok(typ) = std::fs::read_to_string(path.join("type")) [INFO] [stdout] 50 ~ && typ.trim() == "Mains" { [INFO] [stdout] 51 | if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] ... [INFO] [stdout] 55 | } [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:50:17 [INFO] [stdout] | [INFO] [stdout] 50 | / if typ.trim() == "Mains" { [INFO] [stdout] 51 | | if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 52 | | if online.trim() == "1" { [INFO] [stdout] 53 | | return true; [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if typ.trim() == "Mains" [INFO] [stdout] 51 ~ && let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 52 | if online.trim() == "1" { [INFO] [stdout] 53 | return true; [INFO] [stdout] 54 | } [INFO] [stdout] 55 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:51:21 [INFO] [stdout] | [INFO] [stdout] 51 | / if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 52 | | if online.trim() == "1" { [INFO] [stdout] 53 | | return true; [INFO] [stdout] 54 | | } [INFO] [stdout] 55 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 51 ~ if let Ok(online) = std::fs::read_to_string(path.join("online")) [INFO] [stdout] 52 ~ && online.trim() == "1" { [INFO] [stdout] 53 | return true; [INFO] [stdout] 54 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | / if let Some(name) = path.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 61 | | if ["AC", "AC0", "ADP", "ADP0", "ACAD"] [INFO] [stdout] 62 | | .iter() [INFO] [stdout] 63 | | .any(|p| name.starts_with(p)) [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 60 ~ if let Some(name) = path.file_name().and_then(|n| n.to_str()) [INFO] [stdout] 61 ~ && ["AC", "AC0", "ADP", "ADP0", "ACAD"] [INFO] [stdout] 62 | .iter() [INFO] [stdout] ... [INFO] [stdout] 69 | } [INFO] [stdout] 70 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / if ["AC", "AC0", "ADP", "ADP0", "ACAD"] [INFO] [stdout] 62 | | .iter() [INFO] [stdout] 63 | | .any(|p| name.starts_with(p)) [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 63 ~ .any(|p| name.starts_with(p)) [INFO] [stdout] 64 ~ && let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 65 | if online.trim() == "1" { [INFO] [stdout] 66 | return true; [INFO] [stdout] 67 | } [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/core/utils.rs:65:21 [INFO] [stdout] | [INFO] [stdout] 65 | / if let Ok(online) = std::fs::read_to_string(path.join("online")) { [INFO] [stdout] 66 | | if online.trim() == "1" { [INFO] [stdout] 67 | | return true; [INFO] [stdout] 68 | | } [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 65 ~ if let Ok(online) = std::fs::read_to_string(path.join("online")) [INFO] [stdout] 66 ~ && online.trim() == "1" { [INFO] [stdout] 67 | return true; [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / if let Some(ev) = svc.poll_async(now_ms).await { [INFO] [stdout] 62 | | if tx.send(ManagerMsg::Event(ev)).await.is_err() { [INFO] [stdout] 63 | | return; [INFO] [stdout] 64 | | } [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 61 ~ if let Some(ev) = svc.poll_async(now_ms).await [INFO] [stdout] 62 ~ && tx.send(ManagerMsg::Event(ev)).await.is_err() { [INFO] [stdout] 63 | return; [INFO] [stdout] 64 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | / if let Some(ev) = svc.poll_async(now_ms).await { [INFO] [stdout] 71 | | if tx.send(ManagerMsg::Event(ev)).await.is_err() { [INFO] [stdout] 72 | | return; [INFO] [stdout] 73 | | } [INFO] [stdout] 74 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 70 ~ if let Some(ev) = svc.poll_async(now_ms).await [INFO] [stdout] 71 ~ && tx.send(ManagerMsg::Event(ev)).await.is_err() { [INFO] [stdout] 72 | return; [INFO] [stdout] 73 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:328:5 [INFO] [stdout] | [INFO] [stdout] 328 | / if let Ok(desktop) = env::var("XDG_CURRENT_DESKTOP") { [INFO] [stdout] 329 | | if desktop.to_lowercase().contains("hyprland") { [INFO] [stdout] 330 | | return Some(Backend::Hyprland(HyprlandBackend::default())); [INFO] [stdout] 331 | | } [INFO] [stdout] 332 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 328 ~ if let Ok(desktop) = env::var("XDG_CURRENT_DESKTOP") [INFO] [stdout] 329 ~ && desktop.to_lowercase().contains("hyprland") { [INFO] [stdout] 330 | return Some(Backend::Hyprland(HyprlandBackend::default())); [INFO] [stdout] 331 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:338:5 [INFO] [stdout] | [INFO] [stdout] 338 | / if let Ok(desktop) = env::var("XDG_CURRENT_DESKTOP") { [INFO] [stdout] 339 | | if desktop.to_lowercase().contains("niri") { [INFO] [stdout] 340 | | return Some(Backend::Niri(NiriBackend::default())); [INFO] [stdout] 341 | | } [INFO] [stdout] 342 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 338 ~ if let Ok(desktop) = env::var("XDG_CURRENT_DESKTOP") [INFO] [stdout] 339 ~ && desktop.to_lowercase().contains("niri") { [INFO] [stdout] 340 | return Some(Backend::Niri(NiriBackend::default())); [INFO] [stdout] 341 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:385:5 [INFO] [stdout] | [INFO] [stdout] 385 | / if let Some(last) = pattern.split('.').last() { [INFO] [stdout] 386 | | if last.eq_ignore_ascii_case(app_id) { [INFO] [stdout] 387 | | return true; [INFO] [stdout] 388 | | } [INFO] [stdout] 389 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ if let Some(last) = pattern.split('.').last() [INFO] [stdout] 386 ~ && last.eq_ignore_ascii_case(app_id) { [INFO] [stdout] 387 | return true; [INFO] [stdout] 388 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/services/app_inhibit.rs:385:25 [INFO] [stdout] | [INFO] [stdout] 385 | if let Some(last) = pattern.split('.').last() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 385 - if let Some(last) = pattern.split('.').last() { [INFO] [stdout] 385 + if let Some(last) = pattern.split('.').next_back() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:524:13 [INFO] [stdout] | [INFO] [stdout] 524 | / if let Ok(exe) = prc.exe() { [INFO] [stdout] 525 | | if let Some(name) = exe.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 526 | | if let Some(key) = Self::match_key(name, apps) { [INFO] [stdout] 527 | | seen.insert(key); [INFO] [stdout] ... | [INFO] [stdout] 530 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 524 ~ if let Ok(exe) = prc.exe() [INFO] [stdout] 525 ~ && let Some(name) = exe.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 526 | if let Some(key) = Self::match_key(name, apps) { [INFO] [stdout] 527 | seen.insert(key); [INFO] [stdout] 528 | } [INFO] [stdout] 529 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:525:17 [INFO] [stdout] | [INFO] [stdout] 525 | / if let Some(name) = exe.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 526 | | if let Some(key) = Self::match_key(name, apps) { [INFO] [stdout] 527 | | seen.insert(key); [INFO] [stdout] 528 | | } [INFO] [stdout] 529 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 525 ~ if let Some(name) = exe.file_name().and_then(|n| n.to_str()) [INFO] [stdout] 526 ~ && let Some(key) = Self::match_key(name, apps) { [INFO] [stdout] 527 | seen.insert(key); [INFO] [stdout] 528 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/services/dbus.rs:256:47 [INFO] [stdout] | [INFO] [stdout] 256 | let legacy_inhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 257 | | && member == "inhibit") [INFO] [stdout] 258 | | || (iface == "org.gnome.sessionmanager" && member == "inhibit"); [INFO] [stdout] | |_______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 256 - let legacy_inhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] 257 - && member == "inhibit") [INFO] [stdout] 258 - || (iface == "org.gnome.sessionmanager" && member == "inhibit"); [INFO] [stdout] 256 + let legacy_inhibit_call = !(member != "inhibit" || iface != "org.freedesktop.screensaver" && iface != "org.gnome.sessionmanager"); [INFO] [stdout] | [INFO] [stdout] 256 - let legacy_inhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] 257 - && member == "inhibit") [INFO] [stdout] 258 - || (iface == "org.gnome.sessionmanager" && member == "inhibit"); [INFO] [stdout] 256 + let legacy_inhibit_call = (iface == "org.gnome.sessionmanager" || iface == "org.freedesktop.screensaver") && member == "inhibit"; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/services/dbus.rs:265:49 [INFO] [stdout] | [INFO] [stdout] 265 | let legacy_uninhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 266 | | && member == "uninhibit") [INFO] [stdout] 267 | | || (iface == "org.gnome.sessionmanager" && member == "uninhibit"); [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 265 - let legacy_uninhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] 266 - && member == "uninhibit") [INFO] [stdout] 267 - || (iface == "org.gnome.sessionmanager" && member == "uninhibit"); [INFO] [stdout] 265 + let legacy_uninhibit_call = !(member != "uninhibit" || iface != "org.freedesktop.screensaver" && iface != "org.gnome.sessionmanager"); [INFO] [stdout] | [INFO] [stdout] 265 - let legacy_uninhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] 266 - && member == "uninhibit") [INFO] [stdout] 267 - || (iface == "org.gnome.sessionmanager" && member == "uninhibit"); [INFO] [stdout] 265 + let legacy_uninhibit_call = (iface == "org.gnome.sessionmanager" || iface == "org.freedesktop.screensaver") && member == "uninhibit"; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/services/dbus.rs:290:21 [INFO] [stdout] | [INFO] [stdout] 290 | / if iface == "org.freedesktop.dbus" && member == "nameownerchanged" { [INFO] [stdout] 291 | | let parsed: (String, String, String) = match msg.body().deserialize() { [INFO] [stdout] 292 | | Ok(v) => v, [INFO] [stdout] 293 | | Err(_) => continue, [INFO] [stdout] ... | [INFO] [stdout] 300 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 289 ~ zbus::message::Type::Signal [INFO] [stdout] 290 ~ if iface == "org.freedesktop.dbus" && member == "nameownerchanged" => { [INFO] [stdout] 291 | let parsed: (String, String, String) = match msg.body().deserialize() { [INFO] [stdout] ... [INFO] [stdout] 299 | } [INFO] [stdout] 300 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/services/dbus.rs:407:51 [INFO] [stdout] | [INFO] [stdout] 407 | ... while let Some(_) = lock_stream.next().await { [INFO] [stdout] | ----------^^^^^^^--------------------------- help: try: `while lock_stream.next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/services/dbus.rs:414:51 [INFO] [stdout] | [INFO] [stdout] 414 | ... while let Some(_) = unlock_stream.next().await { [INFO] [stdout] | ----------^^^^^^^----------------------------- help: try: `while unlock_stream.next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/dbus.rs:471:21 [INFO] [stdout] | [INFO] [stdout] 471 | / if let Some(v) = changed.get("LidIsClosed") { [INFO] [stdout] 472 | | if let Ok(closed) = v.clone().downcast::() { [INFO] [stdout] 473 | | let t = now_ms(); [INFO] [stdout] 474 | | sink.push(if closed { [INFO] [stdout] ... | [INFO] [stdout] 480 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 471 ~ if let Some(v) = changed.get("LidIsClosed") [INFO] [stdout] 472 ~ && let Ok(closed) = v.clone().downcast::() { [INFO] [stdout] 473 | let t = now_ms(); [INFO] [stdout] ... [INFO] [stdout] 478 | }); [INFO] [stdout] 479 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/dbus.rs:537:9 [INFO] [stdout] | [INFO] [stdout] 537 | / if let Ok(sproxy) = Proxy::new( [INFO] [stdout] 538 | | connection, [INFO] [stdout] 539 | | "org.freedesktop.login1", [INFO] [stdout] 540 | | path.clone(), [INFO] [stdout] ... | [INFO] [stdout] 556 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 543 ~ .await [INFO] [stdout] 544 ~ && let Ok(session_type) = sproxy.get_property::("Type").await { [INFO] [stdout] 545 | if (session_type == "wayland" || session_type == "x11") && seat == "seat0" { [INFO] [stdout] ... [INFO] [stdout] 553 | } [INFO] [stdout] 554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/dbus.rs:545:13 [INFO] [stdout] | [INFO] [stdout] 545 | / if let Ok(session_type) = sproxy.get_property::("Type").await { [INFO] [stdout] 546 | | if (session_type == "wayland" || session_type == "x11") && seat == "seat0" { [INFO] [stdout] 547 | | eventline::info!( [INFO] [stdout] 548 | | "D-Bus: selected graphical session '{}' (type: {}, seat: {})", [INFO] [stdout] ... | [INFO] [stdout] 555 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 545 ~ if let Ok(session_type) = sproxy.get_property::("Type").await [INFO] [stdout] 546 ~ && (session_type == "wayland" || session_type == "x11") && seat == "seat0" { [INFO] [stdout] 547 | eventline::info!( [INFO] [stdout] ... [INFO] [stdout] 553 | return Ok(path); [INFO] [stdout] 554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/ipc/handlers/pause.rs:245:8 [INFO] [stdout] | [INFO] [stdout] 245 | if min < 0 || min > 59 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=59).contains(&min)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/ipc/handlers/pause.rs:253:12 [INFO] [stdout] | [INFO] [stdout] 253 | if hour < 1 || hour > 12 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=12).contains(&hour)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/ipc/handlers/pause.rs:264:12 [INFO] [stdout] | [INFO] [stdout] 264 | if hour < 0 || hour > 23 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=23).contains(&hour)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/media.rs:415:5 [INFO] [stdout] | [INFO] [stdout] 415 | / if let Some(obj) = v.as_object() { [INFO] [stdout] 416 | | if obj.values().any(value_is_truthy) { [INFO] [stdout] 417 | | return true; [INFO] [stdout] 418 | | } [INFO] [stdout] 419 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 415 ~ if let Some(obj) = v.as_object() [INFO] [stdout] 416 ~ && obj.values().any(value_is_truthy) { [INFO] [stdout] 417 | return true; [INFO] [stdout] 418 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/media.rs:421:5 [INFO] [stdout] | [INFO] [stdout] 421 | / if let Some(arr) = v.as_array() { [INFO] [stdout] 422 | | if arr.iter().any(value_is_truthy) { [INFO] [stdout] 423 | | return true; [INFO] [stdout] 424 | | } [INFO] [stdout] 425 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 421 ~ if let Some(arr) = v.as_array() [INFO] [stdout] 422 ~ && arr.iter().any(value_is_truthy) { [INFO] [stdout] 423 | return true; [INFO] [stdout] 424 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/services/wayland.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | / match event { [INFO] [stdout] 210 | | KE::Key { .. } => { [INFO] [stdout] 211 | | state.emit_activity(); [INFO] [stdout] ... | [INFO] [stdout] 214 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 209 ~ if let KE::Key { .. } = event { [INFO] [stdout] 210 + state.emit_activity(); [INFO] [stdout] 211 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/services/app_inhibit.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | /// log "0 -> N" ONLY when N != 0 [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / if let Some(ev) = svc.poll_async(now_ms).await { [INFO] [stdout] 62 | | if tx.send(ManagerMsg::Event(ev)).await.is_err() { [INFO] [stdout] 63 | | return; [INFO] [stdout] 64 | | } [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 61 ~ if let Some(ev) = svc.poll_async(now_ms).await [INFO] [stdout] 62 ~ && tx.send(ManagerMsg::Event(ev)).await.is_err() { [INFO] [stdout] 63 | return; [INFO] [stdout] 64 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | / if let Some(ev) = svc.poll_async(now_ms).await { [INFO] [stdout] 71 | | if tx.send(ManagerMsg::Event(ev)).await.is_err() { [INFO] [stdout] 72 | | return; [INFO] [stdout] 73 | | } [INFO] [stdout] 74 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 70 ~ if let Some(ev) = svc.poll_async(now_ms).await [INFO] [stdout] 71 ~ && tx.send(ManagerMsg::Event(ev)).await.is_err() { [INFO] [stdout] 72 | return; [INFO] [stdout] 73 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:328:5 [INFO] [stdout] | [INFO] [stdout] 328 | / if let Ok(desktop) = env::var("XDG_CURRENT_DESKTOP") { [INFO] [stdout] 329 | | if desktop.to_lowercase().contains("hyprland") { [INFO] [stdout] 330 | | return Some(Backend::Hyprland(HyprlandBackend::default())); [INFO] [stdout] 331 | | } [INFO] [stdout] 332 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 328 ~ if let Ok(desktop) = env::var("XDG_CURRENT_DESKTOP") [INFO] [stdout] 329 ~ && desktop.to_lowercase().contains("hyprland") { [INFO] [stdout] 330 | return Some(Backend::Hyprland(HyprlandBackend::default())); [INFO] [stdout] 331 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:338:5 [INFO] [stdout] | [INFO] [stdout] 338 | / if let Ok(desktop) = env::var("XDG_CURRENT_DESKTOP") { [INFO] [stdout] 339 | | if desktop.to_lowercase().contains("niri") { [INFO] [stdout] 340 | | return Some(Backend::Niri(NiriBackend::default())); [INFO] [stdout] 341 | | } [INFO] [stdout] 342 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 338 ~ if let Ok(desktop) = env::var("XDG_CURRENT_DESKTOP") [INFO] [stdout] 339 ~ && desktop.to_lowercase().contains("niri") { [INFO] [stdout] 340 | return Some(Backend::Niri(NiriBackend::default())); [INFO] [stdout] 341 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:385:5 [INFO] [stdout] | [INFO] [stdout] 385 | / if let Some(last) = pattern.split('.').last() { [INFO] [stdout] 386 | | if last.eq_ignore_ascii_case(app_id) { [INFO] [stdout] 387 | | return true; [INFO] [stdout] 388 | | } [INFO] [stdout] 389 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ if let Some(last) = pattern.split('.').last() [INFO] [stdout] 386 ~ && last.eq_ignore_ascii_case(app_id) { [INFO] [stdout] 387 | return true; [INFO] [stdout] 388 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/services/app_inhibit.rs:385:25 [INFO] [stdout] | [INFO] [stdout] 385 | if let Some(last) = pattern.split('.').last() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 385 - if let Some(last) = pattern.split('.').last() { [INFO] [stdout] 385 + if let Some(last) = pattern.split('.').next_back() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:524:13 [INFO] [stdout] | [INFO] [stdout] 524 | / if let Ok(exe) = prc.exe() { [INFO] [stdout] 525 | | if let Some(name) = exe.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 526 | | if let Some(key) = Self::match_key(name, apps) { [INFO] [stdout] 527 | | seen.insert(key); [INFO] [stdout] ... | [INFO] [stdout] 530 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 524 ~ if let Ok(exe) = prc.exe() [INFO] [stdout] 525 ~ && let Some(name) = exe.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 526 | if let Some(key) = Self::match_key(name, apps) { [INFO] [stdout] 527 | seen.insert(key); [INFO] [stdout] 528 | } [INFO] [stdout] 529 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/app_inhibit.rs:525:17 [INFO] [stdout] | [INFO] [stdout] 525 | / if let Some(name) = exe.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 526 | | if let Some(key) = Self::match_key(name, apps) { [INFO] [stdout] 527 | | seen.insert(key); [INFO] [stdout] 528 | | } [INFO] [stdout] 529 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 525 ~ if let Some(name) = exe.file_name().and_then(|n| n.to_str()) [INFO] [stdout] 526 ~ && let Some(key) = Self::match_key(name, apps) { [INFO] [stdout] 527 | seen.insert(key); [INFO] [stdout] 528 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/services/dbus.rs:256:47 [INFO] [stdout] | [INFO] [stdout] 256 | let legacy_inhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 257 | | && member == "inhibit") [INFO] [stdout] 258 | | || (iface == "org.gnome.sessionmanager" && member == "inhibit"); [INFO] [stdout] | |_______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 256 - let legacy_inhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] 257 - && member == "inhibit") [INFO] [stdout] 258 - || (iface == "org.gnome.sessionmanager" && member == "inhibit"); [INFO] [stdout] 256 + let legacy_inhibit_call = !(member != "inhibit" || iface != "org.freedesktop.screensaver" && iface != "org.gnome.sessionmanager"); [INFO] [stdout] | [INFO] [stdout] 256 - let legacy_inhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] 257 - && member == "inhibit") [INFO] [stdout] 258 - || (iface == "org.gnome.sessionmanager" && member == "inhibit"); [INFO] [stdout] 256 + let legacy_inhibit_call = (iface == "org.gnome.sessionmanager" || iface == "org.freedesktop.screensaver") && member == "inhibit"; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/services/dbus.rs:265:49 [INFO] [stdout] | [INFO] [stdout] 265 | let legacy_uninhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 266 | | && member == "uninhibit") [INFO] [stdout] 267 | | || (iface == "org.gnome.sessionmanager" && member == "uninhibit"); [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 265 - let legacy_uninhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] 266 - && member == "uninhibit") [INFO] [stdout] 267 - || (iface == "org.gnome.sessionmanager" && member == "uninhibit"); [INFO] [stdout] 265 + let legacy_uninhibit_call = !(member != "uninhibit" || iface != "org.freedesktop.screensaver" && iface != "org.gnome.sessionmanager"); [INFO] [stdout] | [INFO] [stdout] 265 - let legacy_uninhibit_call = (iface == "org.freedesktop.screensaver" [INFO] [stdout] 266 - && member == "uninhibit") [INFO] [stdout] 267 - || (iface == "org.gnome.sessionmanager" && member == "uninhibit"); [INFO] [stdout] 265 + let legacy_uninhibit_call = (iface == "org.gnome.sessionmanager" || iface == "org.freedesktop.screensaver") && member == "uninhibit"; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/services/dbus.rs:290:21 [INFO] [stdout] | [INFO] [stdout] 290 | / if iface == "org.freedesktop.dbus" && member == "nameownerchanged" { [INFO] [stdout] 291 | | let parsed: (String, String, String) = match msg.body().deserialize() { [INFO] [stdout] 292 | | Ok(v) => v, [INFO] [stdout] 293 | | Err(_) => continue, [INFO] [stdout] ... | [INFO] [stdout] 300 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 289 ~ zbus::message::Type::Signal [INFO] [stdout] 290 ~ if iface == "org.freedesktop.dbus" && member == "nameownerchanged" => { [INFO] [stdout] 291 | let parsed: (String, String, String) = match msg.body().deserialize() { [INFO] [stdout] ... [INFO] [stdout] 299 | } [INFO] [stdout] 300 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/services/dbus.rs:407:51 [INFO] [stdout] | [INFO] [stdout] 407 | ... while let Some(_) = lock_stream.next().await { [INFO] [stdout] | ----------^^^^^^^--------------------------- help: try: `while lock_stream.next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/services/dbus.rs:414:51 [INFO] [stdout] | [INFO] [stdout] 414 | ... while let Some(_) = unlock_stream.next().await { [INFO] [stdout] | ----------^^^^^^^----------------------------- help: try: `while unlock_stream.next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/dbus.rs:471:21 [INFO] [stdout] | [INFO] [stdout] 471 | / if let Some(v) = changed.get("LidIsClosed") { [INFO] [stdout] 472 | | if let Ok(closed) = v.clone().downcast::() { [INFO] [stdout] 473 | | let t = now_ms(); [INFO] [stdout] 474 | | sink.push(if closed { [INFO] [stdout] ... | [INFO] [stdout] 480 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 471 ~ if let Some(v) = changed.get("LidIsClosed") [INFO] [stdout] 472 ~ && let Ok(closed) = v.clone().downcast::() { [INFO] [stdout] 473 | let t = now_ms(); [INFO] [stdout] ... [INFO] [stdout] 478 | }); [INFO] [stdout] 479 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/dbus.rs:537:9 [INFO] [stdout] | [INFO] [stdout] 537 | / if let Ok(sproxy) = Proxy::new( [INFO] [stdout] 538 | | connection, [INFO] [stdout] 539 | | "org.freedesktop.login1", [INFO] [stdout] 540 | | path.clone(), [INFO] [stdout] ... | [INFO] [stdout] 556 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 543 ~ .await [INFO] [stdout] 544 ~ && let Ok(session_type) = sproxy.get_property::("Type").await { [INFO] [stdout] 545 | if (session_type == "wayland" || session_type == "x11") && seat == "seat0" { [INFO] [stdout] ... [INFO] [stdout] 553 | } [INFO] [stdout] 554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/dbus.rs:545:13 [INFO] [stdout] | [INFO] [stdout] 545 | / if let Ok(session_type) = sproxy.get_property::("Type").await { [INFO] [stdout] 546 | | if (session_type == "wayland" || session_type == "x11") && seat == "seat0" { [INFO] [stdout] 547 | | eventline::info!( [INFO] [stdout] 548 | | "D-Bus: selected graphical session '{}' (type: {}, seat: {})", [INFO] [stdout] ... | [INFO] [stdout] 555 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 545 ~ if let Ok(session_type) = sproxy.get_property::("Type").await [INFO] [stdout] 546 ~ && (session_type == "wayland" || session_type == "x11") && seat == "seat0" { [INFO] [stdout] 547 | eventline::info!( [INFO] [stdout] ... [INFO] [stdout] 553 | return Ok(path); [INFO] [stdout] 554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/media.rs:415:5 [INFO] [stdout] | [INFO] [stdout] 415 | / if let Some(obj) = v.as_object() { [INFO] [stdout] 416 | | if obj.values().any(value_is_truthy) { [INFO] [stdout] 417 | | return true; [INFO] [stdout] 418 | | } [INFO] [stdout] 419 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 415 ~ if let Some(obj) = v.as_object() [INFO] [stdout] 416 ~ && obj.values().any(value_is_truthy) { [INFO] [stdout] 417 | return true; [INFO] [stdout] 418 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/media.rs:421:5 [INFO] [stdout] | [INFO] [stdout] 421 | / if let Some(arr) = v.as_array() { [INFO] [stdout] 422 | | if arr.iter().any(value_is_truthy) { [INFO] [stdout] 423 | | return true; [INFO] [stdout] 424 | | } [INFO] [stdout] 425 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 421 ~ if let Some(arr) = v.as_array() [INFO] [stdout] 422 ~ && arr.iter().any(value_is_truthy) { [INFO] [stdout] 423 | return true; [INFO] [stdout] 424 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/services/wayland.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | / match event { [INFO] [stdout] 210 | | KE::Key { .. } => { [INFO] [stdout] 211 | | state.emit_activity(); [INFO] [stdout] ... | [INFO] [stdout] 214 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 209 ~ if let KE::Key { .. } = event { [INFO] [stdout] 210 + state.emit_activity(); [INFO] [stdout] 211 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [optimized + debuginfo] target(s) in 51.63s [INFO] running `Command { std: "docker" "inspect" "243b9738e7fe6cb9740c5d369ac62230cd23a2e6986b85b41daeede6e6601a1d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "243b9738e7fe6cb9740c5d369ac62230cd23a2e6986b85b41daeede6e6601a1d", kill_on_drop: false }` [INFO] [stdout] 243b9738e7fe6cb9740c5d369ac62230cd23a2e6986b85b41daeede6e6601a1d