[INFO] cloning repository https://github.com/varghs/midas [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/varghs/midas" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvarghs%2Fmidas", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvarghs%2Fmidas'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] de9bad1ddfe6bf41c19221f81b5d93e27c02317d [INFO] linting varghs/midas against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvarghs%2Fmidas" "/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/varghs/midas [INFO] finished tweaking git repo https://github.com/varghs/midas [INFO] tweaked toml for git repo https://github.com/varghs/midas written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/varghs/midas 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/varghs/midas 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] 0480320524f6fdb151b7bdc270866e558649df9a1aae258a1ef901d72cd564bc [INFO] running `Command { std: "docker" "start" "-a" "0480320524f6fdb151b7bdc270866e558649df9a1aae258a1ef901d72cd564bc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0480320524f6fdb151b7bdc270866e558649df9a1aae258a1ef901d72cd564bc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0480320524f6fdb151b7bdc270866e558649df9a1aae258a1ef901d72cd564bc", kill_on_drop: false }` [INFO] [stdout] 0480320524f6fdb151b7bdc270866e558649df9a1aae258a1ef901d72cd564bc [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] 94a3c89b8494bab77d3bc27d308af39ebbe8f12f1bf4362e45a8093f52a04c89 [INFO] running `Command { std: "docker" "start" "-a" "94a3c89b8494bab77d3bc27d308af39ebbe8f12f1bf4362e45a8093f52a04c89", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.146 [INFO] [stderr] Checking getrandom v0.2.10 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking midas v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `NOTABFILE` and `NOTHGFILE` [INFO] [stdout] --> src/engine/attacks/king_attacks.rs:3:38 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::engine::bitboard::{EMPTY, NOTABFILE, NOTAFILE, NOTHFILE, NOTHGFILE}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `NOTABFILE`, `NOTAFILE`, `NOTHFILE`, and `NOTHGFILE` [INFO] [stdout] --> src/engine/attacks/slider_attacks/bishop_attacks.rs:2:38 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::engine::bitboard::{EMPTY, NOTABFILE, NOTAFILE, NOTHFILE, NOTHGFILE, ONE}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `NOTABFILE`, `NOTAFILE`, `NOTHFILE`, `NOTHGFILE`, and `print_bitboard` [INFO] [stdout] --> src/engine/attacks/slider_attacks/rook_attacks.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | print_bitboard, EMPTY, NOTABFILE, NOTAFILE, NOTHFILE, NOTHGFILE, ONE, [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AttackTables`, `Board`, `Color`, `Piece`, and `slider_attacks::bishop_attacks::BishopAttacks` [INFO] [stdout] --> src/engine/bitboard.rs:2:15 [INFO] [stdout] | [INFO] [stdout] 2 | attacks::{slider_attacks::bishop_attacks::BishopAttacks, AttackTables}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] 3 | board::{Board, Color, Piece}, [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MoveList` and `print_bitboard` [INFO] [stdout] --> src/engine/board.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | bitboard::{print_bitboard, Bitboard}, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 4 | r#move::{Move, MoveList}, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `get_bit`, `pop_bit`, and `tog_bit` [INFO] [stdout] --> src/engine/fen.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{get_bit, pop_bit, set_bit, tog_bit}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ASCII_SQUARE` [INFO] [stdout] --> src/engine/move_gen.rs:6:22 [INFO] [stdout] | [INFO] [stdout] 6 | square::{Square, ASCII_SQUARE}, r#move::MoveList, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Board` and `MoveList` [INFO] [stdout] --> src/engine/perft.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | board::{Board, BoardState}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 5 | r#move::{MoveList, MoveType}, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `MoveList` [INFO] [stdout] --> src/engine/uci.rs:2:29 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::engine::r#move::{MoveList, MoveType}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Board` [INFO] [stdout] --> src/engine/uci.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | use super::board::{Board, BoardState, Piece}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BufWriter` [INFO] [stdout] --> src/engine/uci.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | use std::io::{self, BufWriter, Write}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `EMPTY` [INFO] [stdout] --> src/engine/evaluate.rs:2:16 [INFO] [stdout] | [INFO] [stdout] 2 | bitboard::{EMPTY, LS1B}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `NOTABFILE` and `NOTHGFILE` [INFO] [stdout] --> src/engine/attacks/king_attacks.rs:3:38 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::engine::bitboard::{EMPTY, NOTABFILE, NOTAFILE, NOTHFILE, NOTHGFILE}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `NOTABFILE`, `NOTAFILE`, `NOTHFILE`, and `NOTHGFILE` [INFO] [stdout] --> src/engine/attacks/slider_attacks/bishop_attacks.rs:2:38 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::engine::bitboard::{EMPTY, NOTABFILE, NOTAFILE, NOTHFILE, NOTHGFILE, ONE}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `NOTABFILE`, `NOTAFILE`, `NOTHFILE`, `NOTHGFILE`, and `print_bitboard` [INFO] [stdout] --> src/engine/attacks/slider_attacks/rook_attacks.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | print_bitboard, EMPTY, NOTABFILE, NOTAFILE, NOTHFILE, NOTHGFILE, ONE, [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AttackTables`, `Board`, `Color`, `Piece`, and `slider_attacks::bishop_attacks::BishopAttacks` [INFO] [stdout] --> src/engine/bitboard.rs:2:15 [INFO] [stdout] | [INFO] [stdout] 2 | attacks::{slider_attacks::bishop_attacks::BishopAttacks, AttackTables}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] 3 | board::{Board, Color, Piece}, [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MoveList` and `print_bitboard` [INFO] [stdout] --> src/engine/board.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | bitboard::{print_bitboard, Bitboard}, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 4 | r#move::{Move, MoveList}, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `get_bit`, `pop_bit`, and `tog_bit` [INFO] [stdout] --> src/engine/fen.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{get_bit, pop_bit, set_bit, tog_bit}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ASCII_SQUARE` [INFO] [stdout] --> src/engine/move_gen.rs:6:22 [INFO] [stdout] | [INFO] [stdout] 6 | square::{Square, ASCII_SQUARE}, r#move::MoveList, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Board` and `MoveList` [INFO] [stdout] --> src/engine/perft.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | board::{Board, BoardState}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 5 | r#move::{MoveList, MoveType}, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `MoveList` [INFO] [stdout] --> src/engine/uci.rs:2:29 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::engine::r#move::{MoveList, MoveType}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Board` [INFO] [stdout] --> src/engine/uci.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | use super::board::{Board, BoardState, Piece}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BufWriter` [INFO] [stdout] --> src/engine/uci.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | use std::io::{self, BufWriter, Write}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `EMPTY` [INFO] [stdout] --> src/engine/evaluate.rs:2:16 [INFO] [stdout] | [INFO] [stdout] 2 | bitboard::{EMPTY, LS1B}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `used_attacks` is never read [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:73:32 [INFO] [stdout] | [INFO] [stdout] 73 | let mut used_attacks = [EMPTY; 4096]; [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 `used_attacks` is never read [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:73:32 [INFO] [stdout] | [INFO] [stdout] 73 | let mut used_attacks = [EMPTY; 4096]; [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: variable does not need to be mutable [INFO] [stdout] --> src/engine/perft.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut input = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/engine/perft.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut input = String::new(); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/engine/perft.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut input = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/engine/perft.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut input = String::new(); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/engine/uci.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | let score = self.negamax(-50000, 50000, depth); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `depth` is never read [INFO] [stdout] --> src/engine/uci.rs:172:25 [INFO] [stdout] | [INFO] [stdout] 172 | let mut depth = -1; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `BitwiseOperations` is never used [INFO] [stdout] --> src/engine/bitboard.rs:150:7 [INFO] [stdout] | [INFO] [stdout] 150 | trait BitwiseOperations { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `PreShiftOperations` is never used [INFO] [stdout] --> src/engine/bitboard.rs:165:7 [INFO] [stdout] | [INFO] [stdout] 165 | trait PreShiftOperations { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `RotateShiftOperations` is never used [INFO] [stdout] --> src/engine/bitboard.rs:203:7 [INFO] [stdout] | [INFO] [stdout] 203 | trait RotateShiftOperations { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ONE` is never used [INFO] [stdout] --> src/engine/move.rs:346:7 [INFO] [stdout] | [INFO] [stdout] 346 | const ONE: Bitboard = 1; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `KingAttacks` [INFO] [stdout] --> src/engine/attacks/king_attacks.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn new() -> Self { [INFO] [stdout] 13 | | let king_attacks = [0; 64]; [INFO] [stdout] 14 | | Self { king_attacks } [INFO] [stdout] 15 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 11 + impl Default for KingAttacks { [INFO] [stdout] 12 + fn default() -> Self { [INFO] [stdout] 13 + Self::new() [INFO] [stdout] 14 + } [INFO] [stdout] 15 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `KnightAttacks` [INFO] [stdout] --> src/engine/attacks/knight_attacks.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | let knight_attacks = [EMPTY; 64]; [INFO] [stdout] 15 | | Self { knight_attacks } [INFO] [stdout] 16 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for KnightAttacks { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/engine/perft.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut input = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/engine/perft.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut input = String::new(); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PawnAttacks` [INFO] [stdout] --> src/engine/attacks/pawn_attacks.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / pub fn new() -> Self { [INFO] [stdout] 17 | | let pawn_attacks = [[0; 64]; 2]; [INFO] [stdout] 18 | | Self { pawn_attacks } [INFO] [stdout] 19 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 15 + impl Default for PawnAttacks { [INFO] [stdout] 16 + fn default() -> Self { [INFO] [stdout] 17 + Self::new() [INFO] [stdout] 18 + } [INFO] [stdout] 19 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/engine/perft.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut input = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/engine/perft.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut input = String::new(); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BishopAttacks` [INFO] [stdout] --> src/engine/attacks/slider_attacks/bishop_attacks.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self { [INFO] [stdout] 29 | | let bishop_masks = [0; 64]; [INFO] [stdout] 30 | | let bishop_attacks = [[0; 512]; 64]; [INFO] [stdout] 31 | | Self { [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 27 + impl Default for BishopAttacks { [INFO] [stdout] 28 + fn default() -> Self { [INFO] [stdout] 29 + Self::new() [INFO] [stdout] 30 + } [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RookAttacks` [INFO] [stdout] --> src/engine/attacks/slider_attacks/rook_attacks.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | / pub fn new() -> Self { [INFO] [stdout] 31 | | let rook_masks = [0; 64]; [INFO] [stdout] 32 | | let rook_attacks = [[0; 4096]; 64]; [INFO] [stdout] 33 | | Self { [INFO] [stdout] ... | [INFO] [stdout] 37 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 29 + impl Default for RookAttacks { [INFO] [stdout] 30 + fn default() -> Self { [INFO] [stdout] 31 + Self::new() [INFO] [stdout] 32 + } [INFO] [stdout] 33 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/engine/uci.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | let score = self.negamax(-50000, 50000, depth); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SliderAttacks` [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self { [INFO] [stdout] 21 | | let bishops = BishopAttacks::new(); [INFO] [stdout] 22 | | let rooks = RookAttacks::new(); [INFO] [stdout] ... | [INFO] [stdout] 25 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 + impl Default for SliderAttacks { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `depth` is never read [INFO] [stdout] --> src/engine/uci.rs:172:25 [INFO] [stdout] | [INFO] [stdout] 172 | let mut depth = -1; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | return n1 | (n2 << 16) | (n3 << 32) | (n4 << 48); [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] 61 - return n1 | (n2 << 16) | (n3 << 32) | (n4 << 48); [INFO] [stdout] 61 + n1 | (n2 << 16) | (n3 << 32) | (n4 << 48) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | / return Self::get_random_bitboard_nums() [INFO] [stdout] 66 | | & Self::get_random_bitboard_nums() [INFO] [stdout] 67 | | & Self::get_random_bitboard_nums(); [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] 65 ~ Self::get_random_bitboard_nums() [INFO] [stdout] 66 + & Self::get_random_bitboard_nums() [INFO] [stdout] 67 ~ & Self::get_random_bitboard_nums() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | return EMPTY; [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] 166 - return EMPTY; [INFO] [stdout] 166 + EMPTY [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:129:19 [INFO] [stdout] | [INFO] [stdout] 129 | while fail == false && index < occupancy_indicies { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `!fail` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `square_num` is used to index `bishop_relevant_bits` [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:171:27 [INFO] [stdout] | [INFO] [stdout] 171 | for square_num in 0..64_usize { [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] 171 - for square_num in 0..64_usize { [INFO] [stdout] 171 + for (square_num, ) in bishop_relevant_bits.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `square_num` is used to index `rook_relevant_bits` [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:181:27 [INFO] [stdout] | [INFO] [stdout] 181 | for square_num in 0..64_usize { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 181 - for square_num in 0..64_usize { [INFO] [stdout] 181 + for (square_num, ) in rook_relevant_bits.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `BitwiseOperations` is never used [INFO] [stdout] --> src/engine/bitboard.rs:150:7 [INFO] [stdout] | [INFO] [stdout] 150 | trait BitwiseOperations { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `PreShiftOperations` is never used [INFO] [stdout] --> src/engine/bitboard.rs:165:7 [INFO] [stdout] | [INFO] [stdout] 165 | trait PreShiftOperations { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `RotateShiftOperations` is never used [INFO] [stdout] --> src/engine/bitboard.rs:203:7 [INFO] [stdout] | [INFO] [stdout] 203 | trait RotateShiftOperations { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ONE` is never used [INFO] [stdout] --> src/engine/move.rs:346:7 [INFO] [stdout] | [INFO] [stdout] 346 | const ONE: Bitboard = 1; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `KingAttacks` [INFO] [stdout] --> src/engine/attacks/king_attacks.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn new() -> Self { [INFO] [stdout] 13 | | let king_attacks = [0; 64]; [INFO] [stdout] 14 | | Self { king_attacks } [INFO] [stdout] 15 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 11 + impl Default for KingAttacks { [INFO] [stdout] 12 + fn default() -> Self { [INFO] [stdout] 13 + Self::new() [INFO] [stdout] 14 + } [INFO] [stdout] 15 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AttackTables` [INFO] [stdout] --> src/engine/attacks.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn new() -> Self { [INFO] [stdout] 22 | | let pawns = PawnAttacks::new(); [INFO] [stdout] 23 | | let knights = KnightAttacks::new(); [INFO] [stdout] 24 | | let kings = KingAttacks::new(); [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 20 + impl Default for AttackTables { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `KnightAttacks` [INFO] [stdout] --> src/engine/attacks/knight_attacks.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | let knight_attacks = [EMPTY; 64]; [INFO] [stdout] 15 | | Self { knight_attacks } [INFO] [stdout] 16 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for KnightAttacks { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/engine/bitboard.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 63 - print!("\n"); [INFO] [stdout] 63 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/engine/bitboard.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | print!(" a b c d e f g h\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 67 - print!(" a b c d e f g h\n") [INFO] [stdout] 67 + println!(" a b c d e f g h") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PawnAttacks` [INFO] [stdout] --> src/engine/attacks/pawn_attacks.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / pub fn new() -> Self { [INFO] [stdout] 17 | | let pawn_attacks = [[0; 64]; 2]; [INFO] [stdout] 18 | | Self { pawn_attacks } [INFO] [stdout] 19 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 15 + impl Default for PawnAttacks { [INFO] [stdout] 16 + fn default() -> Self { [INFO] [stdout] 17 + Self::new() [INFO] [stdout] 18 + } [INFO] [stdout] 19 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/bitboard.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | / return Some( [INFO] [stdout] 102 | | INDEX_64_KIM[(((*self ^ (*self).wrapping_sub(1)).wrapping_mul(DEBRUIJN_64)) [INFO] [stdout] 103 | | .wrapping_shr(58)) as usize] [INFO] [stdout] 104 | | .try_into() [INFO] [stdout] 105 | | .unwrap(), [INFO] [stdout] 106 | | ); [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] 101 ~ Some( [INFO] [stdout] 102 + INDEX_64_KIM[(((*self ^ (*self).wrapping_sub(1)).wrapping_mul(DEBRUIJN_64)) [INFO] [stdout] 103 + .wrapping_shr(58)) as usize] [INFO] [stdout] 104 + .try_into() [INFO] [stdout] 105 + .unwrap(), [INFO] [stdout] 106 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/bitboard.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | return Some(index_of_lsb.try_into().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] 134 - return Some(index_of_lsb.try_into().unwrap()); [INFO] [stdout] 134 + Some(index_of_lsb.try_into().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BishopAttacks` [INFO] [stdout] --> src/engine/attacks/slider_attacks/bishop_attacks.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self { [INFO] [stdout] 29 | | let bishop_masks = [0; 64]; [INFO] [stdout] 30 | | let bishop_attacks = [[0; 512]; 64]; [INFO] [stdout] 31 | | Self { [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 27 + impl Default for BishopAttacks { [INFO] [stdout] 28 + fn default() -> Self { [INFO] [stdout] 29 + Self::new() [INFO] [stdout] 30 + } [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/engine/bitboard.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | (*self << s) | (*self >> (64 - s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `(*self).rotate_left(s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: `#[warn(clippy::manual_rotate)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/engine/bitboard.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | (*self >> s) | (*self << (64 - s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `(*self).rotate_right(s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/engine/board.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let s: &str; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `s` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 24 ~ [INFO] [stdout] 25 ~ let s: &str = match self { [INFO] [stdout] 26 ~ Piece::Pawn => "P", [INFO] [stdout] 27 ~ Piece::Rook => "R", [INFO] [stdout] 28 ~ Piece::Knight => "N", [INFO] [stdout] 29 ~ Piece::Bishop => "B", [INFO] [stdout] 30 ~ Piece::Queen => "Q", [INFO] [stdout] 31 ~ Piece::King => "K", [INFO] [stdout] 32 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/engine/board.rs:119:5 [INFO] [stdout] | [INFO] [stdout] 119 | / pub fn default() -> Self { [INFO] [stdout] 120 | | Self(0xF) [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RookAttacks` [INFO] [stdout] --> src/engine/attacks/slider_attacks/rook_attacks.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | / pub fn new() -> Self { [INFO] [stdout] 31 | | let rook_masks = [0; 64]; [INFO] [stdout] 32 | | let rook_attacks = [[0; 4096]; 64]; [INFO] [stdout] 33 | | Self { [INFO] [stdout] ... | [INFO] [stdout] 37 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 29 + impl Default for RookAttacks { [INFO] [stdout] 30 + fn default() -> Self { [INFO] [stdout] 31 + Self::new() [INFO] [stdout] 32 + } [INFO] [stdout] 33 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Board` [INFO] [stdout] --> src/engine/board.rs:180:5 [INFO] [stdout] | [INFO] [stdout] 180 | / pub fn new() -> Self { [INFO] [stdout] 181 | | let pawns: Bitboard = 0x00FF00000000FF00; [INFO] [stdout] 182 | | let rooks: Bitboard = 0x8100000000000081; [INFO] [stdout] 183 | | let knights: Bitboard = 0x4200000000000042; [INFO] [stdout] ... | [INFO] [stdout] 208 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 179 + impl Default for Board { [INFO] [stdout] 180 + fn default() -> Self { [INFO] [stdout] 181 + Self::new() [INFO] [stdout] 182 + } [INFO] [stdout] 183 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SliderAttacks` [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self { [INFO] [stdout] 21 | | let bishops = BishopAttacks::new(); [INFO] [stdout] 22 | | let rooks = RookAttacks::new(); [INFO] [stdout] ... | [INFO] [stdout] 25 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 + impl Default for SliderAttacks { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | return n1 | (n2 << 16) | (n3 << 32) | (n4 << 48); [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] 61 - return n1 | (n2 << 16) | (n3 << 32) | (n4 << 48); [INFO] [stdout] 61 + n1 | (n2 << 16) | (n3 << 32) | (n4 << 48) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | / return Self::get_random_bitboard_nums() [INFO] [stdout] 66 | | & Self::get_random_bitboard_nums() [INFO] [stdout] 67 | | & Self::get_random_bitboard_nums(); [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] 65 ~ Self::get_random_bitboard_nums() [INFO] [stdout] 66 + & Self::get_random_bitboard_nums() [INFO] [stdout] 67 ~ & Self::get_random_bitboard_nums() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | return EMPTY; [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] 166 - return EMPTY; [INFO] [stdout] 166 + EMPTY [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/engine/board.rs:319:21 [INFO] [stdout] | [INFO] [stdout] 319 | / match get_bit!(self.boards[board_idx], square) { [INFO] [stdout] 320 | | true => { [INFO] [stdout] 321 | | filled = true; [INFO] [stdout] 322 | | let p: Piece = board_idx.try_into().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 332 | | false => (), [INFO] [stdout] 333 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 319 ~ if get_bit!(self.boards[board_idx], square) == true { [INFO] [stdout] 320 + filled = true; [INFO] [stdout] 321 + let p: Piece = board_idx.try_into().unwrap(); [INFO] [stdout] 322 + match self.get_color(Color::White) & (1 << square) { [INFO] [stdout] 323 + 0 => { [INFO] [stdout] 324 + output += format!("{} ", p).to_lowercase().as_str(); [INFO] [stdout] 325 + } [INFO] [stdout] 326 + _ => { [INFO] [stdout] 327 + output += format!("{} ", p).as_str(); [INFO] [stdout] 328 + } [INFO] [stdout] 329 + } [INFO] [stdout] 330 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:129:19 [INFO] [stdout] | [INFO] [stdout] 129 | while fail == false && index < occupancy_indicies { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `!fail` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `square_num` is used to index `bishop_relevant_bits` [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:171:27 [INFO] [stdout] | [INFO] [stdout] 171 | for square_num in 0..64_usize { [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] 171 - for square_num in 0..64_usize { [INFO] [stdout] 171 + for (square_num, ) in bishop_relevant_bits.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `square_num` is used to index `rook_relevant_bits` [INFO] [stdout] --> src/engine/attacks/slider_attacks.rs:181:27 [INFO] [stdout] | [INFO] [stdout] 181 | for square_num in 0..64_usize { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 181 - for square_num in 0..64_usize { [INFO] [stdout] 181 + for (square_num, ) in rook_relevant_bits.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BoardState` [INFO] [stdout] --> src/engine/board.rs:376:5 [INFO] [stdout] | [INFO] [stdout] 376 | / pub fn new() -> Self { [INFO] [stdout] 377 | | let board = Board::new(); [INFO] [stdout] 378 | | let best_move = Move::default(); [INFO] [stdout] 379 | | let ply = 0; [INFO] [stdout] ... | [INFO] [stdout] 387 | | ret [INFO] [stdout] 388 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 375 + impl Default for BoardState { [INFO] [stdout] 376 + fn default() -> Self { [INFO] [stdout] 377 + Self::new() [INFO] [stdout] 378 + } [INFO] [stdout] 379 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/engine/board.rs:387:9 [INFO] [stdout] | [INFO] [stdout] 381 | / let ret = Self { [INFO] [stdout] 382 | | board, [INFO] [stdout] 383 | | best_move, [INFO] [stdout] 384 | | ply, [INFO] [stdout] 385 | | nodes, [INFO] [stdout] 386 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 387 | ret [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 381 ~ [INFO] [stdout] 382 ~ Self { [INFO] [stdout] 383 + board, [INFO] [stdout] 384 + best_move, [INFO] [stdout] 385 + ply, [INFO] [stdout] 386 + nodes, [INFO] [stdout] 387 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/engine/fen.rs:34:20 [INFO] [stdout] | [INFO] [stdout] 34 | if char >= 'a' && char <= 'z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&char)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/engine/fen.rs:39:27 [INFO] [stdout] | [INFO] [stdout] 39 | } else if char >= 'A' && char <= 'Z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('A'..='Z').contains(&char)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/engine/fen.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | } else if char >= '0' && char <= '9' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&char)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AttackTables` [INFO] [stdout] --> src/engine/attacks.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn new() -> Self { [INFO] [stdout] 22 | | let pawns = PawnAttacks::new(); [INFO] [stdout] 23 | | let knights = KnightAttacks::new(); [INFO] [stdout] 24 | | let kings = KingAttacks::new(); [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 20 + impl Default for AttackTables { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/engine/bitboard.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 63 - print!("\n"); [INFO] [stdout] 63 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/engine/bitboard.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | print!(" a b c d e f g h\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 67 - print!(" a b c d e f g h\n") [INFO] [stdout] 67 + println!(" a b c d e f g h") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/engine/move.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | / pub fn new( [INFO] [stdout] 43 | | source: Square, [INFO] [stdout] 44 | | target: Square, [INFO] [stdout] 45 | | moved_piece: Piece, [INFO] [stdout] ... | [INFO] [stdout] 52 | | castling: bool, [INFO] [stdout] 53 | | ) -> Self { [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: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/engine/move.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / pub fn default() -> Self { [INFO] [stdout] 70 | | Move(0, Piece::Pawn, Color::White, None, None) [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/engine/move.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 74 | let s = (self.0 & 0x003F).try_into().unwrap(); [INFO] [stdout] | ---------------------------------------------- unnecessary `let` binding [INFO] [stdout] 75 | s [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 74 ~ [INFO] [stdout] 75 ~ (self.0 & 0x003F).try_into().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/bitboard.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | / return Some( [INFO] [stdout] 102 | | INDEX_64_KIM[(((*self ^ (*self).wrapping_sub(1)).wrapping_mul(DEBRUIJN_64)) [INFO] [stdout] 103 | | .wrapping_shr(58)) as usize] [INFO] [stdout] 104 | | .try_into() [INFO] [stdout] 105 | | .unwrap(), [INFO] [stdout] 106 | | ); [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] 101 ~ Some( [INFO] [stdout] 102 + INDEX_64_KIM[(((*self ^ (*self).wrapping_sub(1)).wrapping_mul(DEBRUIJN_64)) [INFO] [stdout] 103 + .wrapping_shr(58)) as usize] [INFO] [stdout] 104 + .try_into() [INFO] [stdout] 105 + .unwrap(), [INFO] [stdout] 106 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/bitboard.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | return Some(index_of_lsb.try_into().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] 134 - return Some(index_of_lsb.try_into().unwrap()); [INFO] [stdout] 134 + Some(index_of_lsb.try_into().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/engine/move.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 79 | let s = ((self.0 & 0x0FC0) >> 6).try_into().unwrap(); [INFO] [stdout] | ----------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 80 | s [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 79 ~ [INFO] [stdout] 80 ~ ((self.0 & 0x0FC0) >> 6).try_into().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MoveList` [INFO] [stdout] --> src/engine/move.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 137 | / pub fn new() -> Self { [INFO] [stdout] 138 | | let moves = [Move::default(); 256]; [INFO] [stdout] 139 | | let count = 0; [INFO] [stdout] 140 | | Self { moves, count } [INFO] [stdout] 141 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 136 + impl Default for MoveList { [INFO] [stdout] 137 + fn default() -> Self { [INFO] [stdout] 138 + Self::new() [INFO] [stdout] 139 + } [INFO] [stdout] 140 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/engine/bitboard.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | (*self << s) | (*self >> (64 - s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `(*self).rotate_left(s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: `#[warn(clippy::manual_rotate)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/engine/bitboard.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | (*self >> s) | (*self << (64 - s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `(*self).rotate_right(s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/engine/board.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let s: &str; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `s` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 24 ~ [INFO] [stdout] 25 ~ let s: &str = match self { [INFO] [stdout] 26 ~ Piece::Pawn => "P", [INFO] [stdout] 27 ~ Piece::Rook => "R", [INFO] [stdout] 28 ~ Piece::Knight => "N", [INFO] [stdout] 29 ~ Piece::Bishop => "B", [INFO] [stdout] 30 ~ Piece::Queen => "Q", [INFO] [stdout] 31 ~ Piece::King => "K", [INFO] [stdout] 32 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `promoted_piece` after checking its variant with `is_some` [INFO] [stdout] --> src/engine/move.rs:228:44 [INFO] [stdout] | [INFO] [stdout] 224 | if promoted_piece.is_some() { [INFO] [stdout] | --------------------------- help: try: `if let Some() = promoted_piece` [INFO] [stdout] ... [INFO] [stdout] 228 | set_bit!(self.board.boards[promoted_piece.unwrap() as usize], target); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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/engine/move.rs:312:17 [INFO] [stdout] | [INFO] [stdout] 312 | return false; [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] 312 - return false; [INFO] [stdout] 312 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/move.rs:314:17 [INFO] [stdout] | [INFO] [stdout] 314 | return true; [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] 314 - return true; [INFO] [stdout] 314 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/move.rs:320:17 [INFO] [stdout] | [INFO] [stdout] 320 | return self.make_move(m, MoveType::AllMoves); [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] 320 - return self.make_move(m, MoveType::AllMoves); [INFO] [stdout] 320 + self.make_move(m, MoveType::AllMoves) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/move.rs:323:17 [INFO] [stdout] | [INFO] [stdout] 323 | return false; [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] 323 - return false; [INFO] [stdout] 323 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/engine/board.rs:119:5 [INFO] [stdout] | [INFO] [stdout] 119 | / pub fn default() -> Self { [INFO] [stdout] 120 | | Self(0xF) [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Board` [INFO] [stdout] --> src/engine/board.rs:180:5 [INFO] [stdout] | [INFO] [stdout] 180 | / pub fn new() -> Self { [INFO] [stdout] 181 | | let pawns: Bitboard = 0x00FF00000000FF00; [INFO] [stdout] 182 | | let rooks: Bitboard = 0x8100000000000081; [INFO] [stdout] 183 | | let knights: Bitboard = 0x4200000000000042; [INFO] [stdout] ... | [INFO] [stdout] 208 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 179 + impl Default for Board { [INFO] [stdout] 180 + fn default() -> Self { [INFO] [stdout] 181 + Self::new() [INFO] [stdout] 182 + } [INFO] [stdout] 183 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/engine/move_gen.rs:29:32 [INFO] [stdout] | [INFO] [stdout] 29 | ... if !(target > Square::h8 as i32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(target <= Square::h8 as i32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/engine/move_gen.rs:276:32 [INFO] [stdout] | [INFO] [stdout] 276 | ... if !(target < Square::a1 as i32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(target >= Square::a1 as i32)` [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 `self.en_passant_sq` after checking its variant with `is_some` [INFO] [stdout] --> src/engine/move_gen.rs:193:47 [INFO] [stdout] | [INFO] [stdout] 190 | ... if self.en_passant_sq.is_some() { [INFO] [stdout] | ------------------------------- help: try: `if let Some() = self.en_passant_sq` [INFO] [stdout] ... [INFO] [stdout] 193 | ... & (ONE << self.en_passant_sq.unwrap() as u64); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `self.en_passant_sq` after checking its variant with `is_some` [INFO] [stdout] --> src/engine/move_gen.rs:440:47 [INFO] [stdout] | [INFO] [stdout] 437 | ... if self.en_passant_sq.is_some() { [INFO] [stdout] | ------------------------------- help: try: `if let Some() = self.en_passant_sq` [INFO] [stdout] ... [INFO] [stdout] 440 | ... & (ONE << self.en_passant_sq.unwrap() as u64); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/engine/board.rs:319:21 [INFO] [stdout] | [INFO] [stdout] 319 | / match get_bit!(self.boards[board_idx], square) { [INFO] [stdout] 320 | | true => { [INFO] [stdout] 321 | | filled = true; [INFO] [stdout] 322 | | let p: Piece = board_idx.try_into().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 332 | | false => (), [INFO] [stdout] 333 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 319 ~ if get_bit!(self.boards[board_idx], square) == true { [INFO] [stdout] 320 + filled = true; [INFO] [stdout] 321 + let p: Piece = board_idx.try_into().unwrap(); [INFO] [stdout] 322 + match self.get_color(Color::White) & (1 << square) { [INFO] [stdout] 323 + 0 => { [INFO] [stdout] 324 + output += format!("{} ", p).to_lowercase().as_str(); [INFO] [stdout] 325 + } [INFO] [stdout] 326 + _ => { [INFO] [stdout] 327 + output += format!("{} ", p).as_str(); [INFO] [stdout] 328 + } [INFO] [stdout] 329 + } [INFO] [stdout] 330 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BoardState` [INFO] [stdout] --> src/engine/board.rs:376:5 [INFO] [stdout] | [INFO] [stdout] 376 | / pub fn new() -> Self { [INFO] [stdout] 377 | | let board = Board::new(); [INFO] [stdout] 378 | | let best_move = Move::default(); [INFO] [stdout] 379 | | let ply = 0; [INFO] [stdout] ... | [INFO] [stdout] 387 | | ret [INFO] [stdout] 388 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 375 + impl Default for BoardState { [INFO] [stdout] 376 + fn default() -> Self { [INFO] [stdout] 377 + Self::new() [INFO] [stdout] 378 + } [INFO] [stdout] 379 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/engine/board.rs:387:9 [INFO] [stdout] | [INFO] [stdout] 381 | / let ret = Self { [INFO] [stdout] 382 | | board, [INFO] [stdout] 383 | | best_move, [INFO] [stdout] 384 | | ply, [INFO] [stdout] 385 | | nodes, [INFO] [stdout] 386 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 387 | ret [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 381 ~ [INFO] [stdout] 382 ~ Self { [INFO] [stdout] 383 + board, [INFO] [stdout] 384 + best_move, [INFO] [stdout] 385 + ply, [INFO] [stdout] 386 + nodes, [INFO] [stdout] 387 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/engine/fen.rs:34:20 [INFO] [stdout] | [INFO] [stdout] 34 | if char >= 'a' && char <= 'z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&char)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:220:25 [INFO] [stdout] | [INFO] [stdout] 220 | / if self.castle.can_castle(Castle::WhiteKing) { [INFO] [stdout] 221 | | if !get_bit!(self.get_occupancies(), Square::f1) [INFO] [stdout] 222 | | && !get_bit!(self.get_occupancies(), Square::g1) [INFO] [stdout] ... | [INFO] [stdout] 241 | | } [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] 220 ~ if self.castle.can_castle(Castle::WhiteKing) [INFO] [stdout] 221 ~ && !get_bit!(self.get_occupancies(), Square::f1) [INFO] [stdout] 222 | && !get_bit!(self.get_occupancies(), Square::g1) [INFO] [stdout] ... [INFO] [stdout] 239 | } [INFO] [stdout] 240 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/engine/fen.rs:39:27 [INFO] [stdout] | [INFO] [stdout] 39 | } else if char >= 'A' && char <= 'Z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('A'..='Z').contains(&char)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:221:29 [INFO] [stdout] | [INFO] [stdout] 221 | / ... if !get_bit!(self.get_occupancies(), Square::f1) [INFO] [stdout] 222 | | ... && !get_bit!(self.get_occupancies(), Square::g1) [INFO] [stdout] 223 | | ... { [INFO] [stdout] 224 | | ... if !self.is_square_attacked(Square::e1, Color::Black) [INFO] [stdout] ... | [INFO] [stdout] 240 | | ... } [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] 222 ~ && !get_bit!(self.get_occupancies(), Square::g1) [INFO] [stdout] 223 ~ && !self.is_square_attacked(Square::e1, Color::Black) [INFO] [stdout] 224 | && !self.is_square_attacked(Square::f1, Color::Black) [INFO] [stdout] ... [INFO] [stdout] 237 | )); [INFO] [stdout] 238 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/engine/fen.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | } else if char >= '0' && char <= '9' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&char)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:244:25 [INFO] [stdout] | [INFO] [stdout] 244 | / if self.castle.can_castle(Castle::WhiteQueen) { [INFO] [stdout] 245 | | if !get_bit!(self.get_occupancies(), Square::d1) [INFO] [stdout] 246 | | && !get_bit!(self.get_occupancies(), Square::c1) [INFO] [stdout] 247 | | && !get_bit!(self.get_occupancies(), Square::b1) [INFO] [stdout] ... | [INFO] [stdout] 266 | | } [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] 244 ~ if self.castle.can_castle(Castle::WhiteQueen) [INFO] [stdout] 245 ~ && !get_bit!(self.get_occupancies(), Square::d1) [INFO] [stdout] 246 | && !get_bit!(self.get_occupancies(), Square::c1) [INFO] [stdout] ... [INFO] [stdout] 264 | } [INFO] [stdout] 265 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:245:29 [INFO] [stdout] | [INFO] [stdout] 245 | / ... if !get_bit!(self.get_occupancies(), Square::d1) [INFO] [stdout] 246 | | ... && !get_bit!(self.get_occupancies(), Square::c1) [INFO] [stdout] 247 | | ... && !get_bit!(self.get_occupancies(), Square::b1) [INFO] [stdout] ... | [INFO] [stdout] 265 | | ... } [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] 247 ~ && !get_bit!(self.get_occupancies(), Square::b1) [INFO] [stdout] 248 ~ && !self.is_square_attacked(Square::e1, Color::Black) [INFO] [stdout] 249 | && !self.is_square_attacked(Square::d1, Color::Black) [INFO] [stdout] ... [INFO] [stdout] 262 | )); [INFO] [stdout] 263 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/engine/move.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | / pub fn new( [INFO] [stdout] 43 | | source: Square, [INFO] [stdout] 44 | | target: Square, [INFO] [stdout] 45 | | moved_piece: Piece, [INFO] [stdout] ... | [INFO] [stdout] 52 | | castling: bool, [INFO] [stdout] 53 | | ) -> Self { [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: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/engine/move.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / pub fn default() -> Self { [INFO] [stdout] 70 | | Move(0, Piece::Pawn, Color::White, None, None) [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/engine/move.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 74 | let s = (self.0 & 0x003F).try_into().unwrap(); [INFO] [stdout] | ---------------------------------------------- unnecessary `let` binding [INFO] [stdout] 75 | s [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 74 ~ [INFO] [stdout] 75 ~ (self.0 & 0x003F).try_into().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/engine/move.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 79 | let s = ((self.0 & 0x0FC0) >> 6).try_into().unwrap(); [INFO] [stdout] | ----------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 80 | s [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 79 ~ [INFO] [stdout] 80 ~ ((self.0 & 0x0FC0) >> 6).try_into().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:466:25 [INFO] [stdout] | [INFO] [stdout] 466 | / if self.castle.can_castle(Castle::BlackKing) { [INFO] [stdout] 467 | | if !get_bit!(self.get_occupancies(), Square::f8) [INFO] [stdout] 468 | | && !get_bit!(self.get_occupancies(), Square::g8) [INFO] [stdout] ... | [INFO] [stdout] 487 | | } [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] 466 ~ if self.castle.can_castle(Castle::BlackKing) [INFO] [stdout] 467 ~ && !get_bit!(self.get_occupancies(), Square::f8) [INFO] [stdout] 468 | && !get_bit!(self.get_occupancies(), Square::g8) [INFO] [stdout] ... [INFO] [stdout] 485 | } [INFO] [stdout] 486 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MoveList` [INFO] [stdout] --> src/engine/move.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 137 | / pub fn new() -> Self { [INFO] [stdout] 138 | | let moves = [Move::default(); 256]; [INFO] [stdout] 139 | | let count = 0; [INFO] [stdout] 140 | | Self { moves, count } [INFO] [stdout] 141 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 136 + impl Default for MoveList { [INFO] [stdout] 137 + fn default() -> Self { [INFO] [stdout] 138 + Self::new() [INFO] [stdout] 139 + } [INFO] [stdout] 140 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:467:29 [INFO] [stdout] | [INFO] [stdout] 467 | / ... if !get_bit!(self.get_occupancies(), Square::f8) [INFO] [stdout] 468 | | ... && !get_bit!(self.get_occupancies(), Square::g8) [INFO] [stdout] 469 | | ... { [INFO] [stdout] 470 | | ... if !self.is_square_attacked(Square::e8, Color::White) [INFO] [stdout] ... | [INFO] [stdout] 486 | | ... } [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] 468 ~ && !get_bit!(self.get_occupancies(), Square::g8) [INFO] [stdout] 469 ~ && !self.is_square_attacked(Square::e8, Color::White) [INFO] [stdout] 470 | && !self.is_square_attacked(Square::f8, Color::White) [INFO] [stdout] ... [INFO] [stdout] 483 | )); [INFO] [stdout] 484 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:490:25 [INFO] [stdout] | [INFO] [stdout] 490 | / if self.castle.can_castle(Castle::BlackQueen) { [INFO] [stdout] 491 | | if !get_bit!(self.get_occupancies(), Square::d8) [INFO] [stdout] 492 | | && !get_bit!(self.get_occupancies(), Square::c8) [INFO] [stdout] 493 | | && !get_bit!(self.get_occupancies(), Square::b8) [INFO] [stdout] ... | [INFO] [stdout] 512 | | } [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] 490 ~ if self.castle.can_castle(Castle::BlackQueen) [INFO] [stdout] 491 ~ && !get_bit!(self.get_occupancies(), Square::d8) [INFO] [stdout] 492 | && !get_bit!(self.get_occupancies(), Square::c8) [INFO] [stdout] ... [INFO] [stdout] 510 | } [INFO] [stdout] 511 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:491:29 [INFO] [stdout] | [INFO] [stdout] 491 | / ... if !get_bit!(self.get_occupancies(), Square::d8) [INFO] [stdout] 492 | | ... && !get_bit!(self.get_occupancies(), Square::c8) [INFO] [stdout] 493 | | ... && !get_bit!(self.get_occupancies(), Square::b8) [INFO] [stdout] ... | [INFO] [stdout] 511 | | ... } [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] 493 ~ && !get_bit!(self.get_occupancies(), Square::b8) [INFO] [stdout] 494 ~ && !self.is_square_attacked(Square::e8, Color::White) [INFO] [stdout] 495 | && !self.is_square_attacked(Square::d8, Color::White) [INFO] [stdout] ... [INFO] [stdout] 508 | )); [INFO] [stdout] 509 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `promoted_piece` after checking its variant with `is_some` [INFO] [stdout] --> src/engine/move.rs:228:44 [INFO] [stdout] | [INFO] [stdout] 224 | if promoted_piece.is_some() { [INFO] [stdout] | --------------------------- help: try: `if let Some() = promoted_piece` [INFO] [stdout] ... [INFO] [stdout] 228 | set_bit!(self.board.boards[promoted_piece.unwrap() as usize], target); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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/engine/move.rs:312:17 [INFO] [stdout] | [INFO] [stdout] 312 | return false; [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] 312 - return false; [INFO] [stdout] 312 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/move.rs:314:17 [INFO] [stdout] | [INFO] [stdout] 314 | return true; [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] 314 - return true; [INFO] [stdout] 314 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/move.rs:320:17 [INFO] [stdout] | [INFO] [stdout] 320 | return self.make_move(m, MoveType::AllMoves); [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] 320 - return self.make_move(m, MoveType::AllMoves); [INFO] [stdout] 320 + self.make_move(m, MoveType::AllMoves) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/move.rs:323:17 [INFO] [stdout] | [INFO] [stdout] 323 | return false; [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] 323 - return false; [INFO] [stdout] 323 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/perft.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/perft.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/engine/perft.rs:56:32 [INFO] [stdout] | [INFO] [stdout] 56 | let cumulative_nodes = board_state.nodes.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `board_state.nodes` [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 boolean expression can be simplified [INFO] [stdout] --> src/engine/move_gen.rs:29:32 [INFO] [stdout] | [INFO] [stdout] 29 | ... if !(target > Square::h8 as i32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(target <= Square::h8 as i32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/engine/move_gen.rs:276:32 [INFO] [stdout] | [INFO] [stdout] 276 | ... if !(target < Square::a1 as i32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(target >= Square::a1 as i32)` [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 `self.en_passant_sq` after checking its variant with `is_some` [INFO] [stdout] --> src/engine/move_gen.rs:193:47 [INFO] [stdout] | [INFO] [stdout] 190 | ... if self.en_passant_sq.is_some() { [INFO] [stdout] | ------------------------------- help: try: `if let Some() = self.en_passant_sq` [INFO] [stdout] ... [INFO] [stdout] 193 | ... & (ONE << self.en_passant_sq.unwrap() as u64); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `self.en_passant_sq` after checking its variant with `is_some` [INFO] [stdout] --> src/engine/move_gen.rs:440:47 [INFO] [stdout] | [INFO] [stdout] 437 | ... if self.en_passant_sq.is_some() { [INFO] [stdout] | ------------------------------- help: try: `if let Some() = self.en_passant_sq` [INFO] [stdout] ... [INFO] [stdout] 440 | ... & (ONE << self.en_passant_sq.unwrap() as u64); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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/move_gen.rs:220:25 [INFO] [stdout] | [INFO] [stdout] 220 | / if self.castle.can_castle(Castle::WhiteKing) { [INFO] [stdout] 221 | | if !get_bit!(self.get_occupancies(), Square::f1) [INFO] [stdout] 222 | | && !get_bit!(self.get_occupancies(), Square::g1) [INFO] [stdout] ... | [INFO] [stdout] 241 | | } [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] 220 ~ if self.castle.can_castle(Castle::WhiteKing) [INFO] [stdout] 221 ~ && !get_bit!(self.get_occupancies(), Square::f1) [INFO] [stdout] 222 | && !get_bit!(self.get_occupancies(), Square::g1) [INFO] [stdout] ... [INFO] [stdout] 239 | } [INFO] [stdout] 240 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:221:29 [INFO] [stdout] | [INFO] [stdout] 221 | / ... if !get_bit!(self.get_occupancies(), Square::f1) [INFO] [stdout] 222 | | ... && !get_bit!(self.get_occupancies(), Square::g1) [INFO] [stdout] 223 | | ... { [INFO] [stdout] 224 | | ... if !self.is_square_attacked(Square::e1, Color::Black) [INFO] [stdout] ... | [INFO] [stdout] 240 | | ... } [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] 222 ~ && !get_bit!(self.get_occupancies(), Square::g1) [INFO] [stdout] 223 ~ && !self.is_square_attacked(Square::e1, Color::Black) [INFO] [stdout] 224 | && !self.is_square_attacked(Square::f1, Color::Black) [INFO] [stdout] ... [INFO] [stdout] 237 | )); [INFO] [stdout] 238 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:244:25 [INFO] [stdout] | [INFO] [stdout] 244 | / if self.castle.can_castle(Castle::WhiteQueen) { [INFO] [stdout] 245 | | if !get_bit!(self.get_occupancies(), Square::d1) [INFO] [stdout] 246 | | && !get_bit!(self.get_occupancies(), Square::c1) [INFO] [stdout] 247 | | && !get_bit!(self.get_occupancies(), Square::b1) [INFO] [stdout] ... | [INFO] [stdout] 266 | | } [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] 244 ~ if self.castle.can_castle(Castle::WhiteQueen) [INFO] [stdout] 245 ~ && !get_bit!(self.get_occupancies(), Square::d1) [INFO] [stdout] 246 | && !get_bit!(self.get_occupancies(), Square::c1) [INFO] [stdout] ... [INFO] [stdout] 264 | } [INFO] [stdout] 265 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:245:29 [INFO] [stdout] | [INFO] [stdout] 245 | / ... if !get_bit!(self.get_occupancies(), Square::d1) [INFO] [stdout] 246 | | ... && !get_bit!(self.get_occupancies(), Square::c1) [INFO] [stdout] 247 | | ... && !get_bit!(self.get_occupancies(), Square::b1) [INFO] [stdout] ... | [INFO] [stdout] 265 | | ... } [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] 247 ~ && !get_bit!(self.get_occupancies(), Square::b1) [INFO] [stdout] 248 ~ && !self.is_square_attacked(Square::e1, Color::Black) [INFO] [stdout] 249 | && !self.is_square_attacked(Square::d1, Color::Black) [INFO] [stdout] ... [INFO] [stdout] 262 | )); [INFO] [stdout] 263 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:466:25 [INFO] [stdout] | [INFO] [stdout] 466 | / if self.castle.can_castle(Castle::BlackKing) { [INFO] [stdout] 467 | | if !get_bit!(self.get_occupancies(), Square::f8) [INFO] [stdout] 468 | | && !get_bit!(self.get_occupancies(), Square::g8) [INFO] [stdout] ... | [INFO] [stdout] 487 | | } [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] 466 ~ if self.castle.can_castle(Castle::BlackKing) [INFO] [stdout] 467 ~ && !get_bit!(self.get_occupancies(), Square::f8) [INFO] [stdout] 468 | && !get_bit!(self.get_occupancies(), Square::g8) [INFO] [stdout] ... [INFO] [stdout] 485 | } [INFO] [stdout] 486 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:467:29 [INFO] [stdout] | [INFO] [stdout] 467 | / ... if !get_bit!(self.get_occupancies(), Square::f8) [INFO] [stdout] 468 | | ... && !get_bit!(self.get_occupancies(), Square::g8) [INFO] [stdout] 469 | | ... { [INFO] [stdout] 470 | | ... if !self.is_square_attacked(Square::e8, Color::White) [INFO] [stdout] ... | [INFO] [stdout] 486 | | ... } [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] 468 ~ && !get_bit!(self.get_occupancies(), Square::g8) [INFO] [stdout] 469 ~ && !self.is_square_attacked(Square::e8, Color::White) [INFO] [stdout] 470 | && !self.is_square_attacked(Square::f8, Color::White) [INFO] [stdout] ... [INFO] [stdout] 483 | )); [INFO] [stdout] 484 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:490:25 [INFO] [stdout] | [INFO] [stdout] 490 | / if self.castle.can_castle(Castle::BlackQueen) { [INFO] [stdout] 491 | | if !get_bit!(self.get_occupancies(), Square::d8) [INFO] [stdout] 492 | | && !get_bit!(self.get_occupancies(), Square::c8) [INFO] [stdout] 493 | | && !get_bit!(self.get_occupancies(), Square::b8) [INFO] [stdout] ... | [INFO] [stdout] 512 | | } [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] 490 ~ if self.castle.can_castle(Castle::BlackQueen) [INFO] [stdout] 491 ~ && !get_bit!(self.get_occupancies(), Square::d8) [INFO] [stdout] 492 | && !get_bit!(self.get_occupancies(), Square::c8) [INFO] [stdout] ... [INFO] [stdout] 510 | } [INFO] [stdout] 511 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/engine/move_gen.rs:491:29 [INFO] [stdout] | [INFO] [stdout] 491 | / ... if !get_bit!(self.get_occupancies(), Square::d8) [INFO] [stdout] 492 | | ... && !get_bit!(self.get_occupancies(), Square::c8) [INFO] [stdout] 493 | | ... && !get_bit!(self.get_occupancies(), Square::b8) [INFO] [stdout] ... | [INFO] [stdout] 511 | | ... } [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] 493 ~ && !get_bit!(self.get_occupancies(), Square::b8) [INFO] [stdout] 494 ~ && !self.is_square_attacked(Square::e8, Color::White) [INFO] [stdout] 495 | && !self.is_square_attacked(Square::d8, Color::White) [INFO] [stdout] ... [INFO] [stdout] 508 | )); [INFO] [stdout] 509 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/uci.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | return Err("Illegal move.".to_string()); [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] 127 - return Err("Illegal move.".to_string()); [INFO] [stdout] 127 + Err("Illegal move.".to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/uci.rs:98:18 [INFO] [stdout] | [INFO] [stdout] 98 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/engine/uci.rs:170:43 [INFO] [stdout] | [INFO] [stdout] 170 | let parts: Vec<&str> = go_command.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/perft.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/perft.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/engine/perft.rs:56:32 [INFO] [stdout] | [INFO] [stdout] 56 | let cumulative_nodes = board_state.nodes.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `board_state.nodes` [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 looks like you are swapping elements of `move_list.moves` manually [INFO] [stdout] --> src/engine/search.rs:78:21 [INFO] [stdout] | [INFO] [stdout] 78 | / let temp_move = move_list.moves[current_move]; [INFO] [stdout] 79 | | move_list.moves[current_move] = move_list.moves[next_move]; [INFO] [stdout] 80 | | move_list.moves[next_move] = temp_move; [INFO] [stdout] | |___________________________________________________________^ help: try: `move_list.moves.swap(current_move, next_move);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/search.rs:101:18 [INFO] [stdout] | [INFO] [stdout] 101 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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/engine/search.rs:224:9 [INFO] [stdout] | [INFO] [stdout] 224 | return alpha; [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] 224 - return alpha; [INFO] [stdout] 224 + alpha [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/search.rs:173:18 [INFO] [stdout] | [INFO] [stdout] 173 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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: the loop variable `color` is used to index `MATERIAL_SCORE` [INFO] [stdout] --> src/engine/evaluate.rs:115:22 [INFO] [stdout] | [INFO] [stdout] 115 | for color in (Color::White as usize)..=(Color::Black as usize) { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 115 - for color in (Color::White as usize)..=(Color::Black as usize) { [INFO] [stdout] 115 + for (color, ) in MATERIAL_SCORE.iter().enumerate().take(Color::Black as usize + 1).skip((Color::White as usize)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `bishop_relevant_bits` should have an upper case name [INFO] [stdout] --> src/engine/attacks/slider_attacks/bishop_attacks.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub const bishop_relevant_bits: [usize; 64] = [ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper case: `BISHOP_RELEVANT_BITS` [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: constant `rook_relevant_bits` should have an upper case name [INFO] [stdout] --> src/engine/attacks/slider_attacks/rook_attacks.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | pub const rook_relevant_bits: [usize; 64] = [ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper case: `ROOK_RELEVANT_BITS` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engine/uci.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | return Err("Illegal move.".to_string()); [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] 127 - return Err("Illegal move.".to_string()); [INFO] [stdout] 127 + Err("Illegal move.".to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/uci.rs:98:18 [INFO] [stdout] | [INFO] [stdout] 98 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/engine/uci.rs:170:43 [INFO] [stdout] | [INFO] [stdout] 170 | let parts: Vec<&str> = go_command.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `move_list.moves` manually [INFO] [stdout] --> src/engine/search.rs:78:21 [INFO] [stdout] | [INFO] [stdout] 78 | / let temp_move = move_list.moves[current_move]; [INFO] [stdout] 79 | | move_list.moves[current_move] = move_list.moves[next_move]; [INFO] [stdout] 80 | | move_list.moves[next_move] = temp_move; [INFO] [stdout] | |___________________________________________________________^ help: try: `move_list.moves.swap(current_move, next_move);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/search.rs:101:18 [INFO] [stdout] | [INFO] [stdout] 101 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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/engine/search.rs:224:9 [INFO] [stdout] | [INFO] [stdout] 224 | return alpha; [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] 224 - return alpha; [INFO] [stdout] 224 + alpha [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engine/search.rs:173:18 [INFO] [stdout] | [INFO] [stdout] 173 | for m in (&move_list.moves[..move_list.count]).to_vec() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `move_list.moves[..move_list.count]` [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: the loop variable `color` is used to index `MATERIAL_SCORE` [INFO] [stdout] --> src/engine/evaluate.rs:115:22 [INFO] [stdout] | [INFO] [stdout] 115 | for color in (Color::White as usize)..=(Color::Black as usize) { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 115 - for color in (Color::White as usize)..=(Color::Black as usize) { [INFO] [stdout] 115 + for (color, ) in MATERIAL_SCORE.iter().enumerate().take(Color::Black as usize + 1).skip((Color::White as usize)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `bishop_relevant_bits` should have an upper case name [INFO] [stdout] --> src/engine/attacks/slider_attacks/bishop_attacks.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub const bishop_relevant_bits: [usize; 64] = [ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper case: `BISHOP_RELEVANT_BITS` [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: constant `rook_relevant_bits` should have an upper case name [INFO] [stdout] --> src/engine/attacks/slider_attacks/rook_attacks.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | pub const rook_relevant_bits: [usize; 64] = [ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper case: `ROOK_RELEVANT_BITS` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> tests/lsb.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `midas::engine::board::Color` [INFO] [stdout] --> tests/knight_attacks.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use midas::engine::board::Color; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `io::stdin` and `time::Instant` [INFO] [stdout] --> src/main.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{io::stdin, mem::size_of, time::Instant}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Bitboard`, `Board`, `Castle`, `Color`, `EMPTY`, `LS1B`, `MoveList`, `MoveType`, `Move`, `ONE`, `Piece`, `attacks::AttackTables`, `attacks::slider_attacks::SliderAttacks`, `move_gen::*`, `perft_driver`, `perft_tester`, `print_bitboard`, `search::*`, `set_bit`, `square::Square`, and `uci` [INFO] [stdout] --> src/main.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | attacks::slider_attacks::SliderAttacks, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 6 | attacks::AttackTables, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 7 | bitboard::{print_bitboard, Bitboard, EMPTY, LS1B, ONE}, [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^ ^^^ [INFO] [stdout] 8 | board::{Board, BoardState, Castle, Color, Piece}, [INFO] [stdout] | ^^^^^ ^^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] 9 | fen::*, [INFO] [stdout] 10 | move_gen::*, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 11 | perft::{perft_driver, perft_tester}, [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] 12 | r#move::{Move, MoveList, MoveType}, [INFO] [stdout] | ^^^^ ^^^^^^^^ ^^^^^^^^ [INFO] [stdout] 13 | uci, [INFO] [stdout] | ^^^ [INFO] [stdout] 14 | search::*, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 15 | square::Square, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 16 | }, [INFO] [stdout] 17 | set_bit, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fen` [INFO] [stdout] --> src/main.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | let fen = FEN("rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 1 "); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_fen` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> tests/lsb.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rng` [INFO] [stdout] --> tests/lsb.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_rng` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `io::stdin` and `time::Instant` [INFO] [stdout] --> src/main.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{io::stdin, mem::size_of, time::Instant}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Bitboard`, `Board`, `Castle`, `Color`, `EMPTY`, `LS1B`, `MoveList`, `MoveType`, `Move`, `ONE`, `Piece`, `attacks::AttackTables`, `attacks::slider_attacks::SliderAttacks`, `move_gen::*`, `perft_driver`, `perft_tester`, `print_bitboard`, `search::*`, `set_bit`, `square::Square`, and `uci` [INFO] [stdout] --> src/main.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | attacks::slider_attacks::SliderAttacks, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 6 | attacks::AttackTables, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 7 | bitboard::{print_bitboard, Bitboard, EMPTY, LS1B, ONE}, [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^ ^^^ [INFO] [stdout] 8 | board::{Board, BoardState, Castle, Color, Piece}, [INFO] [stdout] | ^^^^^ ^^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] 9 | fen::*, [INFO] [stdout] 10 | move_gen::*, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 11 | perft::{perft_driver, perft_tester}, [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] 12 | r#move::{Move, MoveList, MoveType}, [INFO] [stdout] | ^^^^ ^^^^^^^^ ^^^^^^^^ [INFO] [stdout] 13 | uci, [INFO] [stdout] | ^^^ [INFO] [stdout] 14 | search::*, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 15 | square::Square, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 16 | }, [INFO] [stdout] 17 | set_bit, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fen` [INFO] [stdout] --> src/main.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | let fen = FEN("rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 1 "); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_fen` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.56s [INFO] running `Command { std: "docker" "inspect" "94a3c89b8494bab77d3bc27d308af39ebbe8f12f1bf4362e45a8093f52a04c89", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "94a3c89b8494bab77d3bc27d308af39ebbe8f12f1bf4362e45a8093f52a04c89", kill_on_drop: false }` [INFO] [stdout] 94a3c89b8494bab77d3bc27d308af39ebbe8f12f1bf4362e45a8093f52a04c89