[INFO] cloning repository https://github.com/Schrodinger17/rust-hex-ai [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Schrodinger17/rust-hex-ai" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSchrodinger17%2Frust-hex-ai", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSchrodinger17%2Frust-hex-ai'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1192d5f46d5f0d83f975586bb6a51b184627bf38 [INFO] linting Schrodinger17/rust-hex-ai against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSchrodinger17%2Frust-hex-ai" "/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/Schrodinger17/rust-hex-ai [INFO] finished tweaking git repo https://github.com/Schrodinger17/rust-hex-ai [INFO] tweaked toml for git repo https://github.com/Schrodinger17/rust-hex-ai written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Schrodinger17/rust-hex-ai 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/Schrodinger17/rust-hex-ai 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 is-terminal v0.4.15 [INFO] [stderr] Downloaded clap v4.5.31 [INFO] [stderr] Downloaded either v1.14.0 [INFO] [stderr] Downloaded zerocopy-derive v0.8.21 [INFO] [stderr] Downloaded clap_builder v4.5.31 [INFO] [stderr] Downloaded zerocopy v0.8.21 [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] b884e7ccc095770f750c9fbe7ee2cb137438bc4743bb7b72dfb0dc7df6443793 [INFO] running `Command { std: "docker" "start" "-a" "b884e7ccc095770f750c9fbe7ee2cb137438bc4743bb7b72dfb0dc7df6443793", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b884e7ccc095770f750c9fbe7ee2cb137438bc4743bb7b72dfb0dc7df6443793", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b884e7ccc095770f750c9fbe7ee2cb137438bc4743bb7b72dfb0dc7df6443793", kill_on_drop: false }` [INFO] [stdout] b884e7ccc095770f750c9fbe7ee2cb137438bc4743bb7b72dfb0dc7df6443793 [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] 7128b66a482ae297a61781073f10c06290cc9cadf0abedc35d78f832d59da292 [INFO] running `Command { std: "docker" "start" "-a" "7128b66a482ae297a61781073f10c06290cc9cadf0abedc35d78f832d59da292", kill_on_drop: false }` [INFO] [stderr] Compiling unicode-ident v1.0.17 [INFO] [stderr] Compiling libc v0.2.170 [INFO] [stderr] Compiling getrandom v0.3.1 [INFO] [stderr] Compiling serde v1.0.218 [INFO] [stderr] Compiling zerocopy v0.8.21 [INFO] [stderr] Checking either v1.14.0 [INFO] [stderr] Checking ryu v1.0.19 [INFO] [stderr] Checking half v2.4.1 [INFO] [stderr] Checking clap_builder v4.5.31 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking once_cell v1.20.3 [INFO] [stderr] Checking oorandom v11.1.4 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Compiling proc-macro2 v1.0.93 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Checking is-terminal v0.4.15 [INFO] [stderr] Compiling syn v2.0.98 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking clap v4.5.31 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling serde_derive v1.0.218 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.0 [INFO] [stderr] Checking rust_hex v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:69:17 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Distance::Reachable(d) = distances[i][j] { [INFO] [stdout] 70 | | if d == distance { [INFO] [stdout] 71 | | for neighbor in Cell::new(i as i32, j as i32).neighbors(SIZE) { [INFO] [stdout] 72 | | if let Distance::Unexplored = [INFO] [stdout] ... | [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Distance::Reachable(d) = distances[i][j] [INFO] [stdout] 70 ~ && d == distance { [INFO] [stdout] 71 | for neighbor in Cell::new(i as i32, j as i32).neighbors(SIZE) { [INFO] [stdout] ... [INFO] [stdout] 95 | } [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:411:9 [INFO] [stdout] | [INFO] [stdout] 411 | !self.winner().is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.winner().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: using `clone` on type `Color` which implements the `Copy` trait [INFO] [stdout] --> src/color.rs:49:18 [INFO] [stdout] | [INFO] [stdout] 49 | Some(self.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | / if let Some(duration) = duration { [INFO] [stdout] 106 | | if duration.as_millis() < 100 { [INFO] [stdout] 107 | | return (self.evaluation.score(board), None); [INFO] [stdout] 108 | | } [INFO] [stdout] 109 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 105 ~ if let Some(duration) = duration [INFO] [stdout] 106 ~ && duration.as_millis() < 100 { [INFO] [stdout] 107 | return (self.evaluation.score(board), None); [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_2.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if let Some(duration) = duration { [INFO] [stdout] 141 | | if duration.as_millis() < 100 { [INFO] [stdout] 142 | | return (self.evaluation.score(board), None); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(duration) = duration [INFO] [stdout] 141 ~ && duration.as_millis() < 100 { [INFO] [stdout] 142 | return (self.evaluation.score(board), None); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_3.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | / if let Some(duration) = duration { [INFO] [stdout] 151 | | if duration.as_millis() < 100 { [INFO] [stdout] 152 | | return (self.evaluation.score(board), None); [INFO] [stdout] 153 | | } [INFO] [stdout] 154 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 150 ~ if let Some(duration) = duration [INFO] [stdout] 151 ~ && duration.as_millis() < 100 { [INFO] [stdout] 152 | return (self.evaluation.score(board), None); [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_4.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if let Some(duration) = duration { [INFO] [stdout] 141 | | if duration.as_millis() < 100 { [INFO] [stdout] 142 | | return (self.evaluation.score(board), None); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(duration) = duration [INFO] [stdout] 141 ~ && duration.as_millis() < 100 { [INFO] [stdout] 142 | return (self.evaluation.score(board), None); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/human.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / if parts.len() == 2 { [INFO] [stdout] 30 | | if let (Ok(num1), Ok(num2)) = (parts[0].parse::(), parts[1].parse::()) { [INFO] [stdout] 31 | | return Some((num1, num2)); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ if parts.len() == 2 [INFO] [stdout] 30 ~ && let (Ok(num1), Ok(num2)) = (parts[0].parse::(), parts[1].parse::()) { [INFO] [stdout] 31 | return Some((num1, num2)); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/mini_max.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(duration) = duration { [INFO] [stdout] 88 | | if duration.as_millis() < 100 { [INFO] [stdout] 89 | | return (self.evaluation.score(board), None); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(duration) = duration [INFO] [stdout] 88 ~ && duration.as_millis() < 100 { [INFO] [stdout] 89 | return (self.evaluation.score(board), None); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `reach` and `missing_move_to_win` are never used [INFO] [stdout] --> src/board.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 23 | impl Board { [INFO] [stdout] | ----------------------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 57 | fn reach( [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn missing_move_to_win(&self, color: Color) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Evaluation1` is never constructed [INFO] [stdout] --> src/evaluation/evaluation1.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Evaluation1; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/evaluation/evaluation1.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl Evaluation1 { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 23 | pub fn new() -> Evaluation1 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Evaluation2` is never constructed [INFO] [stdout] --> src/evaluation/evaluation2.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Evaluation2; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/evaluation/evaluation2.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl Evaluation2 { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 23 | pub fn new() -> Evaluation2 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:69:17 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Distance::Reachable(d) = distances[i][j] { [INFO] [stdout] 70 | | if d == distance { [INFO] [stdout] 71 | | for neighbor in Cell::new(i as i32, j as i32).neighbors(SIZE) { [INFO] [stdout] 72 | | if let Distance::Unexplored = [INFO] [stdout] ... | [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Distance::Reachable(d) = distances[i][j] [INFO] [stdout] 70 ~ && d == distance { [INFO] [stdout] 71 | for neighbor in Cell::new(i as i32, j as i32).neighbors(SIZE) { [INFO] [stdout] ... [INFO] [stdout] 95 | } [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:411:9 [INFO] [stdout] | [INFO] [stdout] 411 | !self.winner().is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.winner().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: using `clone` on type `Color` which implements the `Copy` trait [INFO] [stdout] --> src/color.rs:49:18 [INFO] [stdout] | [INFO] [stdout] 49 | Some(self.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | / if let Some(duration) = duration { [INFO] [stdout] 106 | | if duration.as_millis() < 100 { [INFO] [stdout] 107 | | return (self.evaluation.score(board), None); [INFO] [stdout] 108 | | } [INFO] [stdout] 109 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 105 ~ if let Some(duration) = duration [INFO] [stdout] 106 ~ && duration.as_millis() < 100 { [INFO] [stdout] 107 | return (self.evaluation.score(board), None); [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_2.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if let Some(duration) = duration { [INFO] [stdout] 141 | | if duration.as_millis() < 100 { [INFO] [stdout] 142 | | return (self.evaluation.score(board), None); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(duration) = duration [INFO] [stdout] 141 ~ && duration.as_millis() < 100 { [INFO] [stdout] 142 | return (self.evaluation.score(board), None); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_3.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | / if let Some(duration) = duration { [INFO] [stdout] 151 | | if duration.as_millis() < 100 { [INFO] [stdout] 152 | | return (self.evaluation.score(board), None); [INFO] [stdout] 153 | | } [INFO] [stdout] 154 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 150 ~ if let Some(duration) = duration [INFO] [stdout] 151 ~ && duration.as_millis() < 100 { [INFO] [stdout] 152 | return (self.evaluation.score(board), None); [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_4.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if let Some(duration) = duration { [INFO] [stdout] 141 | | if duration.as_millis() < 100 { [INFO] [stdout] 142 | | return (self.evaluation.score(board), None); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(duration) = duration [INFO] [stdout] 141 ~ && duration.as_millis() < 100 { [INFO] [stdout] 142 | return (self.evaluation.score(board), None); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/human.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / if parts.len() == 2 { [INFO] [stdout] 30 | | if let (Ok(num1), Ok(num2)) = (parts[0].parse::(), parts[1].parse::()) { [INFO] [stdout] 31 | | return Some((num1, num2)); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ if parts.len() == 2 [INFO] [stdout] 30 ~ && let (Ok(num1), Ok(num2)) = (parts[0].parse::(), parts[1].parse::()) { [INFO] [stdout] 31 | return Some((num1, num2)); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/mini_max.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(duration) = duration { [INFO] [stdout] 88 | | if duration.as_millis() < 100 { [INFO] [stdout] 89 | | return (self.evaluation.score(board), None); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(duration) = duration [INFO] [stdout] 88 ~ && duration.as_millis() < 100 { [INFO] [stdout] 89 | return (self.evaluation.score(board), None); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> benches/best_list.rs:16:38 [INFO] [stdout] | [INFO] [stdout] 16 | let mut sorted: Vec<_> = list.iter().cloned().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> benches/best_list.rs:22:44 [INFO] [stdout] | [INFO] [stdout] 22 | let best_list = BestList::from_vec(&list, n); [INFO] [stdout] | ^^^^^ help: change this to: `list` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> benches/best_list.rs:29:31 [INFO] [stdout] | [INFO] [stdout] 29 | b.iter(|| bests_1(&v, 10)) [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> benches/best_list.rs:32:31 [INFO] [stdout] | [INFO] [stdout] 32 | b.iter(|| bests_2(&v, 10)) [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/evaluation/evaluation1.rs:35:1 [INFO] [stdout] | [INFO] [stdout] 35 | / #[cfg(test)] [INFO] [stdout] 36 | | [INFO] [stdout] | |_^ [INFO] [stdout] 37 | mod tests { [INFO] [stdout] | --------- the attribute applies to this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/evaluation/evaluation1.rs:35:1 [INFO] [stdout] | [INFO] [stdout] 35 | / #[cfg(test)] [INFO] [stdout] 36 | | [INFO] [stdout] | |_^ [INFO] [stdout] 37 | mod tests { [INFO] [stdout] | --------- the attribute applies to this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `values.get(0)` [INFO] [stdout] --> src/best_list.rs:105:20 [INFO] [stdout] | [INFO] [stdout] 105 | assert_eq!(values.get(0), Some(&10)); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:69:17 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Distance::Reachable(d) = distances[i][j] { [INFO] [stdout] 70 | | if d == distance { [INFO] [stdout] 71 | | for neighbor in Cell::new(i as i32, j as i32).neighbors(SIZE) { [INFO] [stdout] 72 | | if let Distance::Unexplored = [INFO] [stdout] ... | [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Distance::Reachable(d) = distances[i][j] [INFO] [stdout] 70 ~ && d == distance { [INFO] [stdout] 71 | for neighbor in Cell::new(i as i32, j as i32).neighbors(SIZE) { [INFO] [stdout] ... [INFO] [stdout] 95 | } [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:411:9 [INFO] [stdout] | [INFO] [stdout] 411 | !self.winner().is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.winner().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: struct `Evaluation2` is never constructed [INFO] [stdout] --> src/evaluation/evaluation2.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Evaluation2; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/evaluation/evaluation2.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl Evaluation2 { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 23 | pub fn new() -> Evaluation2 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Color` which implements the `Copy` trait [INFO] [stdout] --> src/color.rs:49:18 [INFO] [stdout] | [INFO] [stdout] 49 | Some(self.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `values.get(0)` [INFO] [stdout] --> src/best_list.rs:105:20 [INFO] [stdout] | [INFO] [stdout] 105 | assert_eq!(values.get(0), Some(&10)); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:69:17 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Distance::Reachable(d) = distances[i][j] { [INFO] [stdout] 70 | | if d == distance { [INFO] [stdout] 71 | | for neighbor in Cell::new(i as i32, j as i32).neighbors(SIZE) { [INFO] [stdout] 72 | | if let Distance::Unexplored = [INFO] [stdout] ... | [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Distance::Reachable(d) = distances[i][j] [INFO] [stdout] 70 ~ && d == distance { [INFO] [stdout] 71 | for neighbor in Cell::new(i as i32, j as i32).neighbors(SIZE) { [INFO] [stdout] ... [INFO] [stdout] 95 | } [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:411:9 [INFO] [stdout] | [INFO] [stdout] 411 | !self.winner().is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.winner().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 `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | / if let Some(duration) = duration { [INFO] [stdout] 106 | | if duration.as_millis() < 100 { [INFO] [stdout] 107 | | return (self.evaluation.score(board), None); [INFO] [stdout] 108 | | } [INFO] [stdout] 109 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 105 ~ if let Some(duration) = duration [INFO] [stdout] 106 ~ && duration.as_millis() < 100 { [INFO] [stdout] 107 | return (self.evaluation.score(board), None); [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_2.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if let Some(duration) = duration { [INFO] [stdout] 141 | | if duration.as_millis() < 100 { [INFO] [stdout] 142 | | return (self.evaluation.score(board), None); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(duration) = duration [INFO] [stdout] 141 ~ && duration.as_millis() < 100 { [INFO] [stdout] 142 | return (self.evaluation.score(board), None); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Color` which implements the `Copy` trait [INFO] [stdout] --> src/color.rs:49:18 [INFO] [stdout] | [INFO] [stdout] 49 | Some(self.clone()) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_3.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | / if let Some(duration) = duration { [INFO] [stdout] 151 | | if duration.as_millis() < 100 { [INFO] [stdout] 152 | | return (self.evaluation.score(board), None); [INFO] [stdout] 153 | | } [INFO] [stdout] 154 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 150 ~ if let Some(duration) = duration [INFO] [stdout] 151 ~ && duration.as_millis() < 100 { [INFO] [stdout] 152 | return (self.evaluation.score(board), None); [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_4.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if let Some(duration) = duration { [INFO] [stdout] 141 | | if duration.as_millis() < 100 { [INFO] [stdout] 142 | | return (self.evaluation.score(board), None); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(duration) = duration [INFO] [stdout] 141 ~ && duration.as_millis() < 100 { [INFO] [stdout] 142 | return (self.evaluation.score(board), None); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/human.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / if parts.len() == 2 { [INFO] [stdout] 30 | | if let (Ok(num1), Ok(num2)) = (parts[0].parse::(), parts[1].parse::()) { [INFO] [stdout] 31 | | return Some((num1, num2)); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ if parts.len() == 2 [INFO] [stdout] 30 ~ && let (Ok(num1), Ok(num2)) = (parts[0].parse::(), parts[1].parse::()) { [INFO] [stdout] 31 | return Some((num1, num2)); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/mini_max.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(duration) = duration { [INFO] [stdout] 88 | | if duration.as_millis() < 100 { [INFO] [stdout] 89 | | return (self.evaluation.score(board), None); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(duration) = duration [INFO] [stdout] 88 ~ && duration.as_millis() < 100 { [INFO] [stdout] 89 | return (self.evaluation.score(board), None); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/distance.rs:142:25 [INFO] [stdout] | [INFO] [stdout] 142 | let distances = vec![ [INFO] [stdout] | _________________________^ [INFO] [stdout] 143 | | Distance::Reachable(1), [INFO] [stdout] 144 | | Distance::Unexplored, [INFO] [stdout] 145 | | Distance::Unreachable, [INFO] [stdout] 146 | | Distance::Reachable(0), [INFO] [stdout] 147 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 142 ~ let distances = [Distance::Reachable(1), [INFO] [stdout] 143 + Distance::Unexplored, [INFO] [stdout] 144 + Distance::Unreachable, [INFO] [stdout] 145 ~ Distance::Reachable(0)]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | / if let Some(duration) = duration { [INFO] [stdout] 106 | | if duration.as_millis() < 100 { [INFO] [stdout] 107 | | return (self.evaluation.score(board), None); [INFO] [stdout] 108 | | } [INFO] [stdout] 109 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 105 ~ if let Some(duration) = duration [INFO] [stdout] 106 ~ && duration.as_millis() < 100 { [INFO] [stdout] 107 | return (self.evaluation.score(board), None); [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_2.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if let Some(duration) = duration { [INFO] [stdout] 141 | | if duration.as_millis() < 100 { [INFO] [stdout] 142 | | return (self.evaluation.score(board), None); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(duration) = duration [INFO] [stdout] 141 ~ && duration.as_millis() < 100 { [INFO] [stdout] 142 | return (self.evaluation.score(board), None); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_3.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | / if let Some(duration) = duration { [INFO] [stdout] 151 | | if duration.as_millis() < 100 { [INFO] [stdout] 152 | | return (self.evaluation.score(board), None); [INFO] [stdout] 153 | | } [INFO] [stdout] 154 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 150 ~ if let Some(duration) = duration [INFO] [stdout] 151 ~ && duration.as_millis() < 100 { [INFO] [stdout] 152 | return (self.evaluation.score(board), None); [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/alpha_beta_4.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if let Some(duration) = duration { [INFO] [stdout] 141 | | if duration.as_millis() < 100 { [INFO] [stdout] 142 | | return (self.evaluation.score(board), None); [INFO] [stdout] 143 | | } [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(duration) = duration [INFO] [stdout] 141 ~ && duration.as_millis() < 100 { [INFO] [stdout] 142 | return (self.evaluation.score(board), None); [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/human.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / if parts.len() == 2 { [INFO] [stdout] 30 | | if let (Ok(num1), Ok(num2)) = (parts[0].parse::(), parts[1].parse::()) { [INFO] [stdout] 31 | | return Some((num1, num2)); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ if parts.len() == 2 [INFO] [stdout] 30 ~ && let (Ok(num1), Ok(num2)) = (parts[0].parse::(), parts[1].parse::()) { [INFO] [stdout] 31 | return Some((num1, num2)); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/strategy/mini_max.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(duration) = duration { [INFO] [stdout] 88 | | if duration.as_millis() < 100 { [INFO] [stdout] 89 | | return (self.evaluation.score(board), None); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(duration) = duration [INFO] [stdout] 88 ~ && duration.as_millis() < 100 { [INFO] [stdout] 89 | return (self.evaluation.score(board), None); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/distance.rs:142:25 [INFO] [stdout] | [INFO] [stdout] 142 | let distances = vec![ [INFO] [stdout] | _________________________^ [INFO] [stdout] 143 | | Distance::Reachable(1), [INFO] [stdout] 144 | | Distance::Unexplored, [INFO] [stdout] 145 | | Distance::Unreachable, [INFO] [stdout] 146 | | Distance::Reachable(0), [INFO] [stdout] 147 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 142 ~ let distances = [Distance::Reachable(1), [INFO] [stdout] 143 + Distance::Unexplored, [INFO] [stdout] 144 + Distance::Unreachable, [INFO] [stdout] 145 ~ Distance::Reachable(0)]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 18.54s [INFO] running `Command { std: "docker" "inspect" "7128b66a482ae297a61781073f10c06290cc9cadf0abedc35d78f832d59da292", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7128b66a482ae297a61781073f10c06290cc9cadf0abedc35d78f832d59da292", kill_on_drop: false }` [INFO] [stdout] 7128b66a482ae297a61781073f10c06290cc9cadf0abedc35d78f832d59da292