[INFO] cloning repository https://github.com/the-dharex/chess [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/the-dharex/chess" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fthe-dharex%2Fchess", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fthe-dharex%2Fchess'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 238a501e689d0f39bd027cd9bc884248e7550e18 [INFO] linting the-dharex/chess against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fthe-dharex%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/the-dharex/chess [INFO] finished tweaking git repo https://github.com/the-dharex/chess [INFO] tweaked toml for git repo https://github.com/the-dharex/chess written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/the-dharex/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/the-dharex/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] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded neli v0.6.5 [INFO] [stderr] Downloaded neli-proc-macros v0.1.4 [INFO] [stderr] Downloaded local-ip-address v0.5.7 [INFO] [stderr] Downloaded lyon v1.0.16 [INFO] [stderr] Downloaded mint v0.5.9 [INFO] [stderr] Downloaded crevice-derive v0.10.0 [INFO] [stderr] Downloaded ordered-float v3.9.2 [INFO] [stderr] Downloaded cargo_metadata v0.14.2 [INFO] [stderr] Downloaded wgpu-types v0.16.1 [INFO] [stderr] Downloaded lyon_geom v1.0.18 [INFO] [stderr] Downloaded glyph_brush_draw_cache v0.1.6 [INFO] [stderr] Downloaded glyph_brush v0.7.12 [INFO] [stderr] Downloaded lyon_algorithms v1.0.16 [INFO] [stderr] Downloaded lyon_path v1.0.16 [INFO] [stderr] Downloaded crevice v0.13.0 [INFO] [stderr] Downloaded skeptic v0.13.7 [INFO] [stderr] Downloaded wgpu-core v0.16.1 [INFO] [stderr] Downloaded lyon_tessellation v1.0.16 [INFO] [stderr] Downloaded wgpu v0.16.3 [INFO] [stderr] Downloaded wgpu-hal v0.16.2 [INFO] [stderr] Downloaded ggez v0.9.3 [INFO] [stderr] Downloaded smart-default v0.7.1 [INFO] [stderr] Downloaded naga v0.12.3 [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] 0a13ca27da0e5720217a57a2d66117b0788a6f348cbb18ba79287fc46716a4d2 [INFO] running `Command { std: "docker" "start" "-a" "0a13ca27da0e5720217a57a2d66117b0788a6f348cbb18ba79287fc46716a4d2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0a13ca27da0e5720217a57a2d66117b0788a6f348cbb18ba79287fc46716a4d2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0a13ca27da0e5720217a57a2d66117b0788a6f348cbb18ba79287fc46716a4d2", kill_on_drop: false }` [INFO] [stdout] 0a13ca27da0e5720217a57a2d66117b0788a6f348cbb18ba79287fc46716a4d2 [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] 545dbd43c9a61aecfcf256f6d026f8c7a31e4cbc9c3f8688e15fc3e2782d4cac [INFO] running `Command { std: "docker" "start" "-a" "545dbd43c9a61aecfcf256f6d026f8c7a31e4cbc9c3f8688e15fc3e2782d4cac", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.180 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Compiling zerocopy v0.8.33 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Compiling xml-rs v0.8.28 [INFO] [stderr] Compiling crc32fast v1.5.0 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Checking adler2 v2.0.1 [INFO] [stderr] Compiling find-msvc-tools v0.1.8 [INFO] [stderr] Compiling wayland-sys v0.29.5 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Compiling zmij v1.0.16 [INFO] [stderr] Checking owned_ttf_parser v0.25.1 [INFO] [stderr] Compiling slotmap v1.1.1 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking fdeflate v0.3.7 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling memchr v2.7.6 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Compiling camino v1.2.2 [INFO] [stderr] Compiling bitflags v2.10.0 [INFO] [stderr] Checking ab_glyph v0.2.32 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling error-chain v0.12.4 [INFO] [stderr] Compiling alsa-sys v0.3.1 [INFO] [stderr] Checking libloading v0.7.4 [INFO] [stderr] Compiling pulldown-cmark v0.9.6 [INFO] [stderr] Compiling itoa v1.0.17 [INFO] [stderr] Compiling cfg-if v1.0.4 [INFO] [stderr] Compiling linux-raw-sys v0.11.0 [INFO] [stderr] Checking codespan-reporting v0.11.1 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking flate2 v1.1.8 [INFO] [stderr] Checking gpu-alloc-types v0.2.0 [INFO] [stderr] Compiling smithay-client-toolkit v0.16.1 [INFO] [stderr] Checking gpu-descriptor-types v0.1.2 [INFO] [stderr] Compiling wayland-scanner v0.29.5 [INFO] [stderr] Compiling libudev-sys v0.1.4 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling unicase v2.9.0 [INFO] [stderr] Checking unicode-xid v0.2.6 [INFO] [stderr] Checking euclid v0.22.13 [INFO] [stderr] Checking spirv v0.2.0+1.5.4 [INFO] [stderr] Compiling cc v1.2.53 [INFO] [stderr] Compiling fastrand v2.3.0 [INFO] [stderr] Compiling zstd-safe v5.0.2+zstd.1.5.2 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Compiling once_cell v1.21.3 [INFO] [stderr] Compiling walkdir v2.5.0 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Compiling wayland-client v0.29.5 [INFO] [stderr] Compiling wayland-protocols v0.29.5 [INFO] [stderr] Checking gpu-alloc v0.5.4 [INFO] [stderr] Checking ash v0.37.3+1.3.251 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking nix v0.24.3 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking lyon_geom v1.0.18 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking nix v0.25.1 [INFO] [stderr] Checking khronos-egl v4.1.0 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking inotify-sys v0.1.5 [INFO] [stderr] Checking memmap2 v0.5.10 [INFO] [stderr] Compiling tempfile v3.24.0 [INFO] [stderr] Checking lyon_path v1.0.16 [INFO] [stderr] Checking gpu-descriptor v0.2.4 [INFO] [stderr] Checking wgpu-types v0.16.1 [INFO] [stderr] Checking weezl v0.1.12 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Compiling bytecount v0.6.9 [INFO] [stderr] Compiling cpal v0.15.3 [INFO] [stderr] Compiling winit v0.28.7 [INFO] [stderr] Checking tinyvec v1.10.0 [INFO] [stderr] Checking alsa v0.9.1 [INFO] [stderr] Checking inotify v0.10.2 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Checking wayland-commons v0.29.5 [INFO] [stderr] Compiling bzip2-sys v0.1.13+1.0.8 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling semver v1.0.27 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Checking pxfm v0.1.27 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking crossbeam-channel v0.5.15 [INFO] [stderr] Compiling memoffset v0.8.0 [INFO] [stderr] Compiling gilrs v0.10.10 [INFO] [stderr] Checking mint v0.5.9 [INFO] [stderr] Checking linked-hash-map v0.5.6 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Checking jpeg-decoder v0.3.2 [INFO] [stderr] Checking float_next_after v1.0.0 [INFO] [stderr] Checking calloop v0.10.6 [INFO] [stderr] Checking naga v0.12.3 [INFO] [stderr] Checking lyon_tessellation v1.0.16 [INFO] [stderr] Checking bytemuck v1.24.0 [INFO] [stderr] Checking bzip2 v0.4.4 [INFO] [stderr] Checking wayland-cursor v0.29.5 [INFO] [stderr] Checking glyph_brush_draw_cache v0.1.6 [INFO] [stderr] Checking symphonia-core v0.5.5 [INFO] [stderr] Checking tiny-skia-path v0.8.4 [INFO] [stderr] Checking gif v0.13.3 [INFO] [stderr] Checking glyph_brush_layout v0.2.4 [INFO] [stderr] Checking gilrs-core v0.5.15 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking lewton v0.10.2 [INFO] [stderr] Checking tiff v0.9.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking twox-hash v2.1.2 [INFO] [stderr] Checking tiny-skia v0.8.4 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Checking lyon_algorithms v1.0.16 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking png v0.18.0 [INFO] [stderr] Checking ordered-float v5.1.0 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Checking hound v3.5.1 [INFO] [stderr] Checking byteorder-lite v0.1.0 [INFO] [stderr] Checking claxon v0.4.3 [INFO] [stderr] Checking x11rb-protocol v0.13.2 [INFO] [stderr] Checking glyph_brush v0.7.12 [INFO] [stderr] Checking symphonia-metadata v0.5.5 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Compiling crevice-derive v0.10.0 [INFO] [stderr] Checking lyon v1.0.16 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking directories v5.0.1 [INFO] [stderr] Checking glam v0.24.2 [INFO] [stderr] Checking symphonia-bundle-mp3 v0.5.5 [INFO] [stderr] Compiling smart-default v0.7.1 [INFO] [stderr] Checking ordered-float v3.9.2 [INFO] [stderr] Checking crevice v0.13.0 [INFO] [stderr] Checking typed-arena v2.0.2 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking moxcms v0.7.11 [INFO] [stderr] Checking symphonia v0.5.5 [INFO] [stderr] Checking rodio v0.17.3 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking gethostname v1.1.0 [INFO] [stderr] Checking toml v0.5.11 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Compiling cargo-platform v0.1.9 [INFO] [stderr] Compiling neli-proc-macros v0.1.4 [INFO] [stderr] Compiling cargo_metadata v0.14.2 [INFO] [stderr] Checking neli v0.6.5 [INFO] [stderr] Checking x11rb v0.13.2 [INFO] [stderr] Compiling skeptic v0.13.7 [INFO] [stderr] Compiling ggez v0.9.3 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking local-ip-address v0.5.7 [INFO] [stderr] Checking zstd v0.11.2+zstd.1.5.2 [INFO] [stderr] Checking zip v0.6.6 [INFO] [stderr] Checking arboard v3.6.1 [INFO] [stderr] Checking wgpu-hal v0.16.2 [INFO] [stderr] Checking wgpu-core v0.16.1 [INFO] [stderr] Checking wgpu v0.16.3 [INFO] [stderr] Checking sctk-adwaita v0.5.4 [INFO] [stderr] Checking chess v1.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: the loop variable `x` is only used to index `grid` [INFO] [stdout] --> src/board.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | for x in 0..BOARD_SIZE { [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] 17 - for x in 0..BOARD_SIZE { [INFO] [stdout] 17 + for in grid.iter_mut().take(BOARD_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `grid` [INFO] [stdout] --> src/board.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | for x in 0..BOARD_SIZE { [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] 17 - for x in 0..BOARD_SIZE { [INFO] [stdout] 17 + for in grid.iter_mut().take(BOARD_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | / if piece.piece_type == PieceType::Pawn { [INFO] [stdout] 64 | | if (piece.color == PieceColor::White && to.1 == 0) || [INFO] [stdout] 65 | | (piece.color == PieceColor::Black && to.1 == 7) { [INFO] [stdout] 66 | | piece.piece_type = PieceType::Queen; [INFO] [stdout] 67 | | } [INFO] [stdout] 68 | | } [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] 63 ~ if piece.piece_type == PieceType::Pawn [INFO] [stdout] 64 ~ && ((piece.color == PieceColor::White && to.1 == 0) || [INFO] [stdout] 65 ~ (piece.color == PieceColor::Black && to.1 == 7)) { [INFO] [stdout] 66 | piece.piece_type = PieceType::Queen; [INFO] [stdout] 67 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | / if piece.piece_type == PieceType::Pawn { [INFO] [stdout] 64 | | if (piece.color == PieceColor::White && to.1 == 0) || [INFO] [stdout] 65 | | (piece.color == PieceColor::Black && to.1 == 7) { [INFO] [stdout] 66 | | piece.piece_type = PieceType::Queen; [INFO] [stdout] 67 | | } [INFO] [stdout] 68 | | } [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] 63 ~ if piece.piece_type == PieceType::Pawn [INFO] [stdout] 64 ~ && ((piece.color == PieceColor::White && to.1 == 0) || [INFO] [stdout] 65 ~ (piece.color == PieceColor::Black && to.1 == 7)) { [INFO] [stdout] 66 | piece.piece_type = PieceType::Queen; [INFO] [stdout] 67 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:125:22 [INFO] [stdout] | [INFO] [stdout] 125 | / if self.is_valid_pos(caps_x, caps_y) && self.is_empty(caps_x, caps_y) { [INFO] [stdout] 126 | | if let Some(((_last_from_x, last_from_y), (last_to_x, last_to_y))) = self.last_move { [INFO] [stdout] 127 | | // Verificar si el último movimiento fue un avance doble de peón adyacente [INFO] [stdout] 128 | | if last_to_x == caps_x as usize && last_to_y == y as usize && [INFO] [stdout] ... | [INFO] [stdout] 138 | | } [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] 125 ~ if self.is_valid_pos(caps_x, caps_y) && self.is_empty(caps_x, caps_y) [INFO] [stdout] 126 ~ && let Some(((_last_from_x, last_from_y), (last_to_x, last_to_y))) = self.last_move { [INFO] [stdout] 127 | // Verificar si el último movimiento fue un avance doble de peón adyacente [INFO] [stdout] ... [INFO] [stdout] 136 | } [INFO] [stdout] 137 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:125:22 [INFO] [stdout] | [INFO] [stdout] 125 | / if self.is_valid_pos(caps_x, caps_y) && self.is_empty(caps_x, caps_y) { [INFO] [stdout] 126 | | if let Some(((_last_from_x, last_from_y), (last_to_x, last_to_y))) = self.last_move { [INFO] [stdout] 127 | | // Verificar si el último movimiento fue un avance doble de peón adyacente [INFO] [stdout] 128 | | if last_to_x == caps_x as usize && last_to_y == y as usize && [INFO] [stdout] ... | [INFO] [stdout] 138 | | } [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] 125 ~ if self.is_valid_pos(caps_x, caps_y) && self.is_empty(caps_x, caps_y) [INFO] [stdout] 126 ~ && let Some(((_last_from_x, last_from_y), (last_to_x, last_to_y))) = self.last_move { [INFO] [stdout] 127 | // Verificar si el último movimiento fue un avance doble de peón adyacente [INFO] [stdout] ... [INFO] [stdout] 136 | } [INFO] [stdout] 137 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:131:38 [INFO] [stdout] | [INFO] [stdout] 131 | / ... if let Some(target) = self.grid[last_to_y][last_to_x] { [INFO] [stdout] 132 | | ... if target.piece_type == PieceType::Pawn && target.color != piece.color { [INFO] [stdout] 133 | | ... moves.push((caps_x as usize, caps_y as usize)); [INFO] [stdout] 134 | | ... } [INFO] [stdout] 135 | | ... } [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] 131 ~ if let Some(target) = self.grid[last_to_y][last_to_x] [INFO] [stdout] 132 ~ && target.piece_type == PieceType::Pawn && target.color != piece.color { [INFO] [stdout] 133 | moves.push((caps_x as usize, caps_y as usize)); [INFO] [stdout] 134 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:131:38 [INFO] [stdout] | [INFO] [stdout] 131 | / ... if let Some(target) = self.grid[last_to_y][last_to_x] { [INFO] [stdout] 132 | | ... if target.piece_type == PieceType::Pawn && target.color != piece.color { [INFO] [stdout] 133 | | ... moves.push((caps_x as usize, caps_y as usize)); [INFO] [stdout] 134 | | ... } [INFO] [stdout] 135 | | ... } [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] 131 ~ if let Some(target) = self.grid[last_to_y][last_to_x] [INFO] [stdout] 132 ~ && target.piece_type == PieceType::Pawn && target.color != piece.color { [INFO] [stdout] 133 | moves.push((caps_x as usize, caps_y as usize)); [INFO] [stdout] 134 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:153:21 [INFO] [stdout] | [INFO] [stdout] 153 | / if self.is_valid_pos(x + dx, y + dy) { [INFO] [stdout] 154 | | if self.is_empty(x + dx, y + dy) || self.is_enemy(x + dx, y + dy, piece.color) { [INFO] [stdout] 155 | | moves.push(((x + dx) as usize, (y + dy) as usize)); [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [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] 153 ~ if self.is_valid_pos(x + dx, y + dy) [INFO] [stdout] 154 ~ && (self.is_empty(x + dx, y + dy) || self.is_enemy(x + dx, y + dy, piece.color)) { [INFO] [stdout] 155 | moves.push(((x + dx) as usize, (y + dy) as usize)); [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:153:21 [INFO] [stdout] | [INFO] [stdout] 153 | / if self.is_valid_pos(x + dx, y + dy) { [INFO] [stdout] 154 | | if self.is_empty(x + dx, y + dy) || self.is_enemy(x + dx, y + dy, piece.color) { [INFO] [stdout] 155 | | moves.push(((x + dx) as usize, (y + dy) as usize)); [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [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] 153 ~ if self.is_valid_pos(x + dx, y + dy) [INFO] [stdout] 154 ~ && (self.is_empty(x + dx, y + dy) || self.is_enemy(x + dx, y + dy, piece.color)) { [INFO] [stdout] 155 | moves.push(((x + dx) as usize, (y + dy) as usize)); [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:166:21 [INFO] [stdout] | [INFO] [stdout] 166 | / if self.is_valid_pos(x + dx, y + dy) { [INFO] [stdout] 167 | | if self.is_empty(x + dx, y + dy) || self.is_enemy(x + dx, y + dy, piece.color) { [INFO] [stdout] 168 | | moves.push(((x + dx) as usize, (y + dy) as usize)); [INFO] [stdout] 169 | | } [INFO] [stdout] 170 | | } [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] 166 ~ if self.is_valid_pos(x + dx, y + dy) [INFO] [stdout] 167 ~ && (self.is_empty(x + dx, y + dy) || self.is_enemy(x + dx, y + dy, piece.color)) { [INFO] [stdout] 168 | moves.push(((x + dx) as usize, (y + dy) as usize)); [INFO] [stdout] 169 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:166:21 [INFO] [stdout] | [INFO] [stdout] 166 | / if self.is_valid_pos(x + dx, y + dy) { [INFO] [stdout] 167 | | if self.is_empty(x + dx, y + dy) || self.is_enemy(x + dx, y + dy, piece.color) { [INFO] [stdout] 168 | | moves.push(((x + dx) as usize, (y + dy) as usize)); [INFO] [stdout] 169 | | } [INFO] [stdout] 170 | | } [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] 166 ~ if self.is_valid_pos(x + dx, y + dy) [INFO] [stdout] 167 ~ && (self.is_empty(x + dx, y + dy) || self.is_enemy(x + dx, y + dy, piece.color)) { [INFO] [stdout] 168 | moves.push(((x + dx) as usize, (y + dy) as usize)); [INFO] [stdout] 169 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/board.rs:210:28 [INFO] [stdout] | [INFO] [stdout] 210 | x >= 0 && x < 8 && y >= 0 && y < 8 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `(0..8).contains(&y)` [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/board.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | x >= 0 && x < 8 && y >= 0 && y < 8 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `(0..8).contains(&x)` [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 `Range::contains` implementation [INFO] [stdout] --> src/board.rs:210:28 [INFO] [stdout] | [INFO] [stdout] 210 | x >= 0 && x < 8 && y >= 0 && y < 8 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `(0..8).contains(&y)` [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/board.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | x >= 0 && x < 8 && y >= 0 && y < 8 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `(0..8).contains(&x)` [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/board.rs:238:17 [INFO] [stdout] | [INFO] [stdout] 238 | / if let Some(piece) = self.grid[y][x] { [INFO] [stdout] 239 | | if piece.color != color { [INFO] [stdout] 240 | | let moves = self.get_basic_attacks((x, y), &piece); [INFO] [stdout] 241 | | if moves.contains(&pos) { [INFO] [stdout] ... | [INFO] [stdout] 245 | | } [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] 238 ~ if let Some(piece) = self.grid[y][x] [INFO] [stdout] 239 ~ && piece.color != color { [INFO] [stdout] 240 | let moves = self.get_basic_attacks((x, y), &piece); [INFO] [stdout] ... [INFO] [stdout] 243 | } [INFO] [stdout] 244 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:238:17 [INFO] [stdout] | [INFO] [stdout] 238 | / if let Some(piece) = self.grid[y][x] { [INFO] [stdout] 239 | | if piece.color != color { [INFO] [stdout] 240 | | let moves = self.get_basic_attacks((x, y), &piece); [INFO] [stdout] 241 | | if moves.contains(&pos) { [INFO] [stdout] ... | [INFO] [stdout] 245 | | } [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] 238 ~ if let Some(piece) = self.grid[y][x] [INFO] [stdout] 239 ~ && piece.color != color { [INFO] [stdout] 240 | let moves = self.get_basic_attacks((x, y), &piece); [INFO] [stdout] ... [INFO] [stdout] 243 | } [INFO] [stdout] 244 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:327:16 [INFO] [stdout] | [INFO] [stdout] 327 | if !self.grid[y][check_x].is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.grid[y][check_x].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 `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:356:17 [INFO] [stdout] | [INFO] [stdout] 356 | / if let Some(piece) = self.grid[y][x] { [INFO] [stdout] 357 | | if piece.color == color { [INFO] [stdout] 358 | | if !self.get_valid_moves((x, y)).is_empty() { [INFO] [stdout] 359 | | return false; [INFO] [stdout] ... | [INFO] [stdout] 362 | | } [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] 356 ~ if let Some(piece) = self.grid[y][x] [INFO] [stdout] 357 ~ && piece.color == color { [INFO] [stdout] 358 | if !self.get_valid_moves((x, y)).is_empty() { [INFO] [stdout] 359 | return false; [INFO] [stdout] 360 | } [INFO] [stdout] 361 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:327:16 [INFO] [stdout] | [INFO] [stdout] 327 | if !self.grid[y][check_x].is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.grid[y][check_x].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 `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:357:21 [INFO] [stdout] | [INFO] [stdout] 357 | / if piece.color == color { [INFO] [stdout] 358 | | if !self.get_valid_moves((x, y)).is_empty() { [INFO] [stdout] 359 | | return false; [INFO] [stdout] 360 | | } [INFO] [stdout] 361 | | } [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] 357 ~ if piece.color == color [INFO] [stdout] 358 ~ && !self.get_valid_moves((x, y)).is_empty() { [INFO] [stdout] 359 | return false; [INFO] [stdout] 360 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:371:17 [INFO] [stdout] | [INFO] [stdout] 371 | / if let Some(piece) = self.grid[y][x] { [INFO] [stdout] 372 | | if piece.piece_type == PieceType::King && piece.color == color { [INFO] [stdout] 373 | | return Some((x, y)); [INFO] [stdout] 374 | | } [INFO] [stdout] 375 | | } [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] 371 ~ if let Some(piece) = self.grid[y][x] [INFO] [stdout] 372 ~ && piece.piece_type == PieceType::King && piece.color == color { [INFO] [stdout] 373 | return Some((x, y)); [INFO] [stdout] 374 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:356:17 [INFO] [stdout] | [INFO] [stdout] 356 | / if let Some(piece) = self.grid[y][x] { [INFO] [stdout] 357 | | if piece.color == color { [INFO] [stdout] 358 | | if !self.get_valid_moves((x, y)).is_empty() { [INFO] [stdout] 359 | | return false; [INFO] [stdout] ... | [INFO] [stdout] 362 | | } [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] 356 ~ if let Some(piece) = self.grid[y][x] [INFO] [stdout] 357 ~ && piece.color == color { [INFO] [stdout] 358 | if !self.get_valid_moves((x, y)).is_empty() { [INFO] [stdout] 359 | return false; [INFO] [stdout] 360 | } [INFO] [stdout] 361 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:357:21 [INFO] [stdout] | [INFO] [stdout] 357 | / if piece.color == color { [INFO] [stdout] 358 | | if !self.get_valid_moves((x, y)).is_empty() { [INFO] [stdout] 359 | | return false; [INFO] [stdout] 360 | | } [INFO] [stdout] 361 | | } [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] 357 ~ if piece.color == color [INFO] [stdout] 358 ~ && !self.get_valid_moves((x, y)).is_empty() { [INFO] [stdout] 359 | return false; [INFO] [stdout] 360 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ai.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | / if let Some(piece) = board.grid[y][x] { [INFO] [stdout] 32 | | if piece.color == color { [INFO] [stdout] 33 | | let moves = board.get_valid_moves((x, y)); [INFO] [stdout] 34 | | for dest in moves { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [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] 31 ~ if let Some(piece) = board.grid[y][x] [INFO] [stdout] 32 ~ && piece.color == color { [INFO] [stdout] 33 | let moves = board.get_valid_moves((x, y)); [INFO] [stdout] ... [INFO] [stdout] 36 | } [INFO] [stdout] 37 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:371:17 [INFO] [stdout] | [INFO] [stdout] 371 | / if let Some(piece) = self.grid[y][x] { [INFO] [stdout] 372 | | if piece.piece_type == PieceType::King && piece.color == color { [INFO] [stdout] 373 | | return Some((x, y)); [INFO] [stdout] 374 | | } [INFO] [stdout] 375 | | } [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] 371 ~ if let Some(piece) = self.grid[y][x] [INFO] [stdout] 372 ~ && piece.piece_type == PieceType::King && piece.color == color { [INFO] [stdout] 373 | return Some((x, y)); [INFO] [stdout] 374 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ai.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | / if let Some(piece) = board.grid[y][x] { [INFO] [stdout] 74 | | if piece.color == current_turn_color { [INFO] [stdout] 75 | | let moves = board.get_valid_moves((x, y)); [INFO] [stdout] 76 | | for dest in moves { [INFO] [stdout] ... | [INFO] [stdout] 80 | | } [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] 73 ~ if let Some(piece) = board.grid[y][x] [INFO] [stdout] 74 ~ && piece.color == current_turn_color { [INFO] [stdout] 75 | let moves = board.get_valid_moves((x, y)); [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ai.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | / if let Some(piece) = board.grid[y][x] { [INFO] [stdout] 32 | | if piece.color == color { [INFO] [stdout] 33 | | let moves = board.get_valid_moves((x, y)); [INFO] [stdout] 34 | | for dest in moves { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [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] 31 ~ if let Some(piece) = board.grid[y][x] [INFO] [stdout] 32 ~ && piece.color == color { [INFO] [stdout] 33 | let moves = board.get_valid_moves((x, y)); [INFO] [stdout] ... [INFO] [stdout] 36 | } [INFO] [stdout] 37 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ai.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | / if let Some(piece) = board.grid[y][x] { [INFO] [stdout] 74 | | if piece.color == current_turn_color { [INFO] [stdout] 75 | | let moves = board.get_valid_moves((x, y)); [INFO] [stdout] 76 | | for dest in moves { [INFO] [stdout] ... | [INFO] [stdout] 80 | | } [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] 73 ~ if let Some(piece) = board.grid[y][x] [INFO] [stdout] 74 ~ && piece.color == current_turn_color { [INFO] [stdout] 75 | let moves = board.get_valid_moves((x, y)); [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ai.rs:163:14 [INFO] [stdout] | [INFO] [stdout] 163 | / if x == 0 || x == 7 || y == 0 || y == 7 { [INFO] [stdout] 164 | | bonus -= 30; [INFO] [stdout] 165 | | } [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 161 ~ PieceType::Knight [INFO] [stdout] 162 | // Los caballos odian los bordes [INFO] [stdout] 163 ~ if (x == 0 || x == 7 || y == 0 || y == 7) => { [INFO] [stdout] 164 | bonus -= 30; [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ai.rs:163:14 [INFO] [stdout] | [INFO] [stdout] 163 | / if x == 0 || x == 7 || y == 0 || y == 7 { [INFO] [stdout] 164 | | bonus -= 30; [INFO] [stdout] 165 | | } [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 161 ~ PieceType::Knight [INFO] [stdout] 162 | // Los caballos odian los bordes [INFO] [stdout] 163 ~ if (x == 0 || x == 7 || y == 0 || y == 7) => { [INFO] [stdout] 164 | bonus -= 30; [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:109:17 [INFO] [stdout] | [INFO] [stdout] 109 | / if let Ok(listener) = TcpListener::bind(address) { [INFO] [stdout] 110 | | if let Ok((stream, _)) = listener.accept() { [INFO] [stdout] 111 | | let _ = tx.send(stream); [INFO] [stdout] 112 | | } [INFO] [stdout] 113 | | } [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] 109 ~ if let Ok(listener) = TcpListener::bind(address) [INFO] [stdout] 110 ~ && let Ok((stream, _)) = listener.accept() { [INFO] [stdout] 111 | let _ = tx.send(stream); [INFO] [stdout] 112 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:146:17 [INFO] [stdout] | [INFO] [stdout] 146 | / if let Some(rx) = &self.host_listener { [INFO] [stdout] 147 | | if let Ok(stream) = rx.try_recv() { [INFO] [stdout] 148 | | new_stream = Some(stream); [INFO] [stdout] 149 | | } [INFO] [stdout] 150 | | } [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] 146 ~ if let Some(rx) = &self.host_listener [INFO] [stdout] 147 ~ && let Ok(stream) = rx.try_recv() { [INFO] [stdout] 148 | new_stream = Some(stream); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:109:17 [INFO] [stdout] | [INFO] [stdout] 109 | / if let Ok(listener) = TcpListener::bind(address) { [INFO] [stdout] 110 | | if let Ok((stream, _)) = listener.accept() { [INFO] [stdout] 111 | | let _ = tx.send(stream); [INFO] [stdout] 112 | | } [INFO] [stdout] 113 | | } [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] 109 ~ if let Ok(listener) = TcpListener::bind(address) [INFO] [stdout] 110 ~ && let Ok((stream, _)) = listener.accept() { [INFO] [stdout] 111 | let _ = tx.send(stream); [INFO] [stdout] 112 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:146:17 [INFO] [stdout] | [INFO] [stdout] 146 | / if let Some(rx) = &self.host_listener { [INFO] [stdout] 147 | | if let Ok(stream) = rx.try_recv() { [INFO] [stdout] 148 | | new_stream = Some(stream); [INFO] [stdout] 149 | | } [INFO] [stdout] 150 | | } [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] 146 ~ if let Some(rx) = &self.host_listener [INFO] [stdout] 147 ~ && let Ok(stream) = rx.try_recv() { [INFO] [stdout] 148 | new_stream = Some(stream); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/game.rs:381:17 [INFO] [stdout] | [INFO] [stdout] 381 | / if button == MouseButton::Left { [INFO] [stdout] 382 | | if x > 350.0 && x < 600.0 { [INFO] [stdout] 383 | | if y > 300.0 && y < 330.0 { [INFO] [stdout] ... | [INFO] [stdout] 397 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 375 ~ AppMode::Menu [INFO] [stdout] 376 | // Determinar clics [INFO] [stdout] ... [INFO] [stdout] 380 | // Join: 350, 400 [INFO] [stdout] 381 ~ if button == MouseButton::Left => { [INFO] [stdout] 382 | if x > 350.0 && x < 600.0 { [INFO] [stdout] ... [INFO] [stdout] 396 | } [INFO] [stdout] 397 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:381:17 [INFO] [stdout] | [INFO] [stdout] 381 | / if button == MouseButton::Left { [INFO] [stdout] 382 | | if x > 350.0 && x < 600.0 { [INFO] [stdout] 383 | | if y > 300.0 && y < 330.0 { [INFO] [stdout] ... | [INFO] [stdout] 397 | | } [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] 381 ~ if button == MouseButton::Left [INFO] [stdout] 382 ~ && x > 350.0 && x < 600.0 { [INFO] [stdout] 383 | if y > 300.0 && y < 330.0 { [INFO] [stdout] ... [INFO] [stdout] 395 | } [INFO] [stdout] 396 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:421:21 [INFO] [stdout] | [INFO] [stdout] 421 | / if let Some(selected) = self.selected_square { [INFO] [stdout] 422 | | if self.valid_moves_for_selected.contains(&(grid_x, grid_y)) { [INFO] [stdout] 423 | | // Ejecutar movimiento [INFO] [stdout] 424 | | self.board.move_piece(selected, (grid_x, grid_y)); [INFO] [stdout] ... | [INFO] [stdout] 445 | | } [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] 421 ~ if let Some(selected) = self.selected_square [INFO] [stdout] 422 ~ && self.valid_moves_for_selected.contains(&(grid_x, grid_y)) { [INFO] [stdout] 423 | // Ejecutar movimiento [INFO] [stdout] ... [INFO] [stdout] 443 | return Ok(()); [INFO] [stdout] 444 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:428:29 [INFO] [stdout] | [INFO] [stdout] 428 | / ... if self.game_type == GameType::Multiplayer { [INFO] [stdout] 429 | | ... if let Some(client) = &mut self.network_client { [INFO] [stdout] 430 | | ... client.send(NetworkMessage::Move { from: selected, to: (grid_x, grid_y) }); [INFO] [stdout] 431 | | ... } [INFO] [stdout] 432 | | ... } [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] 428 ~ if self.game_type == GameType::Multiplayer [INFO] [stdout] 429 ~ && let Some(client) = &mut self.network_client { [INFO] [stdout] 430 | client.send(NetworkMessage::Move { from: selected, to: (grid_x, grid_y) }); [INFO] [stdout] 431 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/game.rs:381:17 [INFO] [stdout] | [INFO] [stdout] 381 | / if button == MouseButton::Left { [INFO] [stdout] 382 | | if x > 350.0 && x < 600.0 { [INFO] [stdout] 383 | | if y > 300.0 && y < 330.0 { [INFO] [stdout] ... | [INFO] [stdout] 397 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 375 ~ AppMode::Menu [INFO] [stdout] 376 | // Determinar clics [INFO] [stdout] ... [INFO] [stdout] 380 | // Join: 350, 400 [INFO] [stdout] 381 ~ if button == MouseButton::Left => { [INFO] [stdout] 382 | if x > 350.0 && x < 600.0 { [INFO] [stdout] ... [INFO] [stdout] 396 | } [INFO] [stdout] 397 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:381:17 [INFO] [stdout] | [INFO] [stdout] 381 | / if button == MouseButton::Left { [INFO] [stdout] 382 | | if x > 350.0 && x < 600.0 { [INFO] [stdout] 383 | | if y > 300.0 && y < 330.0 { [INFO] [stdout] ... | [INFO] [stdout] 397 | | } [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] 381 ~ if button == MouseButton::Left [INFO] [stdout] 382 ~ && x > 350.0 && x < 600.0 { [INFO] [stdout] 383 | if y > 300.0 && y < 330.0 { [INFO] [stdout] ... [INFO] [stdout] 395 | } [INFO] [stdout] 396 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:421:21 [INFO] [stdout] | [INFO] [stdout] 421 | / if let Some(selected) = self.selected_square { [INFO] [stdout] 422 | | if self.valid_moves_for_selected.contains(&(grid_x, grid_y)) { [INFO] [stdout] 423 | | // Ejecutar movimiento [INFO] [stdout] 424 | | self.board.move_piece(selected, (grid_x, grid_y)); [INFO] [stdout] ... | [INFO] [stdout] 445 | | } [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] 421 ~ if let Some(selected) = self.selected_square [INFO] [stdout] 422 ~ && self.valid_moves_for_selected.contains(&(grid_x, grid_y)) { [INFO] [stdout] 423 | // Ejecutar movimiento [INFO] [stdout] ... [INFO] [stdout] 443 | return Ok(()); [INFO] [stdout] 444 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/game.rs:428:29 [INFO] [stdout] | [INFO] [stdout] 428 | / ... if self.game_type == GameType::Multiplayer { [INFO] [stdout] 429 | | ... if let Some(client) = &mut self.network_client { [INFO] [stdout] 430 | | ... client.send(NetworkMessage::Move { from: selected, to: (grid_x, grid_y) }); [INFO] [stdout] 431 | | ... } [INFO] [stdout] 432 | | ... } [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] 428 ~ if self.game_type == GameType::Multiplayer [INFO] [stdout] 429 ~ && let Some(client) = &mut self.network_client { [INFO] [stdout] 430 | client.send(NetworkMessage::Move { from: selected, to: (grid_x, grid_y) }); [INFO] [stdout] 431 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/main.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | let _ = ctx.gfx.window().set_inner_size(ggez::winit::dpi::PhysicalSize::new(SCREEN_SIZE.0, SCREEN_SIZE.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 38 - let _ = ctx.gfx.window().set_inner_size(ggez::winit::dpi::PhysicalSize::new(SCREEN_SIZE.0, SCREEN_SIZE.1)); [INFO] [stdout] 38 + ctx.gfx.window().set_inner_size(ggez::winit::dpi::PhysicalSize::new(SCREEN_SIZE.0, SCREEN_SIZE.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/main.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | let _ = ctx.gfx.window().set_inner_size(ggez::winit::dpi::PhysicalSize::new(SCREEN_SIZE.0, SCREEN_SIZE.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 38 - let _ = ctx.gfx.window().set_inner_size(ggez::winit::dpi::PhysicalSize::new(SCREEN_SIZE.0, SCREEN_SIZE.1)); [INFO] [stdout] 38 + ctx.gfx.window().set_inner_size(ggez::winit::dpi::PhysicalSize::new(SCREEN_SIZE.0, SCREEN_SIZE.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 25s [INFO] running `Command { std: "docker" "inspect" "545dbd43c9a61aecfcf256f6d026f8c7a31e4cbc9c3f8688e15fc3e2782d4cac", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "545dbd43c9a61aecfcf256f6d026f8c7a31e4cbc9c3f8688e15fc3e2782d4cac", kill_on_drop: false }` [INFO] [stdout] 545dbd43c9a61aecfcf256f6d026f8c7a31e4cbc9c3f8688e15fc3e2782d4cac