[INFO] cloning repository https://github.com/nexus-x86/gleam [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/nexus-x86/gleam" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnexus-x86%2Fgleam", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnexus-x86%2Fgleam'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] daf9d65b3e5fe146e920690dbcf4271946adefc9 [INFO] linting nexus-x86/gleam against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnexus-x86%2Fgleam" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/nexus-x86/gleam [INFO] finished tweaking git repo https://github.com/nexus-x86/gleam [INFO] tweaked toml for git repo https://github.com/nexus-x86/gleam written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/nexus-x86/gleam 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/nexus-x86/gleam 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cozy-chess-types v0.2.2 [INFO] [stderr] Downloaded cozy-chess v0.3.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] e123b5423d682a7e77bd4446e490679fc3381f809c3b9eea827afb4e9c91d9dd [INFO] running `Command { std: "docker" "start" "-a" "e123b5423d682a7e77bd4446e490679fc3381f809c3b9eea827afb4e9c91d9dd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e123b5423d682a7e77bd4446e490679fc3381f809c3b9eea827afb4e9c91d9dd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e123b5423d682a7e77bd4446e490679fc3381f809c3b9eea827afb4e9c91d9dd", kill_on_drop: false }` [INFO] [stdout] e123b5423d682a7e77bd4446e490679fc3381f809c3b9eea827afb4e9c91d9dd [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] eb363bf27e969ab419822d7854734c60c71fe242b8a701e01c232b886c8575e3 [INFO] running `Command { std: "docker" "start" "-a" "eb363bf27e969ab419822d7854734c60c71fe242b8a701e01c232b886c8575e3", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Compiling cozy-chess-types v0.2.2 [INFO] [stderr] Compiling cozy-chess v0.3.4 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking gleam v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: type `psqt` should have an upper camel case name [INFO] [stdout] --> src/eval.rs:9:6 [INFO] [stdout] | [INFO] [stdout] 9 | type psqt = [EvalInt;64]; [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Psqt` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/search.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `psqt` should have an upper camel case name [INFO] [stdout] --> src/eval.rs:9:6 [INFO] [stdout] | [INFO] [stdout] 9 | type psqt = [EvalInt;64]; [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Psqt` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/search.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `abs_score` is never read [INFO] [stdout] --> src/search.rs:178:29 [INFO] [stdout] | [INFO] [stdout] 178 | let mut abs_score = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `magicConstant` is never used [INFO] [stdout] --> src/main.rs:21:7 [INFO] [stdout] | [INFO] [stdout] 21 | const magicConstant : usize = (1 << 20) / 12; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `magicConstant` is never used [INFO] [stdout] --> src/search.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | const magicConstant : usize = (1 << 20) / 12; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/eval.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | return file as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return file as usize; [INFO] [stdout] 146 + file as usize [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/eval.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | return rank as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 150 - return rank as usize; [INFO] [stdout] 150 + rank as usize [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/eval.rs:179:5 [INFO] [stdout] | [INFO] [stdout] 179 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 179 - return 0; [INFO] [stdout] 179 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `abs_score` is never read [INFO] [stdout] --> src/search.rs:178:29 [INFO] [stdout] | [INFO] [stdout] 178 | let mut abs_score = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/eval.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | return score; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 213 - return score; [INFO] [stdout] 213 + score [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/eval.rs:211:20 [INFO] [stdout] | [INFO] [stdout] 211 | return score * -1; [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-score` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `magicConstant` is never used [INFO] [stdout] --> src/main.rs:21:7 [INFO] [stdout] | [INFO] [stdout] 21 | const magicConstant : usize = (1 << 20) / 12; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `magicConstant` is never used [INFO] [stdout] --> src/search.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | const magicConstant : usize = (1 << 20) / 12; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/search.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / if let Some((e_hash, entry)) = self.data[idx] { [INFO] [stdout] 58 | | if e_hash == hash { [INFO] [stdout] 59 | | return Some(entry); [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [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] 57 ~ if let Some((e_hash, entry)) = self.data[idx] [INFO] [stdout] 58 ~ && e_hash == hash { [INFO] [stdout] 59 | return Some(entry); [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/search.rs:126:8 [INFO] [stdout] | [INFO] [stdout] 126 | if !best_mv.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `best_mv.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: called `unwrap` on `best_mv` after checking its variant with `is_none` [INFO] [stdout] --> src/search.rs:130:28 [INFO] [stdout] | [INFO] [stdout] 126 | if !best_mv.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 130 | best_move: best_mv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/search.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | return best_value; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 139 - return best_value; [INFO] [stdout] 139 + best_value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/search.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | / if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] 87 | | if entry.depth as usize >= 0 { [INFO] [stdout] 88 | | return entry.eval; [INFO] [stdout] 89 | | } [INFO] [stdout] 90 | | } [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] 86 ~ if let Some(entry) = transpositionTable.probe(&board) [INFO] [stdout] 87 ~ && entry.depth as usize >= 0 { [INFO] [stdout] 88 | return entry.eval; [INFO] [stdout] 89 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/search.rs:86:51 [INFO] [stdout] | [INFO] [stdout] 86 | if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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: unneeded `return` statement [INFO] [stdout] --> src/eval.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | return file as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return file as usize; [INFO] [stdout] 146 + file as usize [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/eval.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | return rank as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 150 - return rank as usize; [INFO] [stdout] 150 + rank as usize [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/eval.rs:179:5 [INFO] [stdout] | [INFO] [stdout] 179 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 179 - return 0; [INFO] [stdout] 179 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/eval.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | return score; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 213 - return score; [INFO] [stdout] 213 + score [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PieceMoves` which implements the `Copy` trait [INFO] [stdout] --> src/search.rs:102:29 [INFO] [stdout] | [INFO] [stdout] 102 | let mut captures2 = moves.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `moves` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/search.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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 boolean expression can be simplified [INFO] [stdout] --> src/search.rs:194:8 [INFO] [stdout] | [INFO] [stdout] 194 | if !best_mv.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `best_mv.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: called `unwrap` on `best_mv` after checking its variant with `is_none` [INFO] [stdout] --> src/search.rs:198:28 [INFO] [stdout] | [INFO] [stdout] 194 | if !best_mv.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 198 | best_move: best_mv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/search.rs:207:5 [INFO] [stdout] | [INFO] [stdout] 207 | return abs_best; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 207 - return abs_best; [INFO] [stdout] 207 + abs_best [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/eval.rs:211:20 [INFO] [stdout] | [INFO] [stdout] 211 | return score * -1; [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-score` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/search.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | / if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] 151 | | if entry.depth as usize >= depth { [INFO] [stdout] 152 | | return entry.eval; [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(entry) = transpositionTable.probe(&board) [INFO] [stdout] 151 ~ && entry.depth as usize >= depth { [INFO] [stdout] 152 | return entry.eval; [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/search.rs:150:51 [INFO] [stdout] | [INFO] [stdout] 150 | if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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] --> src/search.rs:196:13 [INFO] [stdout] | [INFO] [stdout] 196 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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: unneeded `return` statement [INFO] [stdout] --> src/search.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | return best_mv; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 253 - return best_mv; [INFO] [stdout] 253 + best_mv [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/search.rs:224:5 [INFO] [stdout] | [INFO] [stdout] 224 | / if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] 225 | | if entry.depth as usize >= DEPTH { [INFO] [stdout] 226 | | return Some(entry.best_move); [INFO] [stdout] 227 | | } [INFO] [stdout] 228 | | } [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] 224 ~ if let Some(entry) = transpositionTable.probe(&board) [INFO] [stdout] 225 ~ && entry.depth as usize >= DEPTH { [INFO] [stdout] 226 | return Some(entry.best_move); [INFO] [stdout] 227 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/search.rs:224:51 [INFO] [stdout] | [INFO] [stdout] 224 | if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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] --> src/search.rs:245:9 [INFO] [stdout] | [INFO] [stdout] 245 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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: unneeded `return` statement [INFO] [stdout] --> src/search.rs:258:5 [INFO] [stdout] | [INFO] [stdout] 258 | return search(board, transpositionTable).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 258 - return search(board, transpositionTable).unwrap(); [INFO] [stdout] 258 + search(board, transpositionTable).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/search.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / if let Some((e_hash, entry)) = self.data[idx] { [INFO] [stdout] 58 | | if e_hash == hash { [INFO] [stdout] 59 | | return Some(entry); [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [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] 57 ~ if let Some((e_hash, entry)) = self.data[idx] [INFO] [stdout] 58 ~ && e_hash == hash { [INFO] [stdout] 59 | return Some(entry); [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/search.rs:126:8 [INFO] [stdout] | [INFO] [stdout] 126 | if !best_mv.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `best_mv.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: called `unwrap` on `best_mv` after checking its variant with `is_none` [INFO] [stdout] --> src/search.rs:130:28 [INFO] [stdout] | [INFO] [stdout] 126 | if !best_mv.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 130 | best_move: best_mv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/search.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | return best_value; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 139 - return best_value; [INFO] [stdout] 139 + best_value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/search.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | / if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] 87 | | if entry.depth as usize >= 0 { [INFO] [stdout] 88 | | return entry.eval; [INFO] [stdout] 89 | | } [INFO] [stdout] 90 | | } [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] 86 ~ if let Some(entry) = transpositionTable.probe(&board) [INFO] [stdout] 87 ~ && entry.depth as usize >= 0 { [INFO] [stdout] 88 | return entry.eval; [INFO] [stdout] 89 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/search.rs:86:51 [INFO] [stdout] | [INFO] [stdout] 86 | if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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] --> src/main.rs:107:34 [INFO] [stdout] | [INFO] [stdout] 107 | let thing = display_uci_move(&board,chosen); [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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: constant `magicConstant` should have an upper case name [INFO] [stdout] --> src/main.rs:21:7 [INFO] [stdout] | [INFO] [stdout] 21 | const magicConstant : usize = (1 << 20) / 12; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper case: `MAGIC_CONSTANT` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/main.rs:95:74 [INFO] [stdout] | [INFO] [stdout] 95 | fn cmd_go(mut _tokens: std::str::SplitWhitespace<'_>, board: &mut Board, transpositionTable: &mut search::HashTable) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/main.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | let mut transpositionTable = search::HashTable::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `pawn_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | const pawn_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 12 - const pawn_pst : psqt = [ [INFO] [stdout] 12 + const PAWN_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_pawn_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:24:7 [INFO] [stdout] | [INFO] [stdout] 24 | const eg_pawn_pst: psqt = [ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 24 - const eg_pawn_pst: psqt = [ [INFO] [stdout] 24 + const EG_PAWN_PST: psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `knight_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:35:7 [INFO] [stdout] | [INFO] [stdout] 35 | const knight_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 35 - const knight_pst : psqt = [ [INFO] [stdout] 35 + const KNIGHT_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_knight_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:46:7 [INFO] [stdout] | [INFO] [stdout] 46 | const eg_knight_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 46 - const eg_knight_pst : psqt = [ [INFO] [stdout] 46 + const EG_KNIGHT_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `bishop_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:57:7 [INFO] [stdout] | [INFO] [stdout] 57 | const bishop_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 57 - const bishop_pst : psqt = [ [INFO] [stdout] 57 + const BISHOP_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_bishop_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:68:7 [INFO] [stdout] | [INFO] [stdout] 68 | const eg_bishop_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 68 - const eg_bishop_pst : psqt = [ [INFO] [stdout] 68 + const EG_BISHOP_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `rook_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:79:7 [INFO] [stdout] | [INFO] [stdout] 79 | const rook_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 79 - const rook_pst : psqt = [ [INFO] [stdout] 79 + const ROOK_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_rook_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:90:7 [INFO] [stdout] | [INFO] [stdout] 90 | const eg_rook_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 90 - const eg_rook_pst : psqt = [ [INFO] [stdout] 90 + const EG_ROOK_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `queen_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:101:7 [INFO] [stdout] | [INFO] [stdout] 101 | const queen_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 101 - const queen_pst : psqt = [ [INFO] [stdout] 101 + const QUEEN_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_queen_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:112:7 [INFO] [stdout] | [INFO] [stdout] 112 | const eg_queen_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 112 - const eg_queen_pst : psqt = [ [INFO] [stdout] 112 + const EG_QUEEN_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `king_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:123:7 [INFO] [stdout] | [INFO] [stdout] 123 | const king_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 123 - const king_pst : psqt = [ [INFO] [stdout] 123 + const KING_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_king_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:134:7 [INFO] [stdout] | [INFO] [stdout] 134 | const eg_king_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 134 - const eg_king_pst : psqt = [ [INFO] [stdout] 134 + const EG_KING_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convertFile` should have a snake case name [INFO] [stdout] --> src/eval.rs:145:4 [INFO] [stdout] | [INFO] [stdout] 145 | fn convertFile(file: File) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `convert_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convertRank` should have a snake case name [INFO] [stdout] --> src/eval.rs:149:4 [INFO] [stdout] | [INFO] [stdout] 149 | fn convertRank(rank: Rank) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `convert_rank` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `blackIndex` should have a snake case name [INFO] [stdout] --> src/eval.rs:204:21 [INFO] [stdout] | [INFO] [stdout] 204 | let blackIndex = (7 - convertFile(square.file())) * 8 + (7 - convertRank(square.rank())); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `black_index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `magicConstant` should have an upper case name [INFO] [stdout] --> src/search.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | const magicConstant : usize = (1 << 20) / 12; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper case: `MAGIC_CONSTANT` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/search.rs:73:78 [INFO] [stdout] | [INFO] [stdout] 73 | fn quiesce(board: &mut Board, alpha: Option, beta: Option, transpositionTable: &mut HashTable) -> EvalInt { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/search.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | if entry.depth as usize >= 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/search.rs:144:91 [INFO] [stdout] | [INFO] [stdout] 144 | ...eta: Option, transpositionTable: &mut HashTable) -> EvalInt { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/search.rs:213:30 [INFO] [stdout] | [INFO] [stdout] 213 | fn search(board: &mut Board, transpositionTable: &mut HashTable) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/search.rs:257:37 [INFO] [stdout] | [INFO] [stdout] 257 | pub fn best_move(board: &mut Board, transpositionTable: &mut HashTable) -> Move { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PieceMoves` which implements the `Copy` trait [INFO] [stdout] --> src/search.rs:102:29 [INFO] [stdout] | [INFO] [stdout] 102 | let mut captures2 = moves.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `moves` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/search.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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 boolean expression can be simplified [INFO] [stdout] --> src/search.rs:194:8 [INFO] [stdout] | [INFO] [stdout] 194 | if !best_mv.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `best_mv.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: called `unwrap` on `best_mv` after checking its variant with `is_none` [INFO] [stdout] --> src/search.rs:198:28 [INFO] [stdout] | [INFO] [stdout] 194 | if !best_mv.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 198 | best_move: best_mv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/search.rs:207:5 [INFO] [stdout] | [INFO] [stdout] 207 | return abs_best; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 207 - return abs_best; [INFO] [stdout] 207 + abs_best [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/search.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | / if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] 151 | | if entry.depth as usize >= depth { [INFO] [stdout] 152 | | return entry.eval; [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(entry) = transpositionTable.probe(&board) [INFO] [stdout] 151 ~ && entry.depth as usize >= depth { [INFO] [stdout] 152 | return entry.eval; [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/search.rs:150:51 [INFO] [stdout] | [INFO] [stdout] 150 | if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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] --> src/search.rs:196:13 [INFO] [stdout] | [INFO] [stdout] 196 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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: unneeded `return` statement [INFO] [stdout] --> src/search.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | return best_mv; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 253 - return best_mv; [INFO] [stdout] 253 + best_mv [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/search.rs:224:5 [INFO] [stdout] | [INFO] [stdout] 224 | / if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] 225 | | if entry.depth as usize >= DEPTH { [INFO] [stdout] 226 | | return Some(entry.best_move); [INFO] [stdout] 227 | | } [INFO] [stdout] 228 | | } [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] 224 ~ if let Some(entry) = transpositionTable.probe(&board) [INFO] [stdout] 225 ~ && entry.depth as usize >= DEPTH { [INFO] [stdout] 226 | return Some(entry.best_move); [INFO] [stdout] 227 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/search.rs:224:51 [INFO] [stdout] | [INFO] [stdout] 224 | if let Some(entry) = transpositionTable.probe(&board) { [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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] --> src/search.rs:245:9 [INFO] [stdout] | [INFO] [stdout] 245 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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: unneeded `return` statement [INFO] [stdout] --> src/search.rs:258:5 [INFO] [stdout] | [INFO] [stdout] 258 | return search(board, transpositionTable).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 258 - return search(board, transpositionTable).unwrap(); [INFO] [stdout] 258 + search(board, transpositionTable).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:107:34 [INFO] [stdout] | [INFO] [stdout] 107 | let thing = display_uci_move(&board,chosen); [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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: constant `magicConstant` should have an upper case name [INFO] [stdout] --> src/main.rs:21:7 [INFO] [stdout] | [INFO] [stdout] 21 | const magicConstant : usize = (1 << 20) / 12; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper case: `MAGIC_CONSTANT` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/main.rs:95:74 [INFO] [stdout] | [INFO] [stdout] 95 | fn cmd_go(mut _tokens: std::str::SplitWhitespace<'_>, board: &mut Board, transpositionTable: &mut search::HashTable) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/main.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | let mut transpositionTable = search::HashTable::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `pawn_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | const pawn_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 12 - const pawn_pst : psqt = [ [INFO] [stdout] 12 + const PAWN_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_pawn_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:24:7 [INFO] [stdout] | [INFO] [stdout] 24 | const eg_pawn_pst: psqt = [ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 24 - const eg_pawn_pst: psqt = [ [INFO] [stdout] 24 + const EG_PAWN_PST: psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `knight_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:35:7 [INFO] [stdout] | [INFO] [stdout] 35 | const knight_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 35 - const knight_pst : psqt = [ [INFO] [stdout] 35 + const KNIGHT_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_knight_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:46:7 [INFO] [stdout] | [INFO] [stdout] 46 | const eg_knight_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 46 - const eg_knight_pst : psqt = [ [INFO] [stdout] 46 + const EG_KNIGHT_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `bishop_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:57:7 [INFO] [stdout] | [INFO] [stdout] 57 | const bishop_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 57 - const bishop_pst : psqt = [ [INFO] [stdout] 57 + const BISHOP_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_bishop_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:68:7 [INFO] [stdout] | [INFO] [stdout] 68 | const eg_bishop_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 68 - const eg_bishop_pst : psqt = [ [INFO] [stdout] 68 + const EG_BISHOP_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `rook_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:79:7 [INFO] [stdout] | [INFO] [stdout] 79 | const rook_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 79 - const rook_pst : psqt = [ [INFO] [stdout] 79 + const ROOK_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_rook_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:90:7 [INFO] [stdout] | [INFO] [stdout] 90 | const eg_rook_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 90 - const eg_rook_pst : psqt = [ [INFO] [stdout] 90 + const EG_ROOK_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `queen_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:101:7 [INFO] [stdout] | [INFO] [stdout] 101 | const queen_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 101 - const queen_pst : psqt = [ [INFO] [stdout] 101 + const QUEEN_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_queen_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:112:7 [INFO] [stdout] | [INFO] [stdout] 112 | const eg_queen_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 112 - const eg_queen_pst : psqt = [ [INFO] [stdout] 112 + const EG_QUEEN_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `king_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:123:7 [INFO] [stdout] | [INFO] [stdout] 123 | const king_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 123 - const king_pst : psqt = [ [INFO] [stdout] 123 + const KING_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `eg_king_pst` should have an upper case name [INFO] [stdout] --> src/eval.rs:134:7 [INFO] [stdout] | [INFO] [stdout] 134 | const eg_king_pst : psqt = [ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 134 - const eg_king_pst : psqt = [ [INFO] [stdout] 134 + const EG_KING_PST : psqt = [ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convertFile` should have a snake case name [INFO] [stdout] --> src/eval.rs:145:4 [INFO] [stdout] | [INFO] [stdout] 145 | fn convertFile(file: File) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `convert_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convertRank` should have a snake case name [INFO] [stdout] --> src/eval.rs:149:4 [INFO] [stdout] | [INFO] [stdout] 149 | fn convertRank(rank: Rank) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `convert_rank` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `blackIndex` should have a snake case name [INFO] [stdout] --> src/eval.rs:204:21 [INFO] [stdout] | [INFO] [stdout] 204 | let blackIndex = (7 - convertFile(square.file())) * 8 + (7 - convertRank(square.rank())); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `black_index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `magicConstant` should have an upper case name [INFO] [stdout] --> src/search.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | const magicConstant : usize = (1 << 20) / 12; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper case: `MAGIC_CONSTANT` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/search.rs:73:78 [INFO] [stdout] | [INFO] [stdout] 73 | fn quiesce(board: &mut Board, alpha: Option, beta: Option, transpositionTable: &mut HashTable) -> EvalInt { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/search.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | if entry.depth as usize >= 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/search.rs:144:91 [INFO] [stdout] | [INFO] [stdout] 144 | ...eta: Option, transpositionTable: &mut HashTable) -> EvalInt { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/search.rs:213:30 [INFO] [stdout] | [INFO] [stdout] 213 | fn search(board: &mut Board, transpositionTable: &mut HashTable) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `transpositionTable` should have a snake case name [INFO] [stdout] --> src/search.rs:257:37 [INFO] [stdout] | [INFO] [stdout] 257 | pub fn best_move(board: &mut Board, transpositionTable: &mut HashTable) -> Move { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `transposition_table` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.95s [INFO] running `Command { std: "docker" "inspect" "eb363bf27e969ab419822d7854734c60c71fe242b8a701e01c232b886c8575e3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "eb363bf27e969ab419822d7854734c60c71fe242b8a701e01c232b886c8575e3", kill_on_drop: false }` [INFO] [stdout] eb363bf27e969ab419822d7854734c60c71fe242b8a701e01c232b886c8575e3