[INFO] cloning repository https://github.com/jadeaffenjaeger/rust_connect_four [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jadeaffenjaeger/rust_connect_four" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjadeaffenjaeger%2Frust_connect_four", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjadeaffenjaeger%2Frust_connect_four'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b851577953258e3d251a6b07bc7168d6a5de7571 [INFO] linting jadeaffenjaeger/rust_connect_four against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjadeaffenjaeger%2Frust_connect_four" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/jadeaffenjaeger/rust_connect_four [INFO] finished tweaking git repo https://github.com/jadeaffenjaeger/rust_connect_four [INFO] tweaked toml for git repo https://github.com/jadeaffenjaeger/rust_connect_four written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jadeaffenjaeger/rust_connect_four 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/jadeaffenjaeger/rust_connect_four 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] Downloading crates ... [INFO] [stderr] Downloaded c_vec v2.0.0 [INFO] [stderr] Downloaded sdl2 v0.34.5 [INFO] [stderr] Downloaded sdl2-sys v0.34.5 [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] 9d5dc0bbac2e6b64f4683947e44cded621532fa9deacf83b6f7ebf22e4ab706c [INFO] running `Command { std: "docker" "start" "-a" "9d5dc0bbac2e6b64f4683947e44cded621532fa9deacf83b6f7ebf22e4ab706c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9d5dc0bbac2e6b64f4683947e44cded621532fa9deacf83b6f7ebf22e4ab706c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9d5dc0bbac2e6b64f4683947e44cded621532fa9deacf83b6f7ebf22e4ab706c", kill_on_drop: false }` [INFO] [stdout] 9d5dc0bbac2e6b64f4683947e44cded621532fa9deacf83b6f7ebf22e4ab706c [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] 27f7ee561c276d01c41db8bbc7b5793507c98ad6e295091dd23e47df6e812107 [INFO] running `Command { std: "docker" "start" "-a" "27f7ee561c276d01c41db8bbc7b5793507c98ad6e295091dd23e47df6e812107", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.98 [INFO] [stderr] Compiling version-compare v0.0.10 [INFO] [stderr] Compiling sdl2 v0.34.5 [INFO] [stderr] Checking c_vec v2.0.0 [INFO] [stderr] Checking fixedbitset v0.4.0 [INFO] [stderr] Checking petgraph v0.6.0 [INFO] [stderr] Compiling sdl2-sys v0.34.5 [INFO] [stderr] Checking getrandom v0.2.3 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.4 [INFO] [stderr] Checking connect_four v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/game.rs:86:23 [INFO] [stdout] | [INFO] [stdout] 86 | .filter(|(i, &num)| num < NUM_ROWS) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/game.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | for i in 0..4 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/game.rs:86:23 [INFO] [stdout] | [INFO] [stdout] 86 | .filter(|(i, &num)| num < NUM_ROWS) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/game.rs:10:29 [INFO] [stdout] | [INFO] [stdout] 10 | pub num_stones: [usize; NUM_COLS as usize], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `NUM_COLS` [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: name `OWN` contains a capitalized acronym [INFO] [stdout] --> src/game.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | OWN, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Own` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OPPONENT` contains a capitalized acronym [INFO] [stdout] --> src/game.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | OPPONENT, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Opponent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game.rs:164:17 [INFO] [stdout] | [INFO] [stdout] 164 | assert!(!g.play_move(0).is_none()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g.play_move(0).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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/game.rs:10:29 [INFO] [stdout] | [INFO] [stdout] 10 | pub num_stones: [usize; NUM_COLS as usize], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `NUM_COLS` [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: name `OWN` contains a capitalized acronym [INFO] [stdout] --> src/game.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | OWN, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Own` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OPPONENT` contains a capitalized acronym [INFO] [stdout] --> src/game.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | OPPONENT, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Opponent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mcts.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | if children.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `children.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: length comparison to zero [INFO] [stdout] --> src/mcts.rs:102:12 [INFO] [stdout] | [INFO] [stdout] 102 | if moves.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `moves.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mcts.rs:152:33 [INFO] [stdout] | [INFO] [stdout] 152 | fn pprint_path(&self, path: &Vec, info: &str) { [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] 152 - fn pprint_path(&self, path: &Vec, info: &str) { [INFO] [stdout] 152 + fn pprint_path(&self, path: &[NodeIndex], info: &str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcts.rs:165:18 [INFO] [stdout] | [INFO] [stdout] 165 | .map(|n| node_pprint(n)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `node_pprint` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/mcts.rs:222:29 [INFO] [stdout] | [INFO] [stdout] 222 | let outgoing_edge = self [INFO] [stdout] | _____________________________^ [INFO] [stdout] 223 | | .graph [INFO] [stdout] 224 | | .edges_directed(self.root, petgraph::Outgoing) [INFO] [stdout] 225 | | .filter(|e| *e.weight() == m) [INFO] [stdout] 226 | | .next() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 222 ~ let outgoing_edge = self [INFO] [stdout] 223 + .graph [INFO] [stdout] 224 + .edges_directed(self.root, petgraph::Outgoing).find(|e| *e.weight() == m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mcts.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | if children.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `children.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: length comparison to zero [INFO] [stdout] --> src/mcts.rs:102:12 [INFO] [stdout] | [INFO] [stdout] 102 | if moves.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `moves.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: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:111:24 [INFO] [stdout] | [INFO] [stdout] 111 | if x < MARGIN || x > (WIDTH - MARGIN) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(MARGIN..=(WIDTH - MARGIN)).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mcts.rs:152:33 [INFO] [stdout] | [INFO] [stdout] 152 | fn pprint_path(&self, path: &Vec, info: &str) { [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] 152 - fn pprint_path(&self, path: &Vec, info: &str) { [INFO] [stdout] 152 + fn pprint_path(&self, path: &[NodeIndex], info: &str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcts.rs:165:18 [INFO] [stdout] | [INFO] [stdout] 165 | .map(|n| node_pprint(n)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `node_pprint` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/mcts.rs:222:29 [INFO] [stdout] | [INFO] [stdout] 222 | let outgoing_edge = self [INFO] [stdout] | _____________________________^ [INFO] [stdout] 223 | | .graph [INFO] [stdout] 224 | | .edges_directed(self.root, petgraph::Outgoing) [INFO] [stdout] 225 | | .filter(|e| *e.weight() == m) [INFO] [stdout] 226 | | .next() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 222 ~ let outgoing_edge = self [INFO] [stdout] 223 + .graph [INFO] [stdout] 224 + .edges_directed(self.root, petgraph::Outgoing).find(|e| *e.weight() == m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:111:24 [INFO] [stdout] | [INFO] [stdout] 111 | if x < MARGIN || x > (WIDTH - MARGIN) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(MARGIN..=(WIDTH - MARGIN)).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.39s [INFO] running `Command { std: "docker" "inspect" "27f7ee561c276d01c41db8bbc7b5793507c98ad6e295091dd23e47df6e812107", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "27f7ee561c276d01c41db8bbc7b5793507c98ad6e295091dd23e47df6e812107", kill_on_drop: false }` [INFO] [stdout] 27f7ee561c276d01c41db8bbc7b5793507c98ad6e295091dd23e47df6e812107