[INFO] cloning repository https://github.com/merhametsize/masca [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/merhametsize/masca" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmerhametsize%2Fmasca", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmerhametsize%2Fmasca'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6101ffed74bbee488bce2adc9be0fd03ef527e0e [INFO] linting merhametsize/masca against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmerhametsize%2Fmasca" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-2-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/merhametsize/masca [INFO] finished tweaking git repo https://github.com/merhametsize/masca [INFO] tweaked toml for git repo https://github.com/merhametsize/masca written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/merhametsize/masca 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/merhametsize/masca 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-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 75794eba4df3833a26a1c23e98cd263483b5797d851d47c8744208c140aaab3c [INFO] running `Command { std: "docker" "start" "-a" "75794eba4df3833a26a1c23e98cd263483b5797d851d47c8744208c140aaab3c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "75794eba4df3833a26a1c23e98cd263483b5797d851d47c8744208c140aaab3c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "75794eba4df3833a26a1c23e98cd263483b5797d851d47c8744208c140aaab3c", kill_on_drop: false }` [INFO] [stdout] 75794eba4df3833a26a1c23e98cd263483b5797d851d47c8744208c140aaab3c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0b7461955d4f9b8d4b58f027c8f712f860476154ba5bcee248e20694fec5c3fa [INFO] running `Command { std: "docker" "start" "-a" "0b7461955d4f9b8d4b58f027c8f712f860476154ba5bcee248e20694fec5c3fa", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.180 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling zerocopy v0.8.33 [INFO] [stderr] Checking cfg-if v1.0.4 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking masca v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/search.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | board: board, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/search.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | mvv_lva_table: mvv_lva_table, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `mvv_lva_table` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/search.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | board: board, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/search.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | mvv_lva_table: mvv_lva_table, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `mvv_lva_table` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/attack.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:407:23 [INFO] [stdout] | [INFO] [stdout] 407 | debug_assert!(!self.mailbox[sq].is_none()); // There must be a piece in the square [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.mailbox[sq].is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/board.rs:463:75 [INFO] [stdout] | [INFO] [stdout] 463 | self.state_stack[self.state_idx].phase = eval::compute_game_phase(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/fen.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn from_fen(&mut self, fen: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/magics.rs:129:42 [INFO] [stdout] | [INFO] [stdout] 129 | masks: &[Bitboard; 64], attacks: &Vec>, magics: &mut [u64; 64], offsets: &mut [usize; 64], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 129 - masks: &[Bitboard; 64], attacks: &Vec>, magics: &mut [u64; 64], offsets: &mut [usize; 64], [INFO] [stdout] 129 + masks: &[Bitboard; 64], attacks: &[Vec], magics: &mut [u64; 64], offsets: &mut [usize; 64], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/magics.rs:226:21 [INFO] [stdout] | [INFO] [stdout] 226 | (0..64).map(|idx| Square::new(idx)).map(|sq| Self::attacks_for_square(sq, &ROOK_DELTAS)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Square::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/magics.rs:232:21 [INFO] [stdout] | [INFO] [stdout] 232 | (0..64).map(|idx| Square::new(idx)).map(|sq| Self::attacks_for_square(sq, &BISHOP_DELTAS)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Square::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/magics.rs:280:50 [INFO] [stdout] | [INFO] [stdout] 280 | while to_rank >= 0 && to_rank < 8 && to_file >= 0 && to_file < 8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0..8).contains(&to_file)` [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 `Range::contains` implementation [INFO] [stdout] --> src/magics.rs:280:19 [INFO] [stdout] | [INFO] [stdout] 280 | while to_rank >= 0 && to_rank < 8 && to_file >= 0 && to_file < 8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0..8).contains(&to_rank)` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/movegen.rs:170:32 [INFO] [stdout] | [INFO] [stdout] 170 | Tor::get_attacks(from, &board) | Alfè::get_attacks(from, &board) [INFO] [stdout] | ^^^^^^ help: change this to: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/movegen.rs:170:66 [INFO] [stdout] | [INFO] [stdout] 170 | Tor::get_attacks(from, &board) | Alfè::get_attacks(from, &board) [INFO] [stdout] | ^^^^^^ help: change this to: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/movegen.rs:273:48 [INFO] [stdout] | [INFO] [stdout] 273 | let mut attacks = P::get_attacks(from, &board) & target_mask; [INFO] [stdout] | ^^^^^^ help: change this to: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/movegen.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 384 | / if rights.can_castle(occupancy, Color::White, true) { [INFO] [stdout] 385 | | if !board.is_square_attacked(Square::E1, Color::Black) // King square first for tiny speedup [INFO] [stdout] 386 | | && !board.is_square_attacked(Square::F1, Color::Black) [INFO] [stdout] 387 | | && !board.is_square_attacked(Square::G1, Color::Black) [INFO] [stdout] ... | [INFO] [stdout] 391 | | } [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] 384 ~ if rights.can_castle(occupancy, Color::White, true) [INFO] [stdout] 385 ~ && !board.is_square_attacked(Square::E1, Color::Black) // King square first for tiny speedup [INFO] [stdout] 386 | && !board.is_square_attacked(Square::F1, Color::Black) [INFO] [stdout] ... [INFO] [stdout] 389 | moves.push(Move::new_special(Square::E1, Square::G1, MoveKind::KingCastle)); [INFO] [stdout] 390 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/movegen.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | / if rights.can_castle(occupancy, Color::White, false) { [INFO] [stdout] 395 | | if !board.is_square_attacked(Square::E1, Color::Black) // King square first for tiny speedup [INFO] [stdout] 396 | | && !board.is_square_attacked(Square::D1, Color::Black) [INFO] [stdout] 397 | | && !board.is_square_attacked(Square::C1, Color::Black) [INFO] [stdout] ... | [INFO] [stdout] 401 | | } [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] 394 ~ if rights.can_castle(occupancy, Color::White, false) [INFO] [stdout] 395 ~ && !board.is_square_attacked(Square::E1, Color::Black) // King square first for tiny speedup [INFO] [stdout] 396 | && !board.is_square_attacked(Square::D1, Color::Black) [INFO] [stdout] ... [INFO] [stdout] 399 | moves.push(Move::new_special(Square::E1, Square::C1, MoveKind::QueenCastle)); [INFO] [stdout] 400 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/movegen.rs:404:9 [INFO] [stdout] | [INFO] [stdout] 404 | / if rights.can_castle(occupancy, Color::Black, true) { [INFO] [stdout] 405 | | if !board.is_square_attacked(Square::E8, Color::White) // King square first for tiny speedup [INFO] [stdout] 406 | | && !board.is_square_attacked(Square::F8, Color::White) [INFO] [stdout] 407 | | && !board.is_square_attacked(Square::G8, Color::White) [INFO] [stdout] ... | [INFO] [stdout] 411 | | } [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] 404 ~ if rights.can_castle(occupancy, Color::Black, true) [INFO] [stdout] 405 ~ && !board.is_square_attacked(Square::E8, Color::White) // King square first for tiny speedup [INFO] [stdout] 406 | && !board.is_square_attacked(Square::F8, Color::White) [INFO] [stdout] ... [INFO] [stdout] 409 | moves.push(Move::new_special(Square::E8, Square::G8, MoveKind::KingCastle)); [INFO] [stdout] 410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/movegen.rs:414:9 [INFO] [stdout] | [INFO] [stdout] 414 | / if rights.can_castle(occupancy, Color::Black, false) { [INFO] [stdout] 415 | | if !board.is_square_attacked(Square::E8, Color::White) // King square first for tiny speedup [INFO] [stdout] 416 | | && !board.is_square_attacked(Square::D8, Color::White) [INFO] [stdout] 417 | | && !board.is_square_attacked(Square::C8, Color::White) [INFO] [stdout] ... | [INFO] [stdout] 421 | | } [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] 414 ~ if rights.can_castle(occupancy, Color::Black, false) [INFO] [stdout] 415 ~ && !board.is_square_attacked(Square::E8, Color::White) // King square first for tiny speedup [INFO] [stdout] 416 | && !board.is_square_attacked(Square::D8, Color::White) [INFO] [stdout] ... [INFO] [stdout] 419 | moves.push(Move::new_special(Square::E8, Square::C8, MoveKind::QueenCastle)); [INFO] [stdout] 420 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/search.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `score_moves` doesn't need a mutable reference [INFO] [stdout] --> src/search.rs:143:35 [INFO] [stdout] | [INFO] [stdout] 143 | self.score_moves::(&mut moves, ply, &mut scores); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 143 - self.score_moves::(&mut moves, ply, &mut scores); [INFO] [stdout] 143 + self.score_moves::(&moves, ply, &mut scores); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `scores` [INFO] [stdout] --> src/search.rs:334:18 [INFO] [stdout] | [INFO] [stdout] 334 | for i in 0..n { [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] 334 - for i in 0..n { [INFO] [stdout] 334 + for (i, ) in scores.iter_mut().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `depth` is used to index `table` [INFO] [stdout] --> src/search.rs:408:22 [INFO] [stdout] | [INFO] [stdout] 408 | for depth in 1..64 { [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] 408 - for depth in 1..64 { [INFO] [stdout] 408 + for (depth, ) in table.iter_mut().enumerate().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `move_number` is used to index `table` [INFO] [stdout] --> src/search.rs:409:32 [INFO] [stdout] | [INFO] [stdout] 409 | for move_number in 1..64 { [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] 409 - for move_number in 1..64 { [INFO] [stdout] 409 + for (move_number, ) in table.iter_mut().enumerate().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/types/bitboard.rs:105:1 [INFO] [stdout] | [INFO] [stdout] 105 | / impl Default for Bitboard { [INFO] [stdout] 106 | | fn default() -> Self { [INFO] [stdout] 107 | | Bitboard(0u64) [INFO] [stdout] 108 | | } [INFO] [stdout] 109 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 15 + #[derive(Default)] [INFO] [stdout] 16 | pub struct Bitboard(pub u64); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/types/castling.rs:125:1 [INFO] [stdout] | [INFO] [stdout] 125 | / impl Default for CastlingRights { [INFO] [stdout] 126 | | fn default() -> Self { [INFO] [stdout] 127 | | Self { encoding: 0 } [INFO] [stdout] 128 | | } [INFO] [stdout] 129 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 51 + #[derive(Default)] [INFO] [stdout] 52 | pub struct CastlingRights { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/types/square.rs:115:20 [INFO] [stdout] | [INFO] [stdout] 115 | let file = (idx % 8) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(idx % 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/types/square.rs:116:20 [INFO] [stdout] | [INFO] [stdout] 116 | let rank = (idx / 8) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(idx / 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [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/uci.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | / match args[i] { [INFO] [stdout] 125 | | "depth" => { [INFO] [stdout] 126 | | if i + 1 < args.len() { [INFO] [stdout] 127 | | depth = args[i + 1].parse().unwrap_or(depth); [INFO] [stdout] ... | [INFO] [stdout] 131 | | _ => {} [INFO] [stdout] 132 | | } [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] 124 ~ if args[i] == "depth" { [INFO] [stdout] 125 + if i + 1 < args.len() { [INFO] [stdout] 126 + depth = args[i + 1].parse().unwrap_or(depth); [INFO] [stdout] 127 + } [INFO] [stdout] 128 + i += 1; [INFO] [stdout] 129 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/zobrist.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let side; [INFO] [stdout] | ^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 56 | side = rng.next_u64(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ initialised here [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 `side` here [INFO] [stdout] | [INFO] [stdout] 34 ~ [INFO] [stdout] 35 | [INFO] [stdout] ... [INFO] [stdout] 55 | // Side [INFO] [stdout] 56 ~ let side = rng.next_u64(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `castling` [INFO] [stdout] --> src/zobrist.rs:46:18 [INFO] [stdout] | [INFO] [stdout] 46 | for i in 0..NUM_CASTLING { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 46 - for i in 0..NUM_CASTLING { [INFO] [stdout] 46 + for in castling.iter_mut().take(NUM_CASTLING) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `en_passant` [INFO] [stdout] --> src/zobrist.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | for i in 0..NUM_EP_FILES { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 51 - for i in 0..NUM_EP_FILES { [INFO] [stdout] 51 + for in en_passant.iter_mut().take(NUM_EP_FILES) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/attack.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:407:23 [INFO] [stdout] | [INFO] [stdout] 407 | debug_assert!(!self.mailbox[sq].is_none()); // There must be a piece in the square [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.mailbox[sq].is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/board.rs:463:75 [INFO] [stdout] | [INFO] [stdout] 463 | self.state_stack[self.state_idx].phase = eval::compute_game_phase(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/fen.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn from_fen(&mut self, fen: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/magics.rs:129:42 [INFO] [stdout] | [INFO] [stdout] 129 | masks: &[Bitboard; 64], attacks: &Vec>, magics: &mut [u64; 64], offsets: &mut [usize; 64], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 129 - masks: &[Bitboard; 64], attacks: &Vec>, magics: &mut [u64; 64], offsets: &mut [usize; 64], [INFO] [stdout] 129 + masks: &[Bitboard; 64], attacks: &[Vec], magics: &mut [u64; 64], offsets: &mut [usize; 64], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/magics.rs:226:21 [INFO] [stdout] | [INFO] [stdout] 226 | (0..64).map(|idx| Square::new(idx)).map(|sq| Self::attacks_for_square(sq, &ROOK_DELTAS)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Square::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/magics.rs:232:21 [INFO] [stdout] | [INFO] [stdout] 232 | (0..64).map(|idx| Square::new(idx)).map(|sq| Self::attacks_for_square(sq, &BISHOP_DELTAS)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Square::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/magics.rs:280:50 [INFO] [stdout] | [INFO] [stdout] 280 | while to_rank >= 0 && to_rank < 8 && to_file >= 0 && to_file < 8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0..8).contains(&to_file)` [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 `Range::contains` implementation [INFO] [stdout] --> src/magics.rs:280:19 [INFO] [stdout] | [INFO] [stdout] 280 | while to_rank >= 0 && to_rank < 8 && to_file >= 0 && to_file < 8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0..8).contains(&to_rank)` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/movegen.rs:170:32 [INFO] [stdout] | [INFO] [stdout] 170 | Tor::get_attacks(from, &board) | Alfè::get_attacks(from, &board) [INFO] [stdout] | ^^^^^^ help: change this to: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/movegen.rs:170:66 [INFO] [stdout] | [INFO] [stdout] 170 | Tor::get_attacks(from, &board) | Alfè::get_attacks(from, &board) [INFO] [stdout] | ^^^^^^ help: change this to: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/movegen.rs:273:48 [INFO] [stdout] | [INFO] [stdout] 273 | let mut attacks = P::get_attacks(from, &board) & target_mask; [INFO] [stdout] | ^^^^^^ help: change this to: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/movegen.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 384 | / if rights.can_castle(occupancy, Color::White, true) { [INFO] [stdout] 385 | | if !board.is_square_attacked(Square::E1, Color::Black) // King square first for tiny speedup [INFO] [stdout] 386 | | && !board.is_square_attacked(Square::F1, Color::Black) [INFO] [stdout] 387 | | && !board.is_square_attacked(Square::G1, Color::Black) [INFO] [stdout] ... | [INFO] [stdout] 391 | | } [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] 384 ~ if rights.can_castle(occupancy, Color::White, true) [INFO] [stdout] 385 ~ && !board.is_square_attacked(Square::E1, Color::Black) // King square first for tiny speedup [INFO] [stdout] 386 | && !board.is_square_attacked(Square::F1, Color::Black) [INFO] [stdout] ... [INFO] [stdout] 389 | moves.push(Move::new_special(Square::E1, Square::G1, MoveKind::KingCastle)); [INFO] [stdout] 390 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/movegen.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | / if rights.can_castle(occupancy, Color::White, false) { [INFO] [stdout] 395 | | if !board.is_square_attacked(Square::E1, Color::Black) // King square first for tiny speedup [INFO] [stdout] 396 | | && !board.is_square_attacked(Square::D1, Color::Black) [INFO] [stdout] 397 | | && !board.is_square_attacked(Square::C1, Color::Black) [INFO] [stdout] ... | [INFO] [stdout] 401 | | } [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] 394 ~ if rights.can_castle(occupancy, Color::White, false) [INFO] [stdout] 395 ~ && !board.is_square_attacked(Square::E1, Color::Black) // King square first for tiny speedup [INFO] [stdout] 396 | && !board.is_square_attacked(Square::D1, Color::Black) [INFO] [stdout] ... [INFO] [stdout] 399 | moves.push(Move::new_special(Square::E1, Square::C1, MoveKind::QueenCastle)); [INFO] [stdout] 400 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/movegen.rs:404:9 [INFO] [stdout] | [INFO] [stdout] 404 | / if rights.can_castle(occupancy, Color::Black, true) { [INFO] [stdout] 405 | | if !board.is_square_attacked(Square::E8, Color::White) // King square first for tiny speedup [INFO] [stdout] 406 | | && !board.is_square_attacked(Square::F8, Color::White) [INFO] [stdout] 407 | | && !board.is_square_attacked(Square::G8, Color::White) [INFO] [stdout] ... | [INFO] [stdout] 411 | | } [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] 404 ~ if rights.can_castle(occupancy, Color::Black, true) [INFO] [stdout] 405 ~ && !board.is_square_attacked(Square::E8, Color::White) // King square first for tiny speedup [INFO] [stdout] 406 | && !board.is_square_attacked(Square::F8, Color::White) [INFO] [stdout] ... [INFO] [stdout] 409 | moves.push(Move::new_special(Square::E8, Square::G8, MoveKind::KingCastle)); [INFO] [stdout] 410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/movegen.rs:414:9 [INFO] [stdout] | [INFO] [stdout] 414 | / if rights.can_castle(occupancy, Color::Black, false) { [INFO] [stdout] 415 | | if !board.is_square_attacked(Square::E8, Color::White) // King square first for tiny speedup [INFO] [stdout] 416 | | && !board.is_square_attacked(Square::D8, Color::White) [INFO] [stdout] 417 | | && !board.is_square_attacked(Square::C8, Color::White) [INFO] [stdout] ... | [INFO] [stdout] 421 | | } [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] 414 ~ if rights.can_castle(occupancy, Color::Black, false) [INFO] [stdout] 415 ~ && !board.is_square_attacked(Square::E8, Color::White) // King square first for tiny speedup [INFO] [stdout] 416 | && !board.is_square_attacked(Square::D8, Color::White) [INFO] [stdout] ... [INFO] [stdout] 419 | moves.push(Move::new_special(Square::E8, Square::C8, MoveKind::QueenCastle)); [INFO] [stdout] 420 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/search.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `score_moves` doesn't need a mutable reference [INFO] [stdout] --> src/search.rs:143:35 [INFO] [stdout] | [INFO] [stdout] 143 | self.score_moves::(&mut moves, ply, &mut scores); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 143 - self.score_moves::(&mut moves, ply, &mut scores); [INFO] [stdout] 143 + self.score_moves::(&moves, ply, &mut scores); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `scores` [INFO] [stdout] --> src/search.rs:334:18 [INFO] [stdout] | [INFO] [stdout] 334 | for i in 0..n { [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] 334 - for i in 0..n { [INFO] [stdout] 334 + for (i, ) in scores.iter_mut().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `depth` is used to index `table` [INFO] [stdout] --> src/search.rs:408:22 [INFO] [stdout] | [INFO] [stdout] 408 | for depth in 1..64 { [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] 408 - for depth in 1..64 { [INFO] [stdout] 408 + for (depth, ) in table.iter_mut().enumerate().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `move_number` is used to index `table` [INFO] [stdout] --> src/search.rs:409:32 [INFO] [stdout] | [INFO] [stdout] 409 | for move_number in 1..64 { [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] 409 - for move_number in 1..64 { [INFO] [stdout] 409 + for (move_number, ) in table.iter_mut().enumerate().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/types/bitboard.rs:105:1 [INFO] [stdout] | [INFO] [stdout] 105 | / impl Default for Bitboard { [INFO] [stdout] 106 | | fn default() -> Self { [INFO] [stdout] 107 | | Bitboard(0u64) [INFO] [stdout] 108 | | } [INFO] [stdout] 109 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 15 + #[derive(Default)] [INFO] [stdout] 16 | pub struct Bitboard(pub u64); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/types/castling.rs:125:1 [INFO] [stdout] | [INFO] [stdout] 125 | / impl Default for CastlingRights { [INFO] [stdout] 126 | | fn default() -> Self { [INFO] [stdout] 127 | | Self { encoding: 0 } [INFO] [stdout] 128 | | } [INFO] [stdout] 129 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 51 + #[derive(Default)] [INFO] [stdout] 52 | pub struct CastlingRights { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/types/square.rs:115:20 [INFO] [stdout] | [INFO] [stdout] 115 | let file = (idx % 8) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(idx % 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/types/square.rs:116:20 [INFO] [stdout] | [INFO] [stdout] 116 | let rank = (idx / 8) as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(idx / 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [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/uci.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | / match args[i] { [INFO] [stdout] 125 | | "depth" => { [INFO] [stdout] 126 | | if i + 1 < args.len() { [INFO] [stdout] 127 | | depth = args[i + 1].parse().unwrap_or(depth); [INFO] [stdout] ... | [INFO] [stdout] 131 | | _ => {} [INFO] [stdout] 132 | | } [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] 124 ~ if args[i] == "depth" { [INFO] [stdout] 125 + if i + 1 < args.len() { [INFO] [stdout] 126 + depth = args[i + 1].parse().unwrap_or(depth); [INFO] [stdout] 127 + } [INFO] [stdout] 128 + i += 1; [INFO] [stdout] 129 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/zobrist.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let side; [INFO] [stdout] | ^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 56 | side = rng.next_u64(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ initialised here [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 `side` here [INFO] [stdout] | [INFO] [stdout] 34 ~ [INFO] [stdout] 35 | [INFO] [stdout] ... [INFO] [stdout] 55 | // Side [INFO] [stdout] 56 ~ let side = rng.next_u64(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `castling` [INFO] [stdout] --> src/zobrist.rs:46:18 [INFO] [stdout] | [INFO] [stdout] 46 | for i in 0..NUM_CASTLING { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 46 - for i in 0..NUM_CASTLING { [INFO] [stdout] 46 + for in castling.iter_mut().take(NUM_CASTLING) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `en_passant` [INFO] [stdout] --> src/zobrist.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | for i in 0..NUM_EP_FILES { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 51 - for i in 0..NUM_EP_FILES { [INFO] [stdout] 51 + for in en_passant.iter_mut().take(NUM_EP_FILES) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.40s [INFO] running `Command { std: "docker" "inspect" "0b7461955d4f9b8d4b58f027c8f712f860476154ba5bcee248e20694fec5c3fa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0b7461955d4f9b8d4b58f027c8f712f860476154ba5bcee248e20694fec5c3fa", kill_on_drop: false }` [INFO] [stdout] 0b7461955d4f9b8d4b58f027c8f712f860476154ba5bcee248e20694fec5c3fa