[INFO] cloning repository https://github.com/italonicacio/tsp-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/italonicacio/tsp-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fitalonicacio%2Ftsp-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fitalonicacio%2Ftsp-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a5ca064d52817748d06677016518a7b86fe319fb [INFO] linting italonicacio/tsp-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fitalonicacio%2Ftsp-rust" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/italonicacio/tsp-rust [INFO] finished tweaking git repo https://github.com/italonicacio/tsp-rust [INFO] tweaked toml for git repo https://github.com/italonicacio/tsp-rust written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/italonicacio/tsp-rust 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/italonicacio/tsp-rust 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] bff7cbb7167f59423a5b342bd90587c3a4d1d687a91ef83eec735296cccb6c15 [INFO] running `Command { std: "docker" "start" "-a" "bff7cbb7167f59423a5b342bd90587c3a4d1d687a91ef83eec735296cccb6c15", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "bff7cbb7167f59423a5b342bd90587c3a4d1d687a91ef83eec735296cccb6c15", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bff7cbb7167f59423a5b342bd90587c3a4d1d687a91ef83eec735296cccb6c15", kill_on_drop: false }` [INFO] [stdout] bff7cbb7167f59423a5b342bd90587c3a4d1d687a91ef83eec735296cccb6c15 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] a4b1bc09ee42e2359c788172b062f8ec59fcd80b593a236008e889ae95916476 [INFO] running `Command { std: "docker" "start" "-a" "a4b1bc09ee42e2359c788172b062f8ec59fcd80b593a236008e889ae95916476", kill_on_drop: false }` [INFO] [stderr] Checking tsp v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let mut iter: u32 = 0; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let mut current_vertex: u32 = 0; [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `all_vertices_visited` [INFO] [stdout] --> src/main.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | let all_vertices_visited = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_all_vertices_visited` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `count_visited_vertices` [INFO] [stdout] --> src/main.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | let count_visited_vertices: u32 = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_count_visited_vertices` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `iter` [INFO] [stdout] --> src/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let mut iter: u32 = 0; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_iter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `current_vertex` [INFO] [stdout] --> src/main.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let mut current_vertex: u32 = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_current_vertex` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `d`, `p`, and `cost_matrix` are never read [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | struct Instance { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 7 | d: usize, [INFO] [stdout] | ^ [INFO] [stdout] 8 | p: usize, [INFO] [stdout] | ^ [INFO] [stdout] 9 | cost_matrix: Vec>, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Instance` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nearest_neighbor` is never used [INFO] [stdout] --> src/main.rs:70:4 [INFO] [stdout] | [INFO] [stdout] 70 | fn nearest_neighbor(instance: &Instance) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | if !lines.find("DIMENSION").is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.find("DIMENSION").is_some()` [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/main.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if !lines.find("P").is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.find("P").is_some()` [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/main.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 36 | if !lines.find("COST").is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.find("COST").is_some()` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:26:42 [INFO] [stdout] | [INFO] [stdout] 26 | let split: Vec<&str> = lines.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | let split: Vec<&str> = lines.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:47:56 [INFO] [stdout] | [INFO] [stdout] 47 | let mut vector: Vec> = vec![lines.trim().split_whitespace().map(|l| l.parse().unwrap()).collect()]; [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let mut iter: u32 = 0; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let mut current_vertex: u32 = 0; [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `all_vertices_visited` [INFO] [stdout] --> src/main.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | let all_vertices_visited = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_all_vertices_visited` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `count_visited_vertices` [INFO] [stdout] --> src/main.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | let count_visited_vertices: u32 = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_count_visited_vertices` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `iter` [INFO] [stdout] --> src/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let mut iter: u32 = 0; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_iter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `current_vertex` [INFO] [stdout] --> src/main.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let mut current_vertex: u32 = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_current_vertex` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `d`, `p`, and `cost_matrix` are never read [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | struct Instance { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 7 | d: usize, [INFO] [stdout] | ^ [INFO] [stdout] 8 | p: usize, [INFO] [stdout] | ^ [INFO] [stdout] 9 | cost_matrix: Vec>, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Instance` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nearest_neighbor` is never used [INFO] [stdout] --> src/main.rs:70:4 [INFO] [stdout] | [INFO] [stdout] 70 | fn nearest_neighbor(instance: &Instance) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | if !lines.find("DIMENSION").is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.find("DIMENSION").is_some()` [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/main.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if !lines.find("P").is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.find("P").is_some()` [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/main.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 36 | if !lines.find("COST").is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.find("COST").is_some()` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:26:42 [INFO] [stdout] | [INFO] [stdout] 26 | let split: Vec<&str> = lines.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | let split: Vec<&str> = lines.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:47:56 [INFO] [stdout] | [INFO] [stdout] 47 | let mut vector: Vec> = vec![lines.trim().split_whitespace().map(|l| l.parse().unwrap()).collect()]; [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s [INFO] running `Command { std: "docker" "inspect" "a4b1bc09ee42e2359c788172b062f8ec59fcd80b593a236008e889ae95916476", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a4b1bc09ee42e2359c788172b062f8ec59fcd80b593a236008e889ae95916476", kill_on_drop: false }` [INFO] [stdout] a4b1bc09ee42e2359c788172b062f8ec59fcd80b593a236008e889ae95916476