[INFO] fetching crate ttop 0.3.5... [INFO] linting ttop-0.3.5 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate ttop 0.3.5 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate ttop 0.3.5 [INFO] removed 0 missing examples [INFO] finished tweaking crates.io crate ttop 0.3.5 [INFO] tweaked toml for crates.io crate ttop 0.3.5 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate ttop 0.3.5 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 ttop 0.3.5 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 nvml-wrapper-sys v0.8.0 [INFO] [stderr] Downloaded mp4 v0.14.0 [INFO] [stderr] Downloaded sqlparser v0.52.0 [INFO] [stderr] Downloaded trueno-viz v0.1.18 [INFO] [stderr] Downloaded jugar-probar v1.0.4 [INFO] [stderr] Downloaded wrapcenum-derive v0.4.1 [INFO] [stderr] Downloaded manzana v0.2.0 [INFO] [stderr] Downloaded trueno-viz v0.2.2 [INFO] [stderr] Downloaded trueno v0.16.1 [INFO] [stderr] Downloaded trueno-graph v0.1.7 [INFO] [stderr] Downloaded nvml-wrapper v0.10.0 [INFO] [stderr] Downloaded object v0.38.1 [INFO] [stderr] Downloaded trueno v0.11.0 [INFO] [stderr] Downloaded trueno-quant v0.1.0 [INFO] [stderr] Downloaded trueno-db v0.3.10 [INFO] [stderr] Downloaded batuta-common v0.1.0 [INFO] [stderr] Downloaded renacer v0.9.5 [INFO] [stderr] Downloaded aprender v0.24.0 [INFO] [stderr] Downloaded aprender v0.23.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] afeb282d99ebf80cb43fc7abd54a32bea34994ae03100ba2d6e316c3d00411f7 [INFO] running `Command { std: "docker" "start" "-a" "afeb282d99ebf80cb43fc7abd54a32bea34994ae03100ba2d6e316c3d00411f7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "afeb282d99ebf80cb43fc7abd54a32bea34994ae03100ba2d6e316c3d00411f7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "afeb282d99ebf80cb43fc7abd54a32bea34994ae03100ba2d6e316c3d00411f7", kill_on_drop: false }` [INFO] [stdout] afeb282d99ebf80cb43fc7abd54a32bea34994ae03100ba2d6e316c3d00411f7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 2e7429e7b8c0a3e6671727314da0356ea6a0db62fd9e8630c45535d7e2993031 [INFO] running `Command { std: "docker" "start" "-a" "2e7429e7b8c0a3e6671727314da0356ea6a0db62fd9e8630c45535d7e2993031", kill_on_drop: false }` [INFO] [stderr] Compiling zerocopy v0.8.33 [INFO] [stderr] Compiling find-msvc-tools v0.1.6 [INFO] [stderr] Compiling zmij v1.0.12 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Compiling zerocopy-derive v0.8.33 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Compiling darling_core v0.23.0 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Compiling instability v0.3.11 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Checking castaway v0.2.4 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking libloading v0.8.9 [INFO] [stderr] Compiling cc v1.2.51 [INFO] [stderr] Checking unicode-truncate v1.1.0 [INFO] [stderr] Checking compact_str v0.8.1 [INFO] [stderr] Checking signal-hook-mio v0.2.5 [INFO] [stderr] Checking nvml-wrapper-sys v0.8.0 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking num_cpus v1.17.0 [INFO] [stderr] Checking hostname v0.4.2 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Compiling proc-macro2 v1.0.105 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking serde_yaml_ng v0.10.0 [INFO] [stderr] Checking lz4_flex v0.11.5 [INFO] [stderr] Checking cassowary v0.3.0 [INFO] [stderr] Checking clap_builder v4.5.54 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Compiling quote v1.0.43 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking zune-core v0.5.1 [INFO] [stderr] Checking pxfm v0.1.28 [INFO] [stderr] Checking tempfile v3.24.0 [INFO] [stderr] Checking zune-jpeg v0.5.12 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking tracing-serde v0.2.0 [INFO] [stderr] Checking png v0.18.1 [INFO] [stderr] Checking wait-timeout v0.2.1 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Checking syn v2.0.114 [INFO] [stderr] Checking rusty-fork v0.3.1 [INFO] [stderr] Checking mp4 v0.14.0 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Checking rand_xorshift v0.4.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Compiling darling_macro v0.23.0 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Compiling wrapcenum-derive v0.4.1 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking clap v4.5.54 [INFO] [stderr] Compiling darling v0.23.0 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking nvml-wrapper v0.10.0 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking moxcms v0.7.11 [INFO] [stderr] Checking trueno-quant v0.1.0 [INFO] [stderr] Checking proptest v1.9.0 [INFO] [stderr] Checking ratatui v0.29.0 [INFO] [stderr] Checking trueno v0.16.1 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking batuta-common v0.1.0 [INFO] [stderr] Checking trueno-viz v0.2.2 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking jugar-probar v1.0.4 [INFO] [stderr] Checking ttop v0.3.5 (/opt/rustwide/workdir) [INFO] [stdout] warning: function `parse_docker_stats` is never used [INFO] [stdout] --> src/analyzers/containers.rs:165:4 [INFO] [stdout] | [INFO] [stdout] 165 | fn parse_docker_stats(output: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_mem_usage` is never used [INFO] [stdout] --> src/analyzers/containers.rs:209:4 [INFO] [stdout] | [INFO] [stdout] 209 | fn parse_mem_usage(s: &str) -> (u64, u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_mem_value` is never used [INFO] [stdout] --> src/analyzers/containers.rs:221:4 [INFO] [stdout] | [INFO] [stdout] 221 | fn parse_mem_value(s: &str) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/file_analyzer.rs:524:9 [INFO] [stdout] | [INFO] [stdout] 524 | self.duplicates.sort_by(|a, b| b.wasted_bytes.cmp(&a.wasted_bytes)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `-W clippy::unnecessary-sort-by` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_sort_by)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 524 - self.duplicates.sort_by(|a, b| b.wasted_bytes.cmp(&a.wasted_bytes)); [INFO] [stdout] 524 + self.duplicates.sort_by_key(|b| std::cmp::Reverse(b.wasted_bytes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/file_analyzer.rs:713:9 [INFO] [stdout] | [INFO] [stdout] 713 | sorted.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 713 - sorted.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] 713 + sorted.sort_by_key(|b| std::cmp::Reverse(b.size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/file_analyzer.rs:767:9 [INFO] [stdout] | [INFO] [stdout] 767 | dups.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 767 - dups.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] 767 + dups.sort_by_key(|b| std::cmp::Reverse(b.size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/gpu_procs.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | sorted.sort_by(|a, b| b.sm_util.cmp(&a.sm_util)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 110 - sorted.sort_by(|a, b| b.sm_util.cmp(&a.sm_util)); [INFO] [stdout] 110 + sorted.sort_by_key(|b| std::cmp::Reverse(b.sm_util)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/gpu_procs.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | processes.sort_by(|a, b| b.sm_util.cmp(&a.sm_util)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 - processes.sort_by(|a, b| b.sm_util.cmp(&a.sm_util)); [INFO] [stdout] 177 + processes.sort_by_key(|b| std::cmp::Reverse(b.sm_util)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/analyzers/sensor_health.rs:595:17 [INFO] [stdout] | [INFO] [stdout] 595 | / if value < 1.0 && history.values.iter().any(|&v| v > 100.0) { [INFO] [stdout] 596 | | return SensorHealth::Critical; [INFO] [stdout] 597 | | } [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: `-W clippy::collapsible-match` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::collapsible_match)]` [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 593 ~ SensorType::Fan [INFO] [stdout] 594 | // Fan stopped might be critical (if it should be running) [INFO] [stdout] 595 ~ if value < 1.0 && history.values.iter().any(|&v| v > 100.0) => { [INFO] [stdout] 596 | return SensorHealth::Critical; [INFO] [stdout] 597 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/treemap.rs:272:9 [INFO] [stdout] | [INFO] [stdout] 272 | result.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 272 - result.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 272 + result.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/treemap.rs:324:17 [INFO] [stdout] | [INFO] [stdout] 324 | files.sort_by(|a, b| b.1.cmp(&a.1)); // Sort files by size desc [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 324 - files.sort_by(|a, b| b.1.cmp(&a.1)); // Sort files by size desc [INFO] [stdout] 324 + files.sort_by_key(|b| std::cmp::Reverse(b.1)); // Sort files by size desc [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/treemap.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | result.sort_by(|a, b| b.1.cmp(&a.1)); // Sort mounts by total size desc [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 336 - result.sort_by(|a, b| b.1.cmp(&a.1)); // Sort mounts by total size desc [INFO] [stdout] 336 + result.sort_by_key(|b| std::cmp::Reverse(b.1)); // Sort mounts by total size desc [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/treemap.rs:373:5 [INFO] [stdout] | [INFO] [stdout] 373 | files.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 373 - files.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] 373 + files.sort_by_key(|b| std::cmp::Reverse(b.size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:124:25 [INFO] [stdout] | [INFO] [stdout] 124 | let bar_width = (target_meters_width / num_cols).max(25).min(50) as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(target_meters_width / num_cols).clamp(25, 50)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `-W clippy::manual-clamp` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::manual_clamp)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/panels.rs:755:9 [INFO] [stdout] | [INFO] [stdout] 755 | procs.sort_by(|a, b| b.mem_bytes.cmp(&a.mem_bytes)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 755 - procs.sort_by(|a, b| b.mem_bytes.cmp(&a.mem_bytes)); [INFO] [stdout] 755 + procs.sort_by_key(|b| std::cmp::Reverse(b.mem_bytes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:760:25 [INFO] [stdout] | [INFO] [stdout] 760 | let bar_w = (inner.width as usize / 3).max(20).min(60); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width as usize / 3).clamp(20, 60)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:761:26 [INFO] [stdout] | [INFO] [stdout] 761 | let name_w = (inner.width as usize / 5).max(20).min(40); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width as usize / 5).clamp(20, 40)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:971:22 [INFO] [stdout] | [INFO] [stdout] 971 | let name_w = (inner.width / 6).max(15).min(30); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width / 6).clamp(15, 30)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:972:22 [INFO] [stdout] | [INFO] [stdout] 972 | let size_w = (inner.width / 12).max(8).min(14); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width / 12).clamp(8, 14)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:973:20 [INFO] [stdout] | [INFO] [stdout] 973 | let io_w = (inner.width / 6).max(14).min(24); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width / 6).clamp(14, 24)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:1315:43 [INFO] [stdout] | [INFO] [stdout] 1315 | let max_ifaces = if is_exploded { (inner.width as usize / 15).max(6).min(12) } else { 4 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width as usize / 15).clamp(6, 12)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:1316:41 [INFO] [stdout] | [INFO] [stdout] 1316 | let name_len = if is_exploded { (inner.width as usize / 12).max(10).min(20) } else { 8 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width as usize / 12).clamp(10, 20)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `presentar` [INFO] [stdout] --> examples/presentar_demo.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | #[cfg(feature = "presentar")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `amd`, `apple-hardware`, `default`, `full`, `nvidia`, and `tracing` [INFO] [stdout] = help: consider adding `presentar` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `presentar` [INFO] [stdout] --> examples/presentar_demo.rs:39:11 [INFO] [stdout] | [INFO] [stdout] 39 | #[cfg(not(feature = "presentar"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `amd`, `apple-hardware`, `default`, `full`, `nvidia`, and `tracing` [INFO] [stdout] = help: consider adding `presentar` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TuiLoadTest` [INFO] [stdout] --> src/app.rs:2992:53 [INFO] [stdout] | [INFO] [stdout] 2992 | use jugar_probar::tui_load::{DataGenerator, TuiLoadTest}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/panels.rs:4682:44 [INFO] [stdout] | [INFO] [stdout] 4682 | app.mem_history = (0..300).map(|i| (i as f64 / 300.0)).collect(); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 4682 - app.mem_history = (0..300).map(|i| (i as f64 / 300.0)).collect(); [INFO] [stdout] 4682 + app.mem_history = (0..300).map(|i| i as f64 / 300.0).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/panels.rs:4683:45 [INFO] [stdout] | [INFO] [stdout] 4683 | app.swap_history = (0..300).map(|i| (i as f64 / 600.0)).collect(); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 4683 - app.swap_history = (0..300).map(|i| (i as f64 / 600.0)).collect(); [INFO] [stdout] 4683 + app.swap_history = (0..300).map(|i| i as f64 / 600.0).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `expect_frame` [INFO] [stdout] --> src/ui.rs:1338:52 [INFO] [stdout] | [INFO] [stdout] 1338 | use jugar_probar::tui::{TuiFrame, TuiSnapshot, expect_frame}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/analyzers/connections.rs:1037:13 [INFO] [stdout] | [INFO] [stdout] 1037 | let mut analyzer = ConnectionAnalyzer::new(); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/analyzers/connections.rs:1056:13 [INFO] [stdout] | [INFO] [stdout] 1056 | let mut analyzer = ConnectionAnalyzer::new(); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `count1` [INFO] [stdout] --> src/analyzers/connections.rs:1284:13 [INFO] [stdout] | [INFO] [stdout] 1284 | let count1 = analyzer.connections().len(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_count1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/analyzers/sensor_health.rs:969:13 [INFO] [stdout] | [INFO] [stdout] 969 | for i in 0..10 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/panels.rs:3882:29 [INFO] [stdout] | [INFO] [stdout] 3882 | let (display, r, g, b) = entropy_heatmap(0.1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/panels.rs:3890:29 [INFO] [stdout] | [INFO] [stdout] 3890 | let (display, r, g, b) = entropy_heatmap(0.5); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/panels.rs:3898:29 [INFO] [stdout] | [INFO] [stdout] 3898 | let (display, r, g, b) = entropy_heatmap(0.9); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:3982:13 [INFO] [stdout] | [INFO] [stdout] 3982 | let mut backend = TestBackend::new(40, 5); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:4003:13 [INFO] [stdout] | [INFO] [stdout] 4003 | let mut backend = TestBackend::new(40, 5); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:4023:13 [INFO] [stdout] | [INFO] [stdout] 4023 | let mut backend = TestBackend::new(60, 3); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:4045:13 [INFO] [stdout] | [INFO] [stdout] 4045 | let mut backend = TestBackend::new(30, 3); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:4066:13 [INFO] [stdout] | [INFO] [stdout] 4066 | let mut backend = TestBackend::new(20, 3); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:4087:13 [INFO] [stdout] | [INFO] [stdout] 4087 | let mut backend = TestBackend::new(15, 3); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:4107:13 [INFO] [stdout] | [INFO] [stdout] 4107 | let mut backend = TestBackend::new(40, 5); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:4139:13 [INFO] [stdout] | [INFO] [stdout] 4139 | let mut backend = TestBackend::new(30, 6); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:4186:13 [INFO] [stdout] | [INFO] [stdout] 4186 | let mut backend = TestBackend::new(30, 3); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/panels.rs:4210:13 [INFO] [stdout] | [INFO] [stdout] 4210 | let mut backend = TestBackend::new(20, 3); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `g` [INFO] [stdout] --> src/panels.rs:6320:26 [INFO] [stdout] | [INFO] [stdout] 6320 | let (display, r, g, b) = entropy_heatmap(0.0); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_g` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/panels.rs:6320:29 [INFO] [stdout] | [INFO] [stdout] 6320 | let (display, r, g, b) = entropy_heatmap(0.0); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/panels.rs:6327:23 [INFO] [stdout] | [INFO] [stdout] 6327 | let (display, r, g, b) = entropy_heatmap(1.0); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/panels.rs:6327:29 [INFO] [stdout] | [INFO] [stdout] 6327 | let (display, r, g, b) = entropy_heatmap(1.0); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/panels.rs:6334:29 [INFO] [stdout] | [INFO] [stdout] 6334 | let (display, r, g, b) = entropy_heatmap(0.25); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `marker` [INFO] [stdout] --> src/panels.rs:6359:18 [INFO] [stdout] | [INFO] [stdout] 6359 | let (marker, color, label) = mount_marker(path); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_marker` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ConnState` which implements the `Copy` trait [INFO] [stdout] --> src/analyzers/connections.rs:1092:22 [INFO] [stdout] | [INFO] [stdout] 1092 | let cloned = state.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `-W clippy::clone-on-copy` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/file_analyzer.rs:524:9 [INFO] [stdout] | [INFO] [stdout] 524 | self.duplicates.sort_by(|a, b| b.wasted_bytes.cmp(&a.wasted_bytes)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `-W clippy::unnecessary-sort-by` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_sort_by)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 524 - self.duplicates.sort_by(|a, b| b.wasted_bytes.cmp(&a.wasted_bytes)); [INFO] [stdout] 524 + self.duplicates.sort_by_key(|b| std::cmp::Reverse(b.wasted_bytes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/file_analyzer.rs:713:9 [INFO] [stdout] | [INFO] [stdout] 713 | sorted.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 713 - sorted.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] 713 + sorted.sort_by_key(|b| std::cmp::Reverse(b.size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/file_analyzer.rs:767:9 [INFO] [stdout] | [INFO] [stdout] 767 | dups.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 767 - dups.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] 767 + dups.sort_by_key(|b| std::cmp::Reverse(b.size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/analyzers/file_analyzer.rs:899:21 [INFO] [stdout] | [INFO] [stdout] 899 | assert!(*r <= 255 && *g <= 255 && *b <= 255); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `255` is the maximum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] = note: `-W clippy::absurd-extreme-comparisons` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::absurd_extreme_comparisons)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/analyzers/file_analyzer.rs:899:34 [INFO] [stdout] | [INFO] [stdout] 899 | assert!(*r <= 255 && *g <= 255 && *b <= 255); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `255` is the maximum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/analyzers/file_analyzer.rs:899:47 [INFO] [stdout] | [INFO] [stdout] 899 | assert!(*r <= 255 && *g <= 255 && *b <= 255); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `255` is the maximum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/analyzers/file_analyzer.rs:969:21 [INFO] [stdout] | [INFO] [stdout] 969 | assert!(r <= 255 && g <= 255 && b <= 255); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `255` is the maximum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/analyzers/file_analyzer.rs:969:33 [INFO] [stdout] | [INFO] [stdout] 969 | assert!(r <= 255 && g <= 255 && b <= 255); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `255` is the maximum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/analyzers/file_analyzer.rs:969:45 [INFO] [stdout] | [INFO] [stdout] 969 | assert!(r <= 255 && g <= 255 && b <= 255); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `255` is the maximum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/gpu_procs.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | sorted.sort_by(|a, b| b.sm_util.cmp(&a.sm_util)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 110 - sorted.sort_by(|a, b| b.sm_util.cmp(&a.sm_util)); [INFO] [stdout] 110 + sorted.sort_by_key(|b| std::cmp::Reverse(b.sm_util)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/gpu_procs.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | processes.sort_by(|a, b| b.sm_util.cmp(&a.sm_util)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 - processes.sort_by(|a, b| b.sm_util.cmp(&a.sm_util)); [INFO] [stdout] 177 + processes.sort_by_key(|b| std::cmp::Reverse(b.sm_util)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/analyzers/network_stats.rs:431:39 [INFO] [stdout] | [INFO] [stdout] 431 | assert_eq!(stats.tcp_total(), 10 + 2 + 1 + 3 + 4 + 5 + 1 + 2 + 1 + 8 + 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(10 + 2 + 1 + 3 + 4 + 5 + 1 + 2 + 1 + 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `-W clippy::identity-op` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::identity_op)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/analyzers/sensor_health.rs:595:17 [INFO] [stdout] | [INFO] [stdout] 595 | / if value < 1.0 && history.values.iter().any(|&v| v > 100.0) { [INFO] [stdout] 596 | | return SensorHealth::Critical; [INFO] [stdout] 597 | | } [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: `-W clippy::collapsible-match` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::collapsible_match)]` [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 593 ~ SensorType::Fan [INFO] [stdout] 594 | // Fan stopped might be critical (if it should be running) [INFO] [stdout] 595 ~ if value < 1.0 && history.values.iter().any(|&v| v > 100.0) => { [INFO] [stdout] 596 | return SensorHealth::Critical; [INFO] [stdout] 597 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/treemap.rs:272:9 [INFO] [stdout] | [INFO] [stdout] 272 | result.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 272 - result.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 272 + result.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/treemap.rs:324:17 [INFO] [stdout] | [INFO] [stdout] 324 | files.sort_by(|a, b| b.1.cmp(&a.1)); // Sort files by size desc [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 324 - files.sort_by(|a, b| b.1.cmp(&a.1)); // Sort files by size desc [INFO] [stdout] 324 + files.sort_by_key(|b| std::cmp::Reverse(b.1)); // Sort files by size desc [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/treemap.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | result.sort_by(|a, b| b.1.cmp(&a.1)); // Sort mounts by total size desc [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 336 - result.sort_by(|a, b| b.1.cmp(&a.1)); // Sort mounts by total size desc [INFO] [stdout] 336 + result.sort_by_key(|b| std::cmp::Reverse(b.1)); // Sort mounts by total size desc [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/analyzers/treemap.rs:373:5 [INFO] [stdout] | [INFO] [stdout] 373 | files.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 373 - files.sort_by(|a, b| b.size.cmp(&a.size)); [INFO] [stdout] 373 + files.sort_by_key(|b| std::cmp::Reverse(b.size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FileCategory` which implements the `Copy` trait [INFO] [stdout] --> src/analyzers/treemap.rs:1083:22 [INFO] [stdout] | [INFO] [stdout] 1083 | let cloned = cat.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `cat` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TreeRect` which implements the `Copy` trait [INFO] [stdout] --> src/analyzers/treemap.rs:1134:22 [INFO] [stdout] | [INFO] [stdout] 1134 | let cloned = rect.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `rect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this binary expression can be simplified [INFO] [stdout] --> src/analyzers/treemap.rs:1159:17 [INFO] [stdout] | [INFO] [stdout] 1159 | assert!(size == 0 || size > 0); // Either no files yet or some found [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `size >= 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_comparisons [INFO] [stdout] = note: `-W clippy::double-comparisons` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::double_comparisons)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/analyzers/treemap.rs:1450:17 [INFO] [stdout] | [INFO] [stdout] 1450 | assert!(layout.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!layout.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `-W clippy::len-zero` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::len_zero)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/analyzers/treemap.rs:1487:17 [INFO] [stdout] | [INFO] [stdout] 1487 | assert!(layout.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!layout.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/app.rs:3299:58 [INFO] [stdout] | [INFO] [stdout] 3299 | assert!(app.thermal_throttle_active.is_some() || !app.thermal_throttle_active.is_some(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `app.thermal_throttle_active.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `-W clippy::nonminimal-bool` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::nonminimal_bool)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: repeating `Vec::with_capacity` using `vec![x; n]`, which does not retain capacity [INFO] [stdout] --> src/app.rs:3312:32 [INFO] [stdout] | [INFO] [stdout] 3312 | app.per_core_history = vec![Vec::with_capacity(60); core_count]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: only the last `Vec` will have the capacity [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repeat_vec_with_capacity [INFO] [stdout] = note: `-W clippy::repeat-vec-with-capacity` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::repeat_vec_with_capacity)]` [INFO] [stdout] help: if you intended to initialize multiple `Vec`s with an initial capacity, try [INFO] [stdout] | [INFO] [stdout] 3312 - app.per_core_history = vec![Vec::with_capacity(60); core_count]; [INFO] [stdout] 3312 + app.per_core_history = (0..core_count).map(|_| Vec::with_capacity(60)).collect::>(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/app.rs:3496:17 [INFO] [stdout] | [INFO] [stdout] 3496 | assert!(app.net_errors >= 0, "net_errors should be >= 0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `0` is the minimum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/app.rs:3497:17 [INFO] [stdout] | [INFO] [stdout] 3497 | assert!(app.net_drops >= 0, "net_drops should be >= 0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `0` is the minimum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/app.rs:3504:17 [INFO] [stdout] | [INFO] [stdout] 3504 | assert!(app.net_established >= 0, "net_established should be >= 0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `0` is the minimum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stdout] --> src/app.rs:3505:17 [INFO] [stdout] | [INFO] [stdout] 3505 | assert!(app.net_listening >= 0, "net_listening should be >= 0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: because `0` is the minimum value for this type, this comparison is always true [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression contains a logic bug [INFO] [stdout] --> src/app.rs:3524:17 [INFO] [stdout] | [INFO] [stdout] 3524 | assert!(!app.show_tree || app.show_tree, "show_tree field must exist"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: it would look like the following: `true` [INFO] [stdout] | [INFO] [stdout] help: this expression can be optimized out by applying boolean operations to the outer expression [INFO] [stdout] --> src/app.rs:3524:18 [INFO] [stdout] | [INFO] [stdout] 3524 | assert!(!app.show_tree || app.show_tree, "show_tree field must exist"); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#overly_complex_bool_expr [INFO] [stdout] = note: `-W clippy::overly-complex-bool-expr` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::overly_complex_bool_expr)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:124:25 [INFO] [stdout] | [INFO] [stdout] 124 | let bar_width = (target_meters_width / num_cols).max(25).min(50) as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(target_meters_width / num_cols).clamp(25, 50)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `-W clippy::manual-clamp` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::manual_clamp)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/panels.rs:755:9 [INFO] [stdout] | [INFO] [stdout] 755 | procs.sort_by(|a, b| b.mem_bytes.cmp(&a.mem_bytes)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 755 - procs.sort_by(|a, b| b.mem_bytes.cmp(&a.mem_bytes)); [INFO] [stdout] 755 + procs.sort_by_key(|b| std::cmp::Reverse(b.mem_bytes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:760:25 [INFO] [stdout] | [INFO] [stdout] 760 | let bar_w = (inner.width as usize / 3).max(20).min(60); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width as usize / 3).clamp(20, 60)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:761:26 [INFO] [stdout] | [INFO] [stdout] 761 | let name_w = (inner.width as usize / 5).max(20).min(40); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width as usize / 5).clamp(20, 40)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:971:22 [INFO] [stdout] | [INFO] [stdout] 971 | let name_w = (inner.width / 6).max(15).min(30); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width / 6).clamp(15, 30)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:972:22 [INFO] [stdout] | [INFO] [stdout] 972 | let size_w = (inner.width / 12).max(8).min(14); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width / 12).clamp(8, 14)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:973:20 [INFO] [stdout] | [INFO] [stdout] 973 | let io_w = (inner.width / 6).max(14).min(24); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width / 6).clamp(14, 24)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:1315:43 [INFO] [stdout] | [INFO] [stdout] 1315 | let max_ifaces = if is_exploded { (inner.width as usize / 15).max(6).min(12) } else { 4 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width as usize / 15).clamp(6, 12)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/panels.rs:1316:41 [INFO] [stdout] | [INFO] [stdout] 1316 | let name_len = if is_exploded { (inner.width as usize / 12).max(10).min(20) } else { 8 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(inner.width as usize / 12).clamp(10, 20)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4540:16 [INFO] [stdout] | [INFO] [stdout] 4540 | }).expect(&format!("draw cpu at {}x{}", width, height)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw cpu at {}x{}", width, height))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `-W clippy::expect-fun-call` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::expect_fun_call)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4546:16 [INFO] [stdout] | [INFO] [stdout] 4546 | }).expect(&format!("draw memory at {}x{}", width, height)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw memory at {}x{}", width, height))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4552:16 [INFO] [stdout] | [INFO] [stdout] 4552 | }).expect(&format!("draw network at {}x{}", width, height)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw network at {}x{}", width, height))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4658:16 [INFO] [stdout] | [INFO] [stdout] 4658 | }).expect(&format!("draw files in {:?} mode", mode)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw files in {:?} mode", mode))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4831:16 [INFO] [stdout] | [INFO] [stdout] 4831 | }).expect(&format!("draw gpu {}x{}", w, h)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw gpu {}x{}", w, h))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4847:16 [INFO] [stdout] | [INFO] [stdout] 4847 | }).expect(&format!("draw system {}x{}", w, h)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw system {}x{}", w, h))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4863:16 [INFO] [stdout] | [INFO] [stdout] 4863 | }).expect(&format!("draw psi {}x{}", w, h)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw psi {}x{}", w, h))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4879:16 [INFO] [stdout] | [INFO] [stdout] 4879 | }).expect(&format!("draw battery {}x{}", w, h)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw battery {}x{}", w, h))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4895:16 [INFO] [stdout] | [INFO] [stdout] 4895 | }).expect(&format!("draw sensors {}x{}", w, h)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw sensors {}x{}", w, h))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4900:16 [INFO] [stdout] | [INFO] [stdout] 4900 | }).expect(&format!("draw sensors compact {}x{}", w, h)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw sensors compact {}x{}", w, h))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4916:16 [INFO] [stdout] | [INFO] [stdout] 4916 | }).expect(&format!("draw connections {}x{}", w, h)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw connections {}x{}", w, h))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:4932:16 [INFO] [stdout] | [INFO] [stdout] 4932 | }).expect(&format!("draw treemap {}x{}", w, h)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw treemap {}x{}", w, h))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:5201:16 [INFO] [stdout] | [INFO] [stdout] 5201 | }).expect(&format!("sort {:?}", sort)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("sort {:?}", sort))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/panels.rs:8006:21 [INFO] [stdout] | [INFO] [stdout] 8006 | let panels: Vec<(&str, fn(&mut ratatui::Frame<'_>, &App, Rect))> = vec![ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `-W clippy::type-complexity` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::type_complexity)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:8024:16 [INFO] [stdout] | [INFO] [stdout] 8024 | }).expect(&format!("draw {}", name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw {}", name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:8034:27 [INFO] [stdout] | [INFO] [stdout] 8034 | soft.verify().expect(&format!("all {} assertions should pass", name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("all {} assertions should pass", name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:8055:16 [INFO] [stdout] | [INFO] [stdout] 8055 | }).expect(&format!("draw at {}", name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw at {}", name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/panels.rs:8064:27 [INFO] [stdout] | [INFO] [stdout] 8064 | soft.verify().expect(&format!("responsiveness at {} should pass", name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("responsiveness at {} should pass", name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/ui.rs:837:16 [INFO] [stdout] | [INFO] [stdout] 837 | }).expect(&format!("draw at {}x{}", width, height)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw at {}x{}", width, height))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/ui.rs:1007:16 [INFO] [stdout] | [INFO] [stdout] 1007 | }).expect(&format!("draw at {}x{}", width, height)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw at {}x{}", width, height))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/ui.rs:1178:16 [INFO] [stdout] | [INFO] [stdout] 1178 | }).expect(&format!("draw exploded {:?}", panel_type)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw exploded {:?}", panel_type))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/ui.rs:1225:16 [INFO] [stdout] | [INFO] [stdout] 1225 | }).expect(&format!("draw signal {:?}", signal)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw signal {:?}", signal))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/ui.rs:1508:16 [INFO] [stdout] | [INFO] [stdout] 1508 | }).expect(&format!("draw at {name} ({width}x{height})")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("draw at {name} ({width}x{height})"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/ui.rs:1518:27 [INFO] [stdout] | [INFO] [stdout] 1518 | soft.verify().expect(&format!("all {name} assertions should pass")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("all {name} assertions should pass"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/analyzers/file_analyzer.rs:899:21 [INFO] [stdout] | [INFO] [stdout] 899 | assert!(*r <= 255 && *g <= 255 && *b <= 255); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/analyzers/file_analyzer.rs:899:34 [INFO] [stdout] | [INFO] [stdout] 899 | assert!(*r <= 255 && *g <= 255 && *b <= 255); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/analyzers/file_analyzer.rs:899:47 [INFO] [stdout] | [INFO] [stdout] 899 | assert!(*r <= 255 && *g <= 255 && *b <= 255); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/analyzers/file_analyzer.rs:969:21 [INFO] [stdout] | [INFO] [stdout] 969 | assert!(r <= 255 && g <= 255 && b <= 255); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/analyzers/file_analyzer.rs:969:33 [INFO] [stdout] | [INFO] [stdout] 969 | assert!(r <= 255 && g <= 255 && b <= 255); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/analyzers/file_analyzer.rs:969:45 [INFO] [stdout] | [INFO] [stdout] 969 | assert!(r <= 255 && g <= 255 && b <= 255); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/app.rs:3496:17 [INFO] [stdout] | [INFO] [stdout] 3496 | assert!(app.net_errors >= 0, "net_errors should be >= 0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/app.rs:3497:17 [INFO] [stdout] | [INFO] [stdout] 3497 | assert!(app.net_drops >= 0, "net_drops should be >= 0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/app.rs:3504:17 [INFO] [stdout] | [INFO] [stdout] 3504 | assert!(app.net_established >= 0, "net_established should be >= 0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/app.rs:3505:17 [INFO] [stdout] | [INFO] [stdout] 3505 | assert!(app.net_listening >= 0, "net_listening should be >= 0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 42.21s [INFO] running `Command { std: "docker" "inspect" "2e7429e7b8c0a3e6671727314da0356ea6a0db62fd9e8630c45535d7e2993031", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2e7429e7b8c0a3e6671727314da0356ea6a0db62fd9e8630c45535d7e2993031", kill_on_drop: false }` [INFO] [stdout] 2e7429e7b8c0a3e6671727314da0356ea6a0db62fd9e8630c45535d7e2993031