[INFO] cloning repository https://github.com/aryavsaigal/dragonclash [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/aryavsaigal/dragonclash" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Faryavsaigal%2Fdragonclash", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Faryavsaigal%2Fdragonclash'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0faa19b8e75df0dc418e0d827dfb0e5e9eda6764 [INFO] linting aryavsaigal/dragonclash against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Faryavsaigal%2Fdragonclash" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/aryavsaigal/dragonclash [INFO] finished tweaking git repo https://github.com/aryavsaigal/dragonclash [INFO] tweaked toml for git repo https://github.com/aryavsaigal/dragonclash written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/aryavsaigal/dragonclash 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/aryavsaigal/dragonclash 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 133d49a9ad3063f917fd7f0214436da6cb82faecc07643141606f19f7e43ff64 [INFO] running `Command { std: "docker" "start" "-a" "133d49a9ad3063f917fd7f0214436da6cb82faecc07643141606f19f7e43ff64", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "133d49a9ad3063f917fd7f0214436da6cb82faecc07643141606f19f7e43ff64", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "133d49a9ad3063f917fd7f0214436da6cb82faecc07643141606f19f7e43ff64", kill_on_drop: false }` [INFO] [stdout] 133d49a9ad3063f917fd7f0214436da6cb82faecc07643141606f19f7e43ff64 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 24b56196be5de7ca71270d72db6cde59342f6d6fa88d26ba6860a73bd14ce01d [INFO] running `Command { std: "docker" "start" "-a" "24b56196be5de7ca71270d72db6cde59342f6d6fa88d26ba6860a73bd14ce01d", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Checking getrandom v0.3.3 [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 dragonclash v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:352:33 [INFO] [stdout] | [INFO] [stdout] 352 | let possible_move = rook << 8 * c; [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `rook << (8 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:365:33 [INFO] [stdout] | [INFO] [stdout] 365 | let possible_move = rook >> 8 * c; [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `rook >> (8 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:411:33 [INFO] [stdout] | [INFO] [stdout] 411 | let possible_move = bishop << 9 * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `bishop << (9 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:424:33 [INFO] [stdout] | [INFO] [stdout] 424 | let possible_move = bishop >> 9 * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `bishop >> (9 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:437:33 [INFO] [stdout] | [INFO] [stdout] 437 | let possible_move = bishop << 7 * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `bishop << (7 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:450:33 [INFO] [stdout] | [INFO] [stdout] 450 | let possible_move = bishop >> 7 * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `bishop >> (7 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `time::Duration` [INFO] [stdout] --> src/engine.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{i32, time::Duration}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/engine.rs:297:12 [INFO] [stdout] | [INFO] [stdout] 297 | if depth >= R+1 && !board.is_check(board.turn) && !Engine::endgame(board.bitboards) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change it to: `depth > R` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:352:33 [INFO] [stdout] | [INFO] [stdout] 352 | let possible_move = rook << 8 * c; [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `rook << (8 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:365:33 [INFO] [stdout] | [INFO] [stdout] 365 | let possible_move = rook >> 8 * c; [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `rook >> (8 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:411:33 [INFO] [stdout] | [INFO] [stdout] 411 | let possible_move = bishop << 9 * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `bishop << (9 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:424:33 [INFO] [stdout] | [INFO] [stdout] 424 | let possible_move = bishop >> 9 * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `bishop >> (9 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:437:33 [INFO] [stdout] | [INFO] [stdout] 437 | let possible_move = bishop << 7 * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `bishop << (7 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/board.rs:450:33 [INFO] [stdout] | [INFO] [stdout] 450 | let possible_move = bishop >> 7 * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `bishop >> (7 * c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `time::Duration` [INFO] [stdout] --> src/engine.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{i32, time::Duration}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/engine.rs:297:12 [INFO] [stdout] | [INFO] [stdout] 297 | if depth >= R+1 && !board.is_check(board.turn) && !Engine::endgame(board.bitboards) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change it to: `depth > R` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BufRead` [INFO] [stdout] --> src/main.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | use std::io::{self, BufRead}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BufRead` [INFO] [stdout] --> src/main.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | use std::io::{self, BufRead}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `redo` is assigned to, but never used [INFO] [stdout] --> src/engine.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | let mut redo = 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_redo` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `redo` is never read [INFO] [stdout] --> src/engine.rs:108:21 [INFO] [stdout] | [INFO] [stdout] 108 | redo += 1; [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: value assigned to `redo` is never read [INFO] [stdout] --> src/engine.rs:102:21 [INFO] [stdout] | [INFO] [stdout] 102 | redo += 1; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `redo` is assigned to, but never used [INFO] [stdout] --> src/engine.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | let mut redo = 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_redo` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `redo` is never read [INFO] [stdout] --> src/engine.rs:108:21 [INFO] [stdout] | [INFO] [stdout] 108 | redo += 1; [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: value assigned to `redo` is never read [INFO] [stdout] --> src/engine.rs:102:21 [INFO] [stdout] | [INFO] [stdout] 102 | redo += 1; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ranks` is never used [INFO] [stdout] --> src/board.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn ranks>(c: I) -> Bitboard { [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 items `move_history_to_algebraic`, `empty`, `display_from_bitboards`, `display_bitboard`, and `find_bitboard` are never used [INFO] [stdout] --> src/board.rs:620:12 [INFO] [stdout] | [INFO] [stdout] 56 | impl Board { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 620 | pub fn move_history_to_algebraic(&self) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 819 | pub fn empty(&self) -> Bitboard { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1088 | pub fn display_from_bitboards(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1122 | pub fn display_bitboard(bitboard: Bitboard) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1150 | pub fn find_bitboard(&self, bit_position: usize, colour: Colour) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_piece` is never used [INFO] [stdout] --> src/board.rs:1640:4 [INFO] [stdout] | [INFO] [stdout] 1640 | fn map_piece(colour: Colour, piece: Pieces) -> char { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_num` is never used [INFO] [stdout] --> src/board.rs:1733:12 [INFO] [stdout] | [INFO] [stdout] 1732 | impl Pieces { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 1733 | pub fn from_num(num: usize) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_num` is never used [INFO] [stdout] --> src/board.rs:1765:8 [INFO] [stdout] | [INFO] [stdout] 1764 | impl Colour { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 1765 | fn from_num(num: usize) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Draw` is never constructed [INFO] [stdout] --> src/board.rs:1889:5 [INFO] [stdout] | [INFO] [stdout] 1886 | pub enum State { [INFO] [stdout] | ----- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 1889 | Draw, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `State` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `is_repetition` and `score` are never used [INFO] [stdout] --> src/engine.rs:244:8 [INFO] [stdout] | [INFO] [stdout] 27 | impl Engine { [INFO] [stdout] | ----------- associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 244 | fn is_repetition(board: &mut Board,) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 470 | fn score(piece: Pieces) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `bitboards_copy` [INFO] [stdout] --> src/board.rs:148:18 [INFO] [stdout] | [INFO] [stdout] 148 | for i in 0..bitboards_copy.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 148 - for i in 0..bitboards_copy.len() { [INFO] [stdout] 148 + for (i, ) in bitboards_copy.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ranks` is never used [INFO] [stdout] --> src/board.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn ranks>(c: I) -> Bitboard { [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 items `move_history_to_algebraic`, `empty`, `display_from_bitboards`, `display_bitboard`, and `find_bitboard` are never used [INFO] [stdout] --> src/board.rs:620:12 [INFO] [stdout] | [INFO] [stdout] 56 | impl Board { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 620 | pub fn move_history_to_algebraic(&self) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 819 | pub fn empty(&self) -> Bitboard { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1088 | pub fn display_from_bitboards(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1122 | pub fn display_bitboard(bitboard: Bitboard) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1150 | pub fn find_bitboard(&self, bit_position: usize, colour: Colour) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_piece` is never used [INFO] [stdout] --> src/board.rs:1640:4 [INFO] [stdout] | [INFO] [stdout] 1640 | fn map_piece(colour: Colour, piece: Pieces) -> char { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_num` is never used [INFO] [stdout] --> src/board.rs:1733:12 [INFO] [stdout] | [INFO] [stdout] 1732 | impl Pieces { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 1733 | pub fn from_num(num: usize) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_num` is never used [INFO] [stdout] --> src/board.rs:1765:8 [INFO] [stdout] | [INFO] [stdout] 1764 | impl Colour { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 1765 | fn from_num(num: usize) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Draw` is never constructed [INFO] [stdout] --> src/board.rs:1889:5 [INFO] [stdout] | [INFO] [stdout] 1886 | pub enum State { [INFO] [stdout] | ----- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 1889 | Draw, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `State` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `is_repetition` and `score` are never used [INFO] [stdout] --> src/engine.rs:244:8 [INFO] [stdout] | [INFO] [stdout] 27 | impl Engine { [INFO] [stdout] | ----------- associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 244 | fn is_repetition(board: &mut Board,) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 470 | fn score(piece: Pieces) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/board.rs:526:24 [INFO] [stdout] | [INFO] [stdout] 526 | ttable: Option<&Box<[TTEntry]>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `&[TTEntry]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `bitboards_copy` [INFO] [stdout] --> src/board.rs:148:18 [INFO] [stdout] | [INFO] [stdout] 148 | for i in 0..bitboards_copy.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 148 - for i in 0..bitboards_copy.len() { [INFO] [stdout] 148 + for (i, ) in bitboards_copy.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:552:21 [INFO] [stdout] | [INFO] [stdout] 552 | / if entry.valid { [INFO] [stdout] 553 | | if entry.hash == self.hash && entry.best_move == Some(*m) { [INFO] [stdout] 554 | | m.score += 20000; [INFO] [stdout] 555 | | } [INFO] [stdout] 556 | | } [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] 552 ~ if entry.valid [INFO] [stdout] 553 ~ && entry.hash == self.hash && entry.best_move == Some(*m) { [INFO] [stdout] 554 | m.score += 20000; [INFO] [stdout] 555 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/board.rs:912:35 [INFO] [stdout] | [INFO] [stdout] 912 | } else if c.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/board.rs:526:24 [INFO] [stdout] | [INFO] [stdout] 526 | ttable: Option<&Box<[TTEntry]>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `&[TTEntry]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/board.rs:1041:12 [INFO] [stdout] | [INFO] [stdout] 1041 | if (file % 2 == 0) ^ (rank % 2 == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `file.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/board.rs:1041:30 [INFO] [stdout] | [INFO] [stdout] 1041 | if (file % 2 == 0) ^ (rank % 2 == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `rank.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:552:21 [INFO] [stdout] | [INFO] [stdout] 552 | / if entry.valid { [INFO] [stdout] 553 | | if entry.hash == self.hash && entry.best_move == Some(*m) { [INFO] [stdout] 554 | | m.score += 20000; [INFO] [stdout] 555 | | } [INFO] [stdout] 556 | | } [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] 552 ~ if entry.valid [INFO] [stdout] 553 ~ && entry.hash == self.hash && entry.best_move == Some(*m) { [INFO] [stdout] 554 | m.score += 20000; [INFO] [stdout] 555 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:1070:17 [INFO] [stdout] | [INFO] [stdout] 1070 | / if let Some((c, Pieces::King)) = self.pieces[Board::get_bit_position(rank, file)] { [INFO] [stdout] 1071 | | if self.is_check(c) { [INFO] [stdout] 1072 | | highlight = "\x1b[48;2;180;30;30m"; [INFO] [stdout] 1073 | | } [INFO] [stdout] 1074 | | } [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] 1070 ~ if let Some((c, Pieces::King)) = self.pieces[Board::get_bit_position(rank, file)] [INFO] [stdout] 1071 ~ && self.is_check(c) { [INFO] [stdout] 1072 | highlight = "\x1b[48;2;180;30;30m"; [INFO] [stdout] 1073 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:1197:9 [INFO] [stdout] | [INFO] [stdout] 1197 | / if validate { [INFO] [stdout] 1198 | | if !self.get_legal_moves(m.piece.0, None, false).contains(&m) { [INFO] [stdout] 1199 | | return Err("Invalid move".to_string()); [INFO] [stdout] 1200 | | }; [INFO] [stdout] 1201 | | } [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] 1197 ~ if validate [INFO] [stdout] 1198 ~ && !self.get_legal_moves(m.piece.0, None, false).contains(&m) { [INFO] [stdout] 1199 | return Err("Invalid move".to_string()); [INFO] [stdout] 1200 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/board.rs:912:35 [INFO] [stdout] | [INFO] [stdout] 912 | } else if c.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/board.rs:1041:12 [INFO] [stdout] | [INFO] [stdout] 1041 | if (file % 2 == 0) ^ (rank % 2 == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `file.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/board.rs:1041:30 [INFO] [stdout] | [INFO] [stdout] 1041 | if (file % 2 == 0) ^ (rank % 2 == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `rank.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:1070:17 [INFO] [stdout] | [INFO] [stdout] 1070 | / if let Some((c, Pieces::King)) = self.pieces[Board::get_bit_position(rank, file)] { [INFO] [stdout] 1071 | | if self.is_check(c) { [INFO] [stdout] 1072 | | highlight = "\x1b[48;2;180;30;30m"; [INFO] [stdout] 1073 | | } [INFO] [stdout] 1074 | | } [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] 1070 ~ if let Some((c, Pieces::King)) = self.pieces[Board::get_bit_position(rank, file)] [INFO] [stdout] 1071 ~ && self.is_check(c) { [INFO] [stdout] 1072 | highlight = "\x1b[48;2;180;30;30m"; [INFO] [stdout] 1073 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:1588:9 [INFO] [stdout] | [INFO] [stdout] 1588 | / if !self.turn == Colour::Black { [INFO] [stdout] 1589 | | if self.full_moves > 0 { [INFO] [stdout] 1590 | | self.full_moves -= 1 [INFO] [stdout] 1591 | | }; [INFO] [stdout] 1592 | | } [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] 1588 ~ if !self.turn == Colour::Black [INFO] [stdout] 1589 ~ && self.full_moves > 0 { [INFO] [stdout] 1590 | self.full_moves -= 1 [INFO] [stdout] 1591 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:1613:13 [INFO] [stdout] | [INFO] [stdout] 1613 | return State::Checkmate(Colour::White); [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] 1613 - return State::Checkmate(Colour::White); [INFO] [stdout] 1613 + State::Checkmate(Colour::White) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:1615:13 [INFO] [stdout] | [INFO] [stdout] 1615 | return State::Checkmate(Colour::Black); [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] 1615 - return State::Checkmate(Colour::Black); [INFO] [stdout] 1615 + State::Checkmate(Colour::Black) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:1617:13 [INFO] [stdout] | [INFO] [stdout] 1617 | return State::Stalemate; [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] 1617 - return State::Stalemate; [INFO] [stdout] 1617 + State::Stalemate [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:1607:9 [INFO] [stdout] | [INFO] [stdout] 1607 | / if validate_no_moves { [INFO] [stdout] 1608 | | if self.get_legal_moves(self.turn, None, false).len() != 0 { [INFO] [stdout] 1609 | | return State::Continue; [INFO] [stdout] 1610 | | } [INFO] [stdout] 1611 | | } [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] 1607 ~ if validate_no_moves [INFO] [stdout] 1608 ~ && self.get_legal_moves(self.turn, None, false).len() != 0 { [INFO] [stdout] 1609 | return State::Continue; [INFO] [stdout] 1610 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/board.rs:1608:16 [INFO] [stdout] | [INFO] [stdout] 1608 | if self.get_legal_moves(self.turn, None, false).len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_legal_moves(self.turn, None, false).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:1197:9 [INFO] [stdout] | [INFO] [stdout] 1197 | / if validate { [INFO] [stdout] 1198 | | if !self.get_legal_moves(m.piece.0, None, false).contains(&m) { [INFO] [stdout] 1199 | | return Err("Invalid move".to_string()); [INFO] [stdout] 1200 | | }; [INFO] [stdout] 1201 | | } [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] 1197 ~ if validate [INFO] [stdout] 1198 ~ && !self.get_legal_moves(m.piece.0, None, false).contains(&m) { [INFO] [stdout] 1199 | return Err("Invalid move".to_string()); [INFO] [stdout] 1200 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/engine.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{i32, time::Duration}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/engine.rs:143:16 [INFO] [stdout] | [INFO] [stdout] 143 | ... if !best_move.is_none() { println!("info depth {} score {} nodes {} nps {} time {} pv {}", max_depth, format!("{} {}", s, e),... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `best_move.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_move` after checking its variant with `is_none` [INFO] [stdout] --> src/engine.rs:143:285 [INFO] [stdout] | [INFO] [stdout] 143 | ...f !best_move.is_none() { println!("info depth {} score {} nodes {} nps {} time {} pv {}", max_depth, format!("{} {}", s, e), nodes_checked, (nodes_checked as f64 / duration.as_secs_f64()).round() as u64, duration.as_millis(), format!("{}{}", Board::bit_to_algebraic(1 << best_move.unwrap().fr... [INFO] [stdout] | ------------------- the check is happening here ^^^^^^^^^^^^^^^^^^ [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: called `unwrap` on `best_move` after checking its variant with `is_none` [INFO] [stdout] --> src/engine.rs:143:340 [INFO] [stdout] | [INFO] [stdout] 143 | ...f !best_move.is_none() { println!("info depth {} score {} nodes {} nps {} time {} pv {}", max_depth, format!("{} {}", s, e), nodes_checked, (nodes_checked as f64 / duration.as_secs_f64()).round() as u64, duration.as_millis(), format!("{}{}", Board::bit_to_algebraic(1 << best_move.unwrap().from), Board::bit_to_algebraic(1 << best_move.unwrap().to... [INFO] [stdout] | ------------------- the check is happening here ^^^^^^^^^^^^^^^^^^ [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: this `if` statement can be collapsed [INFO] [stdout] --> src/engine.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | / if let Some(prev) = best_move { [INFO] [stdout] 69 | | if let Some(pos) = moves.iter().position(|&m| m == prev) { [INFO] [stdout] 70 | | let swap = moves.remove(pos); [INFO] [stdout] 71 | | moves.insert(0, swap); [INFO] [stdout] 72 | | } [INFO] [stdout] 73 | | } [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] 68 ~ if let Some(prev) = best_move [INFO] [stdout] 69 ~ && let Some(pos) = moves.iter().position(|&m| m == prev) { [INFO] [stdout] 70 | let swap = moves.remove(pos); [INFO] [stdout] 71 | moves.insert(0, swap); [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | / if let Some(dl) = deadline { [INFO] [stdout] 93 | | if Instant::now() >= dl { [INFO] [stdout] 94 | | break 'm; [INFO] [stdout] 95 | | } [INFO] [stdout] 96 | | } [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] 92 ~ if let Some(dl) = deadline [INFO] [stdout] 93 ~ && Instant::now() >= dl { [INFO] [stdout] 94 | break 'm; [INFO] [stdout] 95 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | / if let Some(dl) = deadline { [INFO] [stdout] 114 | | if Instant::now() >= dl { [INFO] [stdout] 115 | | break; [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | } [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] 113 ~ if let Some(dl) = deadline [INFO] [stdout] 114 ~ && Instant::now() >= dl { [INFO] [stdout] 115 | break; [INFO] [stdout] 116 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/engine.rs:143:39 [INFO] [stdout] | [INFO] [stdout] 143 | ... { println!("info depth {} score {} nodes {} nps {} time {} pv {}", max_d...ove.unwrap().to))) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:1588:9 [INFO] [stdout] | [INFO] [stdout] 1588 | / if !self.turn == Colour::Black { [INFO] [stdout] 1589 | | if self.full_moves > 0 { [INFO] [stdout] 1590 | | self.full_moves -= 1 [INFO] [stdout] 1591 | | }; [INFO] [stdout] 1592 | | } [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] 1588 ~ if !self.turn == Colour::Black [INFO] [stdout] 1589 ~ && self.full_moves > 0 { [INFO] [stdout] 1590 | self.full_moves -= 1 [INFO] [stdout] 1591 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:1613:13 [INFO] [stdout] | [INFO] [stdout] 1613 | return State::Checkmate(Colour::White); [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] 1613 - return State::Checkmate(Colour::White); [INFO] [stdout] 1613 + State::Checkmate(Colour::White) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:1615:13 [INFO] [stdout] | [INFO] [stdout] 1615 | return State::Checkmate(Colour::Black); [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] 1615 - return State::Checkmate(Colour::Black); [INFO] [stdout] 1615 + State::Checkmate(Colour::Black) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:1617:13 [INFO] [stdout] | [INFO] [stdout] 1617 | return State::Stalemate; [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] 1617 - return State::Stalemate; [INFO] [stdout] 1617 + State::Stalemate [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:1607:9 [INFO] [stdout] | [INFO] [stdout] 1607 | / if validate_no_moves { [INFO] [stdout] 1608 | | if self.get_legal_moves(self.turn, None, false).len() != 0 { [INFO] [stdout] 1609 | | return State::Continue; [INFO] [stdout] 1610 | | } [INFO] [stdout] 1611 | | } [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] 1607 ~ if validate_no_moves [INFO] [stdout] 1608 ~ && self.get_legal_moves(self.turn, None, false).len() != 0 { [INFO] [stdout] 1609 | return State::Continue; [INFO] [stdout] 1610 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/board.rs:1608:16 [INFO] [stdout] | [INFO] [stdout] 1608 | if self.get_legal_moves(self.turn, None, false).len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_legal_moves(self.turn, None, false).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `colour` is only used to index `bb` [INFO] [stdout] --> src/engine.rs:235:23 [INFO] [stdout] | [INFO] [stdout] 235 | for colour in 0..=1 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 235 - for colour in 0..=1 { [INFO] [stdout] 235 + for in &bb { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/engine.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | / fn negamax( [INFO] [stdout] 254 | | &mut self, [INFO] [stdout] 255 | | board: &mut Board, [INFO] [stdout] 256 | | depth: u32, [INFO] [stdout] ... | [INFO] [stdout] 263 | | ply: i32 [INFO] [stdout] 264 | | ) -> i32 { [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engine.rs:289:12 [INFO] [stdout] | [INFO] [stdout] 289 | if moves.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `moves.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engine.rs:291:44 [INFO] [stdout] | [INFO] [stdout] 291 | return Engine::evaluate(board, moves.len() == 0, false, ply); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `moves.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `moves` [INFO] [stdout] --> src/engine.rs:310:18 [INFO] [stdout] | [INFO] [stdout] 310 | for i in 0..moves.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 310 - for i in 0..moves.len() { [INFO] [stdout] 310 + for in &moves { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/engine.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{i32, time::Duration}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/engine.rs:143:16 [INFO] [stdout] | [INFO] [stdout] 143 | ... if !best_move.is_none() { println!("info depth {} score {} nodes {} nps {} time {} pv {}", max_depth, format!("{} {}", s, e),... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `best_move.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_move` after checking its variant with `is_none` [INFO] [stdout] --> src/engine.rs:143:285 [INFO] [stdout] | [INFO] [stdout] 143 | ...f !best_move.is_none() { println!("info depth {} score {} nodes {} nps {} time {} pv {}", max_depth, format!("{} {}", s, e), nodes_checked, (nodes_checked as f64 / duration.as_secs_f64()).round() as u64, duration.as_millis(), format!("{}{}", Board::bit_to_algebraic(1 << best_move.unwrap().fr... [INFO] [stdout] | ------------------- the check is happening here ^^^^^^^^^^^^^^^^^^ [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: called `unwrap` on `best_move` after checking its variant with `is_none` [INFO] [stdout] --> src/engine.rs:143:340 [INFO] [stdout] | [INFO] [stdout] 143 | ...f !best_move.is_none() { println!("info depth {} score {} nodes {} nps {} time {} pv {}", max_depth, format!("{} {}", s, e), nodes_checked, (nodes_checked as f64 / duration.as_secs_f64()).round() as u64, duration.as_millis(), format!("{}{}", Board::bit_to_algebraic(1 << best_move.unwrap().from), Board::bit_to_algebraic(1 << best_move.unwrap().to... [INFO] [stdout] | ------------------- the check is happening here ^^^^^^^^^^^^^^^^^^ [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: this `if` statement can be collapsed [INFO] [stdout] --> src/engine.rs:358:13 [INFO] [stdout] | [INFO] [stdout] 358 | / if let Some(dl) = deadline { [INFO] [stdout] 359 | | if Instant::now() >= dl { [INFO] [stdout] 360 | | return if best_score == MIN { [INFO] [stdout] 361 | | alpha [INFO] [stdout] ... | [INFO] [stdout] 366 | | } [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] 358 ~ if let Some(dl) = deadline [INFO] [stdout] 359 ~ && Instant::now() >= dl { [INFO] [stdout] 360 | return if best_score == MIN { [INFO] [stdout] ... [INFO] [stdout] 364 | } [INFO] [stdout] 365 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | / if let Some(prev) = best_move { [INFO] [stdout] 69 | | if let Some(pos) = moves.iter().position(|&m| m == prev) { [INFO] [stdout] 70 | | let swap = moves.remove(pos); [INFO] [stdout] 71 | | moves.insert(0, swap); [INFO] [stdout] 72 | | } [INFO] [stdout] 73 | | } [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] 68 ~ if let Some(prev) = best_move [INFO] [stdout] 69 ~ && let Some(pos) = moves.iter().position(|&m| m == prev) { [INFO] [stdout] 70 | let swap = moves.remove(pos); [INFO] [stdout] 71 | moves.insert(0, swap); [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | / if let Some(dl) = deadline { [INFO] [stdout] 93 | | if Instant::now() >= dl { [INFO] [stdout] 94 | | break 'm; [INFO] [stdout] 95 | | } [INFO] [stdout] 96 | | } [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] 92 ~ if let Some(dl) = deadline [INFO] [stdout] 93 ~ && Instant::now() >= dl { [INFO] [stdout] 94 | break 'm; [INFO] [stdout] 95 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | / if let Some(dl) = deadline { [INFO] [stdout] 114 | | if Instant::now() >= dl { [INFO] [stdout] 115 | | break; [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | } [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] 113 ~ if let Some(dl) = deadline [INFO] [stdout] 114 ~ && Instant::now() >= dl { [INFO] [stdout] 115 | break; [INFO] [stdout] 116 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/engine.rs:143:39 [INFO] [stdout] | [INFO] [stdout] 143 | ... { println!("info depth {} score {} nodes {} nps {} time {} pv {}", max_d...ove.unwrap().to))) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is only used to index `pieces` [INFO] [stdout] --> src/engine.rs:486:18 [INFO] [stdout] | [INFO] [stdout] 486 | for c in 0..=1 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 486 - for c in 0..=1 { [INFO] [stdout] 486 + for in &mut pieces { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `piece` is only used to index `pieces` [INFO] [stdout] --> src/engine.rs:487:26 [INFO] [stdout] | [INFO] [stdout] 487 | for piece in 0..=5 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 487 - for piece in 0..=5 { [INFO] [stdout] 487 + for in &mut pieces { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sq` is only used to index `pieces` [INFO] [stdout] --> src/engine.rs:488:27 [INFO] [stdout] | [INFO] [stdout] 488 | for sq in 0..=63 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 488 - for sq in 0..=63 { [INFO] [stdout] 488 + for in &mut pieces { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `colour` is only used to index `bb` [INFO] [stdout] --> src/engine.rs:235:23 [INFO] [stdout] | [INFO] [stdout] 235 | for colour in 0..=1 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 235 - for colour in 0..=1 { [INFO] [stdout] 235 + for in &bb { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/engine.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | / fn negamax( [INFO] [stdout] 254 | | &mut self, [INFO] [stdout] 255 | | board: &mut Board, [INFO] [stdout] 256 | | depth: u32, [INFO] [stdout] ... | [INFO] [stdout] 263 | | ply: i32 [INFO] [stdout] 264 | | ) -> i32 { [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engine.rs:289:12 [INFO] [stdout] | [INFO] [stdout] 289 | if moves.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `moves.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engine.rs:291:44 [INFO] [stdout] | [INFO] [stdout] 291 | return Engine::evaluate(board, moves.len() == 0, false, ply); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `moves.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `moves` [INFO] [stdout] --> src/engine.rs:310:18 [INFO] [stdout] | [INFO] [stdout] 310 | for i in 0..moves.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 310 - for i in 0..moves.len() { [INFO] [stdout] 310 + for in &moves { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine.rs:358:13 [INFO] [stdout] | [INFO] [stdout] 358 | / if let Some(dl) = deadline { [INFO] [stdout] 359 | | if Instant::now() >= dl { [INFO] [stdout] 360 | | return if best_score == MIN { [INFO] [stdout] 361 | | alpha [INFO] [stdout] ... | [INFO] [stdout] 366 | | } [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] 358 ~ if let Some(dl) = deadline [INFO] [stdout] 359 ~ && Instant::now() >= dl { [INFO] [stdout] 360 | return if best_score == MIN { [INFO] [stdout] ... [INFO] [stdout] 364 | } [INFO] [stdout] 365 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is only used to index `pieces` [INFO] [stdout] --> src/engine.rs:486:18 [INFO] [stdout] | [INFO] [stdout] 486 | for c in 0..=1 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 486 - for c in 0..=1 { [INFO] [stdout] 486 + for in &mut pieces { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `piece` is only used to index `pieces` [INFO] [stdout] --> src/engine.rs:487:26 [INFO] [stdout] | [INFO] [stdout] 487 | for piece in 0..=5 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 487 - for piece in 0..=5 { [INFO] [stdout] 487 + for in &mut pieces { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sq` is only used to index `pieces` [INFO] [stdout] --> src/engine.rs:488:27 [INFO] [stdout] | [INFO] [stdout] 488 | for sq in 0..=63 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 488 - for sq in 0..=63 { [INFO] [stdout] 488 + for in &mut pieces { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i32` is unnecessary [INFO] [stdout] --> src/main.rs:208:92 [INFO] [stdout] | [INFO] [stdout] 208 | ... println!("Score: {} | Endgame: {}", Engine::evaluate(&mut board, false, false, 0 as i32) * if board.turn == Colour::White { 1... [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:260:37 [INFO] [stdout] | [INFO] [stdout] 260 | error_message = format!("Game drawed"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Game drawed".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i32` is unnecessary [INFO] [stdout] --> src/main.rs:208:92 [INFO] [stdout] | [INFO] [stdout] 208 | ... println!("Score: {} | Endgame: {}", Engine::evaluate(&mut board, false, false, 0 as i32) * if board.turn == Colour::White { 1... [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:260:37 [INFO] [stdout] | [INFO] [stdout] 260 | error_message = format!("Game drawed"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Game drawed".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.96s [INFO] running `Command { std: "docker" "inspect" "24b56196be5de7ca71270d72db6cde59342f6d6fa88d26ba6860a73bd14ce01d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "24b56196be5de7ca71270d72db6cde59342f6d6fa88d26ba6860a73bd14ce01d", kill_on_drop: false }` [INFO] [stdout] 24b56196be5de7ca71270d72db6cde59342f6d6fa88d26ba6860a73bd14ce01d