[INFO] cloning repository https://github.com/asterful/chess [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/asterful/chess" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fasterful%2Fchess", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fasterful%2Fchess'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 704b19f28751bfb9c0cfe56af83ddfb25273c3cf [INFO] linting asterful/chess against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fasterful%2Fchess" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/asterful/chess [INFO] finished tweaking git repo https://github.com/asterful/chess [INFO] tweaked toml for git repo https://github.com/asterful/chess written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/asterful/chess 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/asterful/chess 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-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] c4902055c589b76a0260d702855456fd785ad49816dcefcf9037b4a8c77fb436 [INFO] running `Command { std: "docker" "start" "-a" "c4902055c589b76a0260d702855456fd785ad49816dcefcf9037b4a8c77fb436", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c4902055c589b76a0260d702855456fd785ad49816dcefcf9037b4a8c77fb436", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c4902055c589b76a0260d702855456fd785ad49816dcefcf9037b4a8c77fb436", kill_on_drop: false }` [INFO] [stdout] c4902055c589b76a0260d702855456fd785ad49816dcefcf9037b4a8c77fb436 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] a6ea8b305c7c6184e2a658de67e8e81edbfca481b305171b626035168153d9a5 [INFO] running `Command { std: "docker" "start" "-a" "a6ea8b305c7c6184e2a658de67e8e81edbfca481b305171b626035168153d9a5", kill_on_drop: false }` [INFO] [stderr] Checking chess v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/game.rs:1:21 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::{board::{self, Board}, position::Position}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/game.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | 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: unused variable: `board` [INFO] [stdout] --> src/engine.rs:3:18 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn make_move(board: &mut Board, from: Position, to: Position) -> Result<(), &str> { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_board` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `from` [INFO] [stdout] --> src/engine.rs:3:37 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn make_move(board: &mut Board, from: Position, to: Position) -> Result<(), &str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_from` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `to` [INFO] [stdout] --> src/engine.rs:3:53 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn make_move(board: &mut Board, from: Position, to: Position) -> Result<(), &str> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/game.rs:31:30 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn update(&mut self, message: GameMessage) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/frontend/cli.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | Ok(input) => {}, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `active_color`, `halfmove`, `fullmove`, `castling_rights`, and `en_passant` are never read [INFO] [stdout] --> src/board.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct Board { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 17 | squares: [Option; 64], [INFO] [stdout] 18 | active_color: Color, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 19 | halfmove: u16, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 20 | fullmove: u16, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 21 | castling_rights: CastlingRights, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 22 | en_passant: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/board.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl Board { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 30 | pub fn set_piece(&mut self, pos: Position, piece: Piece) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub fn remove_piece(&mut self, pos: Position) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn disable_castling_kingside(&mut self, color: Color) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn disable_castling_queenside(&mut self, color: Color) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | pub fn disable_all_castling(&mut self, color: Color) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 67 | pub fn queenside_castling_right(&self, color: Color) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | pub fn kingside_castling_right(&self, color: Color) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | pub fn increment_halfmove(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub fn reset_halfmove(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 89 | pub fn get_halfmove(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | pub fn increment_fullmove(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 97 | pub fn get_fullmove(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn switch_active_color(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | pub fn get_active_color(&self) -> Color { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 112 | pub fn set_en_passant(&mut self, pos: Position) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 116 | pub fn clear_en_passant(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 120 | pub fn get_en_passant(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple variants are never constructed [INFO] [stdout] --> src/position.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum Position { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] 3 | A1, B1, C1, D1, E1, F1, G1, H1, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 4 | A2, B2, C2, D2, E2, F2, G2, H2, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 5 | A3, B3, C3, D3, E3, F3, G3, H3, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 6 | A4, B4, C4, D4, E4, F4, G4, H4, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 7 | A5, B5, C5, D5, E5, F5, G5, H5, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 8 | A6, B6, C6, D6, E6, F6, G6, H6, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 9 | A7, B7, C7, D7, E7, F7, G7, H7, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 10 | A8, B8, C8, D8, E8, F8, G8, H8, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = note: `Position` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `index`, `from_index`, `from_str`, `row`, and `col` are never used [INFO] [stdout] --> src/position.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl Position { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn index(&self) -> u8 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn from_index(index: u8) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 156 | pub fn from_str(input: &str) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 226 | pub fn row(&self) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 230 | pub fn col(&self) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `make_move` is never used [INFO] [stdout] --> src/engine.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn make_move(board: &mut Board, from: Position, to: Position) -> Result<(), &str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `ShowingPieceLegalMoves`, `WaitingForTurn`, and `GameOver` are never constructed [INFO] [stdout] --> src/game.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum GameState { [INFO] [stdout] | --------- variants in this enum [INFO] [stdout] 5 | ShowingPieceLegalMoves, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 6 | WaitingForTurn, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 7 | PlayerTurn, [INFO] [stdout] 8 | GameOver, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `GameMessage` is never used [INFO] [stdout] --> src/game.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | pub enum GameMessage { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `state` is never read [INFO] [stdout] --> src/game.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct Game { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 19 | board: Board, [INFO] [stdout] 20 | state: GameState, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `update` and `get_state` are never used [INFO] [stdout] --> src/game.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 23 | impl Game { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn update(&mut self, message: GameMessage) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn get_state(&self) -> &GameState { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `update` is never used [INFO] [stdout] --> src/frontend/cli.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 11 | impl Client { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 35 | fn update(&mut self, input: &str) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `_squares` [INFO] [stdout] --> src/board.rs:139:18 [INFO] [stdout] | [INFO] [stdout] 139 | for i in 8..16 { [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 [INFO] [stdout] | [INFO] [stdout] 139 - for i in 8..16 { [INFO] [stdout] 139 + for in _squares.iter_mut().take(16).skip(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `_squares` [INFO] [stdout] --> src/board.rs:142:18 [INFO] [stdout] | [INFO] [stdout] 142 | for i in 48..56 { [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] 142 - for i in 48..56 { [INFO] [stdout] 142 + for in _squares.iter_mut().take(56).skip(48) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:180:12 [INFO] [stdout] | [INFO] [stdout] 180 | if self.white_kingside || self.white_queenside || self.black_kingside || self.white_queenside { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 180 - if self.white_kingside || self.white_queenside || self.black_kingside || self.white_queenside { [INFO] [stdout] 180 + if !(!self.white_kingside && !self.white_queenside && !self.black_kingside) { [INFO] [stdout] | [INFO] [stdout] 180 - if self.white_kingside || self.white_queenside || self.black_kingside || self.white_queenside { [INFO] [stdout] 180 + if self.white_kingside || self.white_queenside || self.black_kingside { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/frontend/cli.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | / match pos { [INFO] [stdout] 42 | | Some(_pos) => { [INFO] [stdout] 43 | | self.game.update(GameMessage::SquareSelected(_pos)) [INFO] [stdout] 44 | | }, [INFO] [stdout] 45 | | None => {}, [INFO] [stdout] 46 | | } [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] 41 ~ if let Some(_pos) = pos { [INFO] [stdout] 42 + self.game.update(GameMessage::SquareSelected(_pos)) [INFO] [stdout] 43 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/game.rs:1:21 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::{board::{self, Board}, position::Position}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/game.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | 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: unused variable: `board` [INFO] [stdout] --> src/engine.rs:3:18 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn make_move(board: &mut Board, from: Position, to: Position) -> Result<(), &str> { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_board` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `from` [INFO] [stdout] --> src/engine.rs:3:37 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn make_move(board: &mut Board, from: Position, to: Position) -> Result<(), &str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_from` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `to` [INFO] [stdout] --> src/engine.rs:3:53 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn make_move(board: &mut Board, from: Position, to: Position) -> Result<(), &str> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_to` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/game.rs:31:30 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn update(&mut self, message: GameMessage) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/frontend/cli.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | Ok(input) => {}, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `active_color`, `halfmove`, `fullmove`, `castling_rights`, and `en_passant` are never read [INFO] [stdout] --> src/board.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct Board { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 17 | squares: [Option; 64], [INFO] [stdout] 18 | active_color: Color, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 19 | halfmove: u16, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 20 | fullmove: u16, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 21 | castling_rights: CastlingRights, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 22 | en_passant: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/board.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl Board { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 30 | pub fn set_piece(&mut self, pos: Position, piece: Piece) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub fn remove_piece(&mut self, pos: Position) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn disable_castling_kingside(&mut self, color: Color) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn disable_castling_queenside(&mut self, color: Color) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | pub fn disable_all_castling(&mut self, color: Color) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 67 | pub fn queenside_castling_right(&self, color: Color) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | pub fn kingside_castling_right(&self, color: Color) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | pub fn increment_halfmove(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub fn reset_halfmove(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 89 | pub fn get_halfmove(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | pub fn increment_fullmove(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 97 | pub fn get_fullmove(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn switch_active_color(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | pub fn get_active_color(&self) -> Color { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 112 | pub fn set_en_passant(&mut self, pos: Position) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 116 | pub fn clear_en_passant(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 120 | pub fn get_en_passant(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple variants are never constructed [INFO] [stdout] --> src/position.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum Position { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] 3 | A1, B1, C1, D1, E1, F1, G1, H1, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 4 | A2, B2, C2, D2, E2, F2, G2, H2, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 5 | A3, B3, C3, D3, E3, F3, G3, H3, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 6 | A4, B4, C4, D4, E4, F4, G4, H4, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 7 | A5, B5, C5, D5, E5, F5, G5, H5, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 8 | A6, B6, C6, D6, E6, F6, G6, H6, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 9 | A7, B7, C7, D7, E7, F7, G7, H7, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] 10 | A8, B8, C8, D8, E8, F8, G8, H8, [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = note: `Position` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.23s [INFO] [stdout] warning: associated items `index`, `from_index`, `from_str`, `row`, and `col` are never used [INFO] [stdout] --> src/position.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl Position { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn index(&self) -> u8 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn from_index(index: u8) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 156 | pub fn from_str(input: &str) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 226 | pub fn row(&self) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 230 | pub fn col(&self) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `make_move` is never used [INFO] [stdout] --> src/engine.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn make_move(board: &mut Board, from: Position, to: Position) -> Result<(), &str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `ShowingPieceLegalMoves`, `WaitingForTurn`, and `GameOver` are never constructed [INFO] [stdout] --> src/game.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum GameState { [INFO] [stdout] | --------- variants in this enum [INFO] [stdout] 5 | ShowingPieceLegalMoves, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 6 | WaitingForTurn, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 7 | PlayerTurn, [INFO] [stdout] 8 | GameOver, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `GameMessage` is never used [INFO] [stdout] --> src/game.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | pub enum GameMessage { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `state` is never read [INFO] [stdout] --> src/game.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct Game { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 19 | board: Board, [INFO] [stdout] 20 | state: GameState, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `update` and `get_state` are never used [INFO] [stdout] --> src/game.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 23 | impl Game { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn update(&mut self, message: GameMessage) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn get_state(&self) -> &GameState { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `update` is never used [INFO] [stdout] --> src/frontend/cli.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 11 | impl Client { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 35 | fn update(&mut self, input: &str) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `_squares` [INFO] [stdout] --> src/board.rs:139:18 [INFO] [stdout] | [INFO] [stdout] 139 | for i in 8..16 { [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 [INFO] [stdout] | [INFO] [stdout] 139 - for i in 8..16 { [INFO] [stdout] 139 + for in _squares.iter_mut().take(16).skip(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `_squares` [INFO] [stdout] --> src/board.rs:142:18 [INFO] [stdout] | [INFO] [stdout] 142 | for i in 48..56 { [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] 142 - for i in 48..56 { [INFO] [stdout] 142 + for in _squares.iter_mut().take(56).skip(48) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:180:12 [INFO] [stdout] | [INFO] [stdout] 180 | if self.white_kingside || self.white_queenside || self.black_kingside || self.white_queenside { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 180 - if self.white_kingside || self.white_queenside || self.black_kingside || self.white_queenside { [INFO] [stdout] 180 + if !(!self.white_kingside && !self.white_queenside && !self.black_kingside) { [INFO] [stdout] | [INFO] [stdout] 180 - if self.white_kingside || self.white_queenside || self.black_kingside || self.white_queenside { [INFO] [stdout] 180 + if self.white_kingside || self.white_queenside || self.black_kingside { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/frontend/cli.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | / match pos { [INFO] [stdout] 42 | | Some(_pos) => { [INFO] [stdout] 43 | | self.game.update(GameMessage::SquareSelected(_pos)) [INFO] [stdout] 44 | | }, [INFO] [stdout] 45 | | None => {}, [INFO] [stdout] 46 | | } [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] 41 ~ if let Some(_pos) = pos { [INFO] [stdout] 42 + self.game.update(GameMessage::SquareSelected(_pos)) [INFO] [stdout] 43 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "a6ea8b305c7c6184e2a658de67e8e81edbfca481b305171b626035168153d9a5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a6ea8b305c7c6184e2a658de67e8e81edbfca481b305171b626035168153d9a5", kill_on_drop: false }` [INFO] [stdout] a6ea8b305c7c6184e2a658de67e8e81edbfca481b305171b626035168153d9a5