[INFO] fetching crate codstts 0.1.0... [INFO] linting codstts-0.1.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate codstts 0.1.0 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate codstts 0.1.0 [INFO] finished tweaking crates.io crate codstts 0.1.0 [INFO] tweaked toml for crates.io crate codstts 0.1.0 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate codstts 0.1.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate codstts 0.1.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded is-terminal v0.4.15 [INFO] [stderr] Downloaded globset v0.4.15 [INFO] [stderr] Downloaded serde_spanned v0.6.8 [INFO] [stderr] Downloaded clap v4.5.27 [INFO] [stderr] Downloaded clap_derive v4.5.24 [INFO] [stderr] Downloaded serde_json v1.0.137 [INFO] [stderr] Downloaded indicatif v0.17.9 [INFO] [stderr] Downloaded winnow v0.6.24 [INFO] [stderr] Downloaded clap_builder v4.5.27 [INFO] [stderr] Downloaded portable-atomic v1.10.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 38222064d4a1abd4ffc620f956effa15fa824041347d5b1bfae2dc55a7cd4a6b [INFO] running `Command { std: "docker" "start" "-a" "38222064d4a1abd4ffc620f956effa15fa824041347d5b1bfae2dc55a7cd4a6b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "38222064d4a1abd4ffc620f956effa15fa824041347d5b1bfae2dc55a7cd4a6b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "38222064d4a1abd4ffc620f956effa15fa824041347d5b1bfae2dc55a7cd4a6b", kill_on_drop: false }` [INFO] [stdout] 38222064d4a1abd4ffc620f956effa15fa824041347d5b1bfae2dc55a7cd4a6b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] d93df48abf75349e627286a28c374e0732f86735ae6ab5e1533cc0c57d713396 [INFO] running `Command { std: "docker" "start" "-a" "d93df48abf75349e627286a28c374e0732f86735ae6ab5e1533cc0c57d713396", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.93 [INFO] [stderr] Compiling unicode-ident v1.0.15 [INFO] [stderr] Compiling serde v1.0.217 [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Checking colorchoice v1.0.3 [INFO] [stderr] Checking anstyle v1.0.10 [INFO] [stderr] Checking anstyle-query v1.1.2 [INFO] [stderr] Checking clap_lex v0.7.4 [INFO] [stderr] Compiling portable-atomic v1.10.0 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking anstyle-parse v0.2.6 [INFO] [stderr] Checking once_cell v1.20.2 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking bstr v1.11.3 [INFO] [stderr] Checking unicode-width v0.2.0 [INFO] [stderr] Compiling rayon-core v1.12.1 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Checking winnow v0.6.24 [INFO] [stderr] Checking log v0.4.25 [INFO] [stderr] Compiling thiserror v2.0.11 [INFO] [stderr] Compiling serde_json v1.0.137 [INFO] [stderr] Checking half v2.4.1 [INFO] [stderr] Checking anstream v0.6.18 [INFO] [stderr] Checking ryu v1.0.18 [INFO] [stderr] Checking number_prefix v0.4.0 [INFO] [stderr] Checking itoa v1.0.14 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Checking colored v3.0.0 [INFO] [stderr] Checking clap_builder v4.5.27 [INFO] [stderr] Checking oorandom v11.1.4 [INFO] [stderr] Checking indexmap v2.7.1 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Checking console v0.15.10 [INFO] [stderr] Checking is-terminal v0.4.15 [INFO] [stderr] Compiling syn v2.0.96 [INFO] [stderr] Checking indicatif v0.17.9 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking globset v0.4.15 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking ignore v0.4.23 [INFO] [stderr] Compiling serde_derive v1.0.217 [INFO] [stderr] Compiling clap_derive v4.5.24 [INFO] [stderr] Compiling thiserror-impl v2.0.11 [INFO] [stderr] Checking clap v4.5.27 [INFO] [stderr] Checking serde_spanned v0.6.8 [INFO] [stderr] Checking toml_datetime v0.6.8 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking toml_edit v0.22.22 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stderr] Checking toml v0.8.19 [INFO] [stderr] Checking codstts v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/core/display.rs:38:31 [INFO] [stdout] | [INFO] [stdout] 38 | .map(|(_, stats)| (stats.bytes as f64 / total_bytes as f64 * 100.0)) [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] 38 - .map(|(_, stats)| (stats.bytes as f64 / total_bytes as f64 * 100.0)) [INFO] [stdout] 38 + .map(|(_, stats)| stats.bytes as f64 / total_bytes as f64 * 100.0 ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ProjectAnalyzer` [INFO] [stdout] --> src/core/analyzer.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Self { [INFO] [stdout] 20 | | detector: LanguageDetector::new(), [INFO] [stdout] 21 | | config: None, [INFO] [stdout] 22 | | } [INFO] [stdout] 23 | | } [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] 17 + impl Default for ProjectAnalyzer { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/core/analyzer.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | if !entry.file_type().map_or(false, |ft| ft.is_file()) || self.detector.should_ignore(path) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 88 - if !entry.file_type().map_or(false, |ft| ft.is_file()) || self.detector.should_ignore(path) [INFO] [stdout] 88 + if !entry.file_type().is_some_and(|ft| ft.is_file()) || self.detector.should_ignore(path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/core/display.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | langs.sort_by(|a, b| b.1.bytes.cmp(&a.1.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: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 34 - langs.sort_by(|a, b| b.1.bytes.cmp(&a.1.bytes)); [INFO] [stdout] 34 + langs.sort_by_key(|b| std::cmp::Reverse(b.1.bytes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/core/display.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | langs.sort_by(|a, b| b.1.bytes.cmp(&a.1.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] 87 - langs.sort_by(|a, b| b.1.bytes.cmp(&a.1.bytes)); [INFO] [stdout] 87 + langs.sort_by_key(|b| std::cmp::Reverse(b.1.bytes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LanguageStats` [INFO] [stdout] --> src/core/stats.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | Self { [INFO] [stdout] 26 | | stats: HashMap::new(), [INFO] [stdout] 27 | | total_files: 0, [INFO] [stdout] 28 | | } [INFO] [stdout] 29 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for LanguageStats { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | if cli.simple || (!cli.simple && !cli.detail) { [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] 42 - if cli.simple || (!cli.simple && !cli.detail) { [INFO] [stdout] 42 + if !(!cli.simple && cli.detail) { [INFO] [stdout] | [INFO] [stdout] 42 - if cli.simple || (!cli.simple && !cli.detail) { [INFO] [stdout] 42 + if cli.simple || !cli.detail { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 48 - if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] 48 + if !(other_files.is_empty() || !cli.detail && cli.simple) { [INFO] [stdout] | [INFO] [stdout] 48 - if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] 48 + if (!cli.simple || cli.detail) && !other_files.is_empty() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:48:43 [INFO] [stdout] | [INFO] [stdout] 48 | if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 48 - if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] 48 + if !other_files.is_empty() && !(!cli.detail && cli.simple) { [INFO] [stdout] | [INFO] [stdout] 48 - if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] 48 + if !other_files.is_empty() && cli.detail || !cli.simple { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/core/display.rs:38:31 [INFO] [stdout] | [INFO] [stdout] 38 | .map(|(_, stats)| (stats.bytes as f64 / total_bytes as f64 * 100.0)) [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] 38 - .map(|(_, stats)| (stats.bytes as f64 / total_bytes as f64 * 100.0)) [INFO] [stdout] 38 + .map(|(_, stats)| stats.bytes as f64 / total_bytes as f64 * 100.0 ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | if cli.simple || (!cli.simple && !cli.detail) { [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] 42 - if cli.simple || (!cli.simple && !cli.detail) { [INFO] [stdout] 42 + if !(!cli.simple && cli.detail) { [INFO] [stdout] | [INFO] [stdout] 42 - if cli.simple || (!cli.simple && !cli.detail) { [INFO] [stdout] 42 + if cli.simple || !cli.detail { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 48 - if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] 48 + if !(other_files.is_empty() || !cli.detail && cli.simple) { [INFO] [stdout] | [INFO] [stdout] 48 - if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] 48 + if (!cli.simple || cli.detail) && !other_files.is_empty() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:48:43 [INFO] [stdout] | [INFO] [stdout] 48 | if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 48 - if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] 48 + if !other_files.is_empty() && !(!cli.detail && cli.simple) { [INFO] [stdout] | [INFO] [stdout] 48 - if !other_files.is_empty() && (cli.detail || (!cli.simple && !cli.detail)) { [INFO] [stdout] 48 + if !other_files.is_empty() && cli.detail || !cli.simple { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ProjectAnalyzer` [INFO] [stdout] --> src/core/analyzer.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Self { [INFO] [stdout] 20 | | detector: LanguageDetector::new(), [INFO] [stdout] 21 | | config: None, [INFO] [stdout] 22 | | } [INFO] [stdout] 23 | | } [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] 17 + impl Default for ProjectAnalyzer { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/core/analyzer.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | if !entry.file_type().map_or(false, |ft| ft.is_file()) || self.detector.should_ignore(path) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 88 - if !entry.file_type().map_or(false, |ft| ft.is_file()) || self.detector.should_ignore(path) [INFO] [stdout] 88 + if !entry.file_type().is_some_and(|ft| ft.is_file()) || self.detector.should_ignore(path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/core/display.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | langs.sort_by(|a, b| b.1.bytes.cmp(&a.1.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: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 34 - langs.sort_by(|a, b| b.1.bytes.cmp(&a.1.bytes)); [INFO] [stdout] 34 + langs.sort_by_key(|b| std::cmp::Reverse(b.1.bytes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/core/display.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | langs.sort_by(|a, b| b.1.bytes.cmp(&a.1.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] 87 - langs.sort_by(|a, b| b.1.bytes.cmp(&a.1.bytes)); [INFO] [stdout] 87 + langs.sort_by_key(|b| std::cmp::Reverse(b.1.bytes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LanguageStats` [INFO] [stdout] --> src/core/stats.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | Self { [INFO] [stdout] 26 | | stats: HashMap::new(), [INFO] [stdout] 27 | | total_files: 0, [INFO] [stdout] 28 | | } [INFO] [stdout] 29 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for LanguageStats { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 24.74s [INFO] running `Command { std: "docker" "inspect" "d93df48abf75349e627286a28c374e0732f86735ae6ab5e1533cc0c57d713396", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d93df48abf75349e627286a28c374e0732f86735ae6ab5e1533cc0c57d713396", kill_on_drop: false }` [INFO] [stdout] d93df48abf75349e627286a28c374e0732f86735ae6ab5e1533cc0c57d713396