[INFO] cloning repository https://github.com/benbahrenburg/CognitiveAnalyzer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/benbahrenburg/CognitiveAnalyzer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenbahrenburg%2FCognitiveAnalyzer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenbahrenburg%2FCognitiveAnalyzer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 73ceae300c1a6fa01642c33b5264b8e5aba38888 [INFO] linting benbahrenburg/CognitiveAnalyzer against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenbahrenburg%2FCognitiveAnalyzer" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/benbahrenburg/CognitiveAnalyzer [INFO] finished tweaking git repo https://github.com/benbahrenburg/CognitiveAnalyzer [INFO] tweaked toml for git repo https://github.com/benbahrenburg/CognitiveAnalyzer written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/benbahrenburg/CognitiveAnalyzer 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 git repo https://github.com/benbahrenburg/CognitiveAnalyzer 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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded clap_complete v4.5.66 [INFO] [stderr] Downloaded ratatui v0.26.3 [INFO] [stderr] Downloaded web-sys v0.3.89 [INFO] [stderr] Downloaded libz-sys v1.1.24 [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] 392f5751e1329e3a09702a4b8cedaefafd2a8236c82a3c8dc7d07a4142d92a58 [INFO] running `Command { std: "docker" "start" "-a" "392f5751e1329e3a09702a4b8cedaefafd2a8236c82a3c8dc7d07a4142d92a58", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "392f5751e1329e3a09702a4b8cedaefafd2a8236c82a3c8dc7d07a4142d92a58", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "392f5751e1329e3a09702a4b8cedaefafd2a8236c82a3c8dc7d07a4142d92a58", kill_on_drop: false }` [INFO] [stdout] 392f5751e1329e3a09702a4b8cedaefafd2a8236c82a3c8dc7d07a4142d92a58 [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] 5387dfb63cf45902daddbc9fbd3463f1061b8fd64316eeb1f03544ce4ef6cdcc [INFO] running `Command { std: "docker" "start" "-a" "5387dfb63cf45902daddbc9fbd3463f1061b8fd64316eeb1f03544ce4ef6cdcc", kill_on_drop: false }` [INFO] [stderr] Compiling rustix v1.1.4 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking linux-raw-sys v0.12.1 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Checking pxfm v0.1.27 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking png v0.18.1 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking castaway v0.2.4 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking winnow v0.7.14 [INFO] [stderr] Checking x11rb-protocol v0.13.2 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking compact_str v0.7.1 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking plotters-backend v0.3.7 [INFO] [stderr] Checking fixedbitset v0.4.2 [INFO] [stderr] Compiling cc v1.2.56 [INFO] [stderr] Checking signal-hook-mio v0.2.5 [INFO] [stderr] Checking plotters-svg v0.3.7 [INFO] [stderr] Checking petgraph v0.6.5 [INFO] [stderr] Checking crossterm v0.27.0 [INFO] [stderr] Checking colored v2.2.0 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking cast v0.3.0 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking is-terminal v0.4.17 [INFO] [stderr] Checking unicode-truncate v1.1.0 [INFO] [stderr] Checking anes v0.1.6 [INFO] [stderr] Checking oorandom v11.1.5 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Compiling libz-sys v1.1.24 [INFO] [stderr] Compiling libgit2-sys v0.16.2+1.7.2 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking moxcms v0.7.11 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking gethostname v1.1.0 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking x11rb v0.13.2 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking comfy-table v7.2.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zerocopy-derive v0.8.39 [INFO] [stderr] Compiling clap_derive v4.5.55 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling stability v0.2.1 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking zerocopy v0.8.39 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking ratatui v0.26.3 [INFO] [stderr] Checking clap v4.5.60 [INFO] [stderr] Checking clap_complete v4.5.66 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking chrono v0.4.44 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking arboard v3.6.1 [INFO] [stderr] Checking git2 v0.18.3 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stderr] Checking cognitive_analyzer v0.5.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/guide/app.rs:624:13 [INFO] [stdout] | [INFO] [stdout] 624 | / if !matches!(app.current_screen, ScreenId::Welcome) { [INFO] [stdout] 625 | | app.navigate(ScreenId::Welcome); [INFO] [stdout] 626 | | } [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] 623 ~ KeyCode::Char('m') if !app.text_input_active [INFO] [stdout] 624 ~ && !matches!(app.current_screen, ScreenId::Welcome) => { [INFO] [stdout] 625 | app.navigate(ScreenId::Welcome); [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/guide/app.rs:658:13 [INFO] [stdout] | [INFO] [stdout] 658 | / if app.profile_picker_idx > 0 { [INFO] [stdout] 659 | | app.profile_picker_idx -= 1; [INFO] [stdout] 660 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 657 ~ KeyCode::Up [INFO] [stdout] 658 ~ if app.profile_picker_idx > 0 => { [INFO] [stdout] 659 | app.profile_picker_idx -= 1; [INFO] [stdout] 660 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/guide/app.rs:663:13 [INFO] [stdout] | [INFO] [stdout] 663 | / if app.profile_picker_idx + 1 < all.len() { [INFO] [stdout] 664 | | app.profile_picker_idx += 1; [INFO] [stdout] 665 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 662 ~ KeyCode::Down [INFO] [stdout] 663 ~ if app.profile_picker_idx + 1 < all.len() => { [INFO] [stdout] 664 | app.profile_picker_idx += 1; [INFO] [stdout] 665 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/guide/screens/patterns/overuse.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | file_entries.sort_by(|a, b| b.1.distinct_count.cmp(&a.1.distinct_count)); [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: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 40 - file_entries.sort_by(|a, b| b.1.distinct_count.cmp(&a.1.distinct_count)); [INFO] [stdout] 40 + file_entries.sort_by_key(|b| std::cmp::Reverse(b.1.distinct_count)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/guide/screens/patterns/recommend.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | format!("{}", inst.pattern_name), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `inst.pattern_name.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/guide/screens/patterns/summary.rs:668:5 [INFO] [stdout] | [INFO] [stdout] 668 | (100.0 - penalty).max(0.0).min(100.0) as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(100.0 - penalty).clamp(0.0, 100.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/guide/screens/patterns/zones.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | zone_entries.sort_by(|a, b| b.1.len().cmp(&a.1.len())); [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] 36 - zone_entries.sort_by(|a, b| b.1.len().cmp(&a.1.len())); [INFO] [stdout] 36 + zone_entries.sort_by_key(|b| std::cmp::Reverse(b.1.len())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/patterns/engine/catalog/architectural.rs:152:16 [INFO] [stdout] | [INFO] [stdout] 152 | if struct_node.methods.len() < 1 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `struct_node.methods.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: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/patterns/engine/catalog/architectural.rs:415:12 [INFO] [stdout] | [INFO] [stdout] 415 | if (has_controller && has_model) || (has_model && has_view) { [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] 415 - if (has_controller && has_model) || (has_model && has_view) { [INFO] [stdout] 415 + if !(!has_model || !has_controller && !has_view) { [INFO] [stdout] | [INFO] [stdout] 415 - if (has_controller && has_model) || (has_model && has_view) { [INFO] [stdout] 415 + if (has_view || has_controller) && has_model { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/patterns/engine/catalog/structural.rs:264:16 [INFO] [stdout] | [INFO] [stdout] 264 | if decorators.len() < 1 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `decorators.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 OR pattern can be rewritten using a range [INFO] [stdout] --> src/patterns/engine/modules/e3_density.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | 0 | 1 | 2 => 0.0, [INFO] [stdout] | ^^^^^^^^^ help: try: `0..=2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SymbolGraph` [INFO] [stdout] --> src/patterns/engine/recognizer/symbol_graph.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | / pub fn new() -> Self { [INFO] [stdout] 101 | | Self { [INFO] [stdout] 102 | | nodes: HashMap::new(), [INFO] [stdout] 103 | | edges: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 107 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 99 + impl Default for SymbolGraph { [INFO] [stdout] 100 + fn default() -> Self { [INFO] [stdout] 101 + Self::new() [INFO] [stdout] 102 + } [INFO] [stdout] 103 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `split_once` [INFO] [stdout] --> src/patterns/engine/recognizer/symbol_graph.rs:473:25 [INFO] [stdout] | [INFO] [stdout] 473 | / p.trim() [INFO] [stdout] 474 | | .splitn(2, ':') [INFO] [stdout] 475 | | .nth(1) [INFO] [stdout] | |___________________________________^ help: try: `p.trim().split_once(':').map(|x| x.1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/patterns/engine/recognizer/template.rs:80:28 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn from_path(path: &PathBuf) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - pub fn from_path(path: &PathBuf) -> Self { [INFO] [stdout] 80 + pub fn from_path(path: &Path) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/patterns/output/terminal.rs:431:5 [INFO] [stdout] | [INFO] [stdout] 431 | (base - penalty).max(0.0).min(100.0) as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(base - penalty).clamp(0.0, 100.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [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: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/scan_cache.rs:272:9 [INFO] [stdout] | [INFO] [stdout] 272 | pairs.sort_unstable_by(|a, b| b.1.cached_at.cmp(&a.1.cached_at)); [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 - pairs.sort_unstable_by(|a, b| b.1.cached_at.cmp(&a.1.cached_at)); [INFO] [stdout] 272 + pairs.sort_unstable_by_key(|b| std::cmp::Reverse(b.1.cached_at)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/scan_cache.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | pairs.sort_unstable_by(|a, b| b.1.cached_at.cmp(&a.1.cached_at)); [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] 331 - pairs.sort_unstable_by(|a, b| b.1.cached_at.cmp(&a.1.cached_at)); [INFO] [stdout] 331 + pairs.sort_unstable_by_key(|b| std::cmp::Reverse(b.1.cached_at)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/guide/app.rs:624:13 [INFO] [stdout] | [INFO] [stdout] 624 | / if !matches!(app.current_screen, ScreenId::Welcome) { [INFO] [stdout] 625 | | app.navigate(ScreenId::Welcome); [INFO] [stdout] 626 | | } [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] 623 ~ KeyCode::Char('m') if !app.text_input_active [INFO] [stdout] 624 ~ && !matches!(app.current_screen, ScreenId::Welcome) => { [INFO] [stdout] 625 | app.navigate(ScreenId::Welcome); [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/guide/app.rs:658:13 [INFO] [stdout] | [INFO] [stdout] 658 | / if app.profile_picker_idx > 0 { [INFO] [stdout] 659 | | app.profile_picker_idx -= 1; [INFO] [stdout] 660 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 657 ~ KeyCode::Up [INFO] [stdout] 658 ~ if app.profile_picker_idx > 0 => { [INFO] [stdout] 659 | app.profile_picker_idx -= 1; [INFO] [stdout] 660 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/guide/app.rs:663:13 [INFO] [stdout] | [INFO] [stdout] 663 | / if app.profile_picker_idx + 1 < all.len() { [INFO] [stdout] 664 | | app.profile_picker_idx += 1; [INFO] [stdout] 665 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 662 ~ KeyCode::Down [INFO] [stdout] 663 ~ if app.profile_picker_idx + 1 < all.len() => { [INFO] [stdout] 664 | app.profile_picker_idx += 1; [INFO] [stdout] 665 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/guide/screens/patterns/overuse.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | file_entries.sort_by(|a, b| b.1.distinct_count.cmp(&a.1.distinct_count)); [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: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 40 - file_entries.sort_by(|a, b| b.1.distinct_count.cmp(&a.1.distinct_count)); [INFO] [stdout] 40 + file_entries.sort_by_key(|b| std::cmp::Reverse(b.1.distinct_count)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/guide/screens/patterns/recommend.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | format!("{}", inst.pattern_name), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `inst.pattern_name.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/guide/screens/patterns/summary.rs:668:5 [INFO] [stdout] | [INFO] [stdout] 668 | (100.0 - penalty).max(0.0).min(100.0) as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(100.0 - penalty).clamp(0.0, 100.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/guide/screens/patterns/zones.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | zone_entries.sort_by(|a, b| b.1.len().cmp(&a.1.len())); [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] 36 - zone_entries.sort_by(|a, b| b.1.len().cmp(&a.1.len())); [INFO] [stdout] 36 + zone_entries.sort_by_key(|b| std::cmp::Reverse(b.1.len())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/patterns/engine/catalog/architectural.rs:152:16 [INFO] [stdout] | [INFO] [stdout] 152 | if struct_node.methods.len() < 1 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `struct_node.methods.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: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/patterns/engine/catalog/architectural.rs:415:12 [INFO] [stdout] | [INFO] [stdout] 415 | if (has_controller && has_model) || (has_model && has_view) { [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] 415 - if (has_controller && has_model) || (has_model && has_view) { [INFO] [stdout] 415 + if !(!has_model || !has_controller && !has_view) { [INFO] [stdout] | [INFO] [stdout] 415 - if (has_controller && has_model) || (has_model && has_view) { [INFO] [stdout] 415 + if (has_view || has_controller) && has_model { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/patterns/engine/catalog/structural.rs:264:16 [INFO] [stdout] | [INFO] [stdout] 264 | if decorators.len() < 1 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `decorators.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 OR pattern can be rewritten using a range [INFO] [stdout] --> src/patterns/engine/modules/e3_density.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | 0 | 1 | 2 => 0.0, [INFO] [stdout] | ^^^^^^^^^ help: try: `0..=2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SymbolGraph` [INFO] [stdout] --> src/patterns/engine/recognizer/symbol_graph.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | / pub fn new() -> Self { [INFO] [stdout] 101 | | Self { [INFO] [stdout] 102 | | nodes: HashMap::new(), [INFO] [stdout] 103 | | edges: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 107 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 99 + impl Default for SymbolGraph { [INFO] [stdout] 100 + fn default() -> Self { [INFO] [stdout] 101 + Self::new() [INFO] [stdout] 102 + } [INFO] [stdout] 103 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `split_once` [INFO] [stdout] --> src/patterns/engine/recognizer/symbol_graph.rs:473:25 [INFO] [stdout] | [INFO] [stdout] 473 | / p.trim() [INFO] [stdout] 474 | | .splitn(2, ':') [INFO] [stdout] 475 | | .nth(1) [INFO] [stdout] | |___________________________________^ help: try: `p.trim().split_once(':').map(|x| x.1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/patterns/engine/recognizer/template.rs:80:28 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn from_path(path: &PathBuf) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - pub fn from_path(path: &PathBuf) -> Self { [INFO] [stdout] 80 + pub fn from_path(path: &Path) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/patterns/output/terminal.rs:431:5 [INFO] [stdout] | [INFO] [stdout] 431 | (base - penalty).max(0.0).min(100.0) as u32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(base - penalty).clamp(0.0, 100.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [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: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/scan_cache.rs:272:9 [INFO] [stdout] | [INFO] [stdout] 272 | pairs.sort_unstable_by(|a, b| b.1.cached_at.cmp(&a.1.cached_at)); [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 - pairs.sort_unstable_by(|a, b| b.1.cached_at.cmp(&a.1.cached_at)); [INFO] [stdout] 272 + pairs.sort_unstable_by_key(|b| std::cmp::Reverse(b.1.cached_at)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/scan_cache.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | pairs.sort_unstable_by(|a, b| b.1.cached_at.cmp(&a.1.cached_at)); [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] 331 - pairs.sort_unstable_by(|a, b| b.1.cached_at.cmp(&a.1.cached_at)); [INFO] [stdout] 331 + pairs.sort_unstable_by_key(|b| std::cmp::Reverse(b.1.cached_at)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 05s [INFO] running `Command { std: "docker" "inspect" "5387dfb63cf45902daddbc9fbd3463f1061b8fd64316eeb1f03544ce4ef6cdcc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5387dfb63cf45902daddbc9fbd3463f1061b8fd64316eeb1f03544ce4ef6cdcc", kill_on_drop: false }` [INFO] [stdout] 5387dfb63cf45902daddbc9fbd3463f1061b8fd64316eeb1f03544ce4ef6cdcc