[INFO] cloning repository https://github.com/FKnorring/overdoc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/FKnorring/overdoc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFKnorring%2Foverdoc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFKnorring%2Foverdoc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 886b0ef830b09c4265f36a0a7bfbeff62c81ec0c [INFO] linting FKnorring/overdoc against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFKnorring%2Foverdoc" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/FKnorring/overdoc [INFO] finished tweaking git repo https://github.com/FKnorring/overdoc [INFO] tweaked toml for git repo https://github.com/FKnorring/overdoc written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/FKnorring/overdoc 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/FKnorring/overdoc 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 globset v0.4.16 [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] 225c0f370fad8623632666a181a960c92c972e38c484698de73beb8641ed08b2 [INFO] running `Command { std: "docker" "start" "-a" "225c0f370fad8623632666a181a960c92c972e38c484698de73beb8641ed08b2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "225c0f370fad8623632666a181a960c92c972e38c484698de73beb8641ed08b2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "225c0f370fad8623632666a181a960c92c972e38c484698de73beb8641ed08b2", kill_on_drop: false }` [INFO] [stdout] 225c0f370fad8623632666a181a960c92c972e38c484698de73beb8641ed08b2 [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] 1079d367407a061bba5d0d02c20927971236bf8c7d927cbe29e2e3246a118ba4 [INFO] running `Command { std: "docker" "start" "-a" "1079d367407a061bba5d0d02c20927971236bf8c7d927cbe29e2e3246a118ba4", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.94 [INFO] [stderr] Compiling libc v0.2.171 [INFO] [stderr] Checking anstyle v1.0.10 [INFO] [stderr] Checking anstyle-query v1.1.2 [INFO] [stderr] Checking colorchoice v1.0.3 [INFO] [stderr] Compiling anyhow v1.0.97 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking anstyle-parse v0.2.6 [INFO] [stderr] Checking bstr v1.12.0 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Checking clap_lex v0.7.4 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Checking unsafe-libyaml v0.2.11 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Checking anstream v0.6.18 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Checking clap_builder v4.5.35 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking is-terminal v0.4.16 [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking globset v0.4.16 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking ignore v0.4.23 [INFO] [stderr] Checking env_logger v0.10.2 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling clap_derive v4.5.32 [INFO] [stderr] Checking clap v4.5.35 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking overdoc v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: function `create_default_config` is never used [INFO] [stdout] --> src/config.rs:119:8 [INFO] [stdout] | [INFO] [stdout] 119 | pub fn create_default_config(config_path: &str) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_dependent_files` and `get_dependencies` are never used [INFO] [stdout] --> src/dependencies.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl DependencyGraph { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn get_dependent_files(&self, file_path: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn get_dependencies(&self, file_path: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `file_path` and `line_number` are never read [INFO] [stdout] --> src/exports.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct ExportedEntity { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 18 | pub file_path: PathBuf, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub line_number: usize, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ExportedEntity` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `line_number` and `import_statement` are never read [INFO] [stdout] --> src/exports.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 32 | pub struct ImportReference { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 40 | pub line_number: usize, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub import_statement: String, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ImportReference` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_export_by_name` is never used [INFO] [stdout] --> src/exports.rs:359:8 [INFO] [stdout] | [INFO] [stdout] 359 | pub fn find_export_by_name<'a>( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `path` is never read [INFO] [stdout] --> src/metrics.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct FileMetrics { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 10 | pub path: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FileMetrics` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `total_size_bytes` and `avg_file_size` are never read [INFO] [stdout] --> src/metrics.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 97 | pub struct RepositoryMetrics { [INFO] [stdout] | ----------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 104 | pub total_size_bytes: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 105 | pub language_distribution: HashMap, // Extension -> file count [INFO] [stdout] 106 | pub avg_file_size: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RepositoryMetrics` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/dependencies.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | files.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] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 40 - files.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 40 + files.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/dependencies.rs:165:27 [INFO] [stdout] | [INFO] [stdout] 165 | for (file_path, _) in exports_map { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 165 - for (file_path, _) in exports_map { [INFO] [stdout] 165 + for file_path in exports_map.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/dependencies.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | dirs.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] 191 - dirs.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 191 + dirs.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_default_config` is never used [INFO] [stdout] --> src/config.rs:119:8 [INFO] [stdout] | [INFO] [stdout] 119 | pub fn create_default_config(config_path: &str) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_dependent_files` and `get_dependencies` are never used [INFO] [stdout] --> src/dependencies.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl DependencyGraph { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn get_dependent_files(&self, file_path: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn get_dependencies(&self, file_path: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/filter.rs:144:22 [INFO] [stdout] | [INFO] [stdout] 144 | let suffix = &pattern[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/filter.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 143 | if pattern.starts_with("*") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 143 ~ if let Some(suffix) = pattern.strip_prefix("*") { [INFO] [stdout] 144 ~ return path.ends_with(suffix); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `file_path` and `line_number` are never read [INFO] [stdout] --> src/exports.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct ExportedEntity { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 18 | pub file_path: PathBuf, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub line_number: usize, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ExportedEntity` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `line_number` and `import_statement` are never read [INFO] [stdout] --> src/exports.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 32 | pub struct ImportReference { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 40 | pub line_number: usize, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub import_statement: String, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ImportReference` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_export_by_name` is never used [INFO] [stdout] --> src/exports.rs:359:8 [INFO] [stdout] | [INFO] [stdout] 359 | pub fn find_export_by_name<'a>( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `path` is never read [INFO] [stdout] --> src/metrics.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct FileMetrics { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 10 | pub path: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FileMetrics` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `total_size_bytes` and `avg_file_size` are never read [INFO] [stdout] --> src/metrics.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 97 | pub struct RepositoryMetrics { [INFO] [stdout] | ----------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 104 | pub total_size_bytes: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 105 | pub language_distribution: HashMap, // Extension -> file count [INFO] [stdout] 106 | pub avg_file_size: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RepositoryMetrics` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/filter.rs:149:22 [INFO] [stdout] | [INFO] [stdout] 149 | let prefix = &pattern[..pattern.len() - 1]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/filter.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | if pattern.ends_with("*") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 148 ~ if let Some(prefix) = pattern.strip_suffix("*") { [INFO] [stdout] 149 ~ return path.starts_with(prefix); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual checked division [INFO] [stdout] --> src/metrics.rs:324:33 [INFO] [stdout] | [INFO] [stdout] 324 | let avg_lines_per_file = if total_files > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ check performed here [INFO] [stdout] 325 | total_lines / total_files [INFO] [stdout] | ------------------------- division performed here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/metrics.rs:564:9 [INFO] [stdout] | [INFO] [stdout] 564 | / if metrics.maintainability_index > 100.0 { [INFO] [stdout] 565 | | metrics.maintainability_index = 100.0; [INFO] [stdout] 566 | | } else if metrics.maintainability_index < 0.0 { [INFO] [stdout] 567 | | metrics.maintainability_index = 0.0; [INFO] [stdout] 568 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `metrics.maintainability_index = metrics.maintainability_index.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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/metrics.rs:619:66 [INFO] [stdout] | [INFO] [stdout] 619 | nesting_level = nesting_level.saturating_sub(close_count as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `close_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/dependencies.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | files.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] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 40 - files.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 40 + files.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/metrics.rs:668:66 [INFO] [stdout] | [INFO] [stdout] 668 | nesting_level = nesting_level.saturating_sub(close_count as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `close_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/metrics.rs:700:66 [INFO] [stdout] | [INFO] [stdout] 700 | nesting_level = nesting_level.saturating_sub(close_count as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `close_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/metrics.rs:745:48 [INFO] [stdout] | [INFO] [stdout] 745 | if !word.is_empty() && !word.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `word.parse::().is_err()` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/metrics.rs:791:48 [INFO] [stdout] | [INFO] [stdout] 791 | if !word.is_empty() && !word.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `word.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/metrics.rs:835:48 [INFO] [stdout] | [INFO] [stdout] 835 | if !word.is_empty() && !word.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `word.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/metrics.rs:753:54 [INFO] [stdout] | [INFO] [stdout] 753 | for part in trimmed.split(|c: char| !c.is_digit(10) && c != '.') { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/dependencies.rs:165:27 [INFO] [stdout] | [INFO] [stdout] 165 | for (file_path, _) in exports_map { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 165 - for (file_path, _) in exports_map { [INFO] [stdout] 165 + for file_path in exports_map.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/dependencies.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | dirs.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] 191 - dirs.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 191 + dirs.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/metrics.rs:798:54 [INFO] [stdout] | [INFO] [stdout] 798 | for part in trimmed.split(|c: char| !c.is_digit(10) && c != '.') { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/metrics.rs:925:5 [INFO] [stdout] | [INFO] [stdout] 923 | let normalized_score = (knowledge_score * 0.85).min(100.0); [INFO] [stdout] | ----------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 924 | [INFO] [stdout] 925 | normalized_score [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 923 ~ [INFO] [stdout] 924 | [INFO] [stdout] 925 ~ (knowledge_score * 0.85).min(100.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/traversal.rs:48:33 [INFO] [stdout] | [INFO] [stdout] 48 | extension: extension.map(String::from), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider removing [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/filter.rs:144:22 [INFO] [stdout] | [INFO] [stdout] 144 | let suffix = &pattern[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/filter.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 143 | if pattern.starts_with("*") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 143 ~ if let Some(suffix) = pattern.strip_prefix("*") { [INFO] [stdout] 144 ~ return path.ends_with(suffix); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/filter.rs:149:22 [INFO] [stdout] | [INFO] [stdout] 149 | let prefix = &pattern[..pattern.len() - 1]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/filter.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | if pattern.ends_with("*") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 148 ~ if let Some(prefix) = pattern.strip_suffix("*") { [INFO] [stdout] 149 ~ return path.starts_with(prefix); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:180:32 [INFO] [stdout] | [INFO] [stdout] 180 | let mut analysis_content = format!("# OverDoc Analysis Results\n\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"# OverDoc Analysis Results\n\n".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: manual checked division [INFO] [stdout] --> src/metrics.rs:324:33 [INFO] [stdout] | [INFO] [stdout] 324 | let avg_lines_per_file = if total_files > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ check performed here [INFO] [stdout] 325 | total_lines / total_files [INFO] [stdout] | ------------------------- division performed here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/main.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | lang_dist.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] 233 - lang_dist.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 233 + lang_dist.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:259:5 [INFO] [stdout] | [INFO] [stdout] 259 | analysis_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `analysis_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | analysis_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `analysis_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/metrics.rs:564:9 [INFO] [stdout] | [INFO] [stdout] 564 | / if metrics.maintainability_index > 100.0 { [INFO] [stdout] 565 | | metrics.maintainability_index = 100.0; [INFO] [stdout] 566 | | } else if metrics.maintainability_index < 0.0 { [INFO] [stdout] 567 | | metrics.maintainability_index = 0.0; [INFO] [stdout] 568 | | } [INFO] [stdout] | |_________^ help: replace with clamp: `metrics.maintainability_index = metrics.maintainability_index.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/main.rs:343:5 [INFO] [stdout] | [INFO] [stdout] 343 | dir_scores.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] 343 - dir_scores.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 343 + dir_scores.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/metrics.rs:619:66 [INFO] [stdout] | [INFO] [stdout] 619 | nesting_level = nesting_level.saturating_sub(close_count as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `close_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/metrics.rs:668:66 [INFO] [stdout] | [INFO] [stdout] 668 | nesting_level = nesting_level.saturating_sub(close_count as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `close_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:383:9 [INFO] [stdout] | [INFO] [stdout] 383 | analysis_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `analysis_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/metrics.rs:700:66 [INFO] [stdout] | [INFO] [stdout] 700 | nesting_level = nesting_level.saturating_sub(close_count as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `close_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/metrics.rs:745:48 [INFO] [stdout] | [INFO] [stdout] 745 | if !word.is_empty() && !word.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `word.parse::().is_err()` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/metrics.rs:791:48 [INFO] [stdout] | [INFO] [stdout] 791 | if !word.is_empty() && !word.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `word.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/metrics.rs:835:48 [INFO] [stdout] | [INFO] [stdout] 835 | if !word.is_empty() && !word.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `word.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/metrics.rs:753:54 [INFO] [stdout] | [INFO] [stdout] 753 | for part in trimmed.split(|c: char| !c.is_digit(10) && c != '.') { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/metrics.rs:798:54 [INFO] [stdout] | [INFO] [stdout] 798 | for part in trimmed.split(|c: char| !c.is_digit(10) && c != '.') { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/metrics.rs:925:5 [INFO] [stdout] | [INFO] [stdout] 923 | let normalized_score = (knowledge_score * 0.85).min(100.0); [INFO] [stdout] | ----------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 924 | [INFO] [stdout] 925 | normalized_score [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 923 ~ [INFO] [stdout] 924 | [INFO] [stdout] 925 ~ (knowledge_score * 0.85).min(100.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/traversal.rs:48:33 [INFO] [stdout] | [INFO] [stdout] 48 | extension: extension.map(String::from), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider removing [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:180:32 [INFO] [stdout] | [INFO] [stdout] 180 | let mut analysis_content = format!("# OverDoc Analysis Results\n\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"# OverDoc Analysis Results\n\n".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: consider using `sort_by_key` [INFO] [stdout] --> src/main.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | lang_dist.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] 233 - lang_dist.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 233 + lang_dist.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:259:5 [INFO] [stdout] | [INFO] [stdout] 259 | analysis_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `analysis_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | analysis_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `analysis_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/main.rs:343:5 [INFO] [stdout] | [INFO] [stdout] 343 | dir_scores.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] 343 - dir_scores.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 343 + dir_scores.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:383:9 [INFO] [stdout] | [INFO] [stdout] 383 | analysis_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `analysis_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.96s [INFO] running `Command { std: "docker" "inspect" "1079d367407a061bba5d0d02c20927971236bf8c7d927cbe29e2e3246a118ba4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1079d367407a061bba5d0d02c20927971236bf8c7d927cbe29e2e3246a118ba4", kill_on_drop: false }` [INFO] [stdout] 1079d367407a061bba5d0d02c20927971236bf8c7d927cbe29e2e3246a118ba4