[INFO] cloning repository https://github.com/Mortal/blokus [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Mortal/blokus" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMortal%2Fblokus", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMortal%2Fblokus'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e93dca7e806c4c308ac1a0f927646b1cf59eb234 [INFO] linting Mortal/blokus against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMortal%2Fblokus" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Mortal/blokus [INFO] finished tweaking git repo https://github.com/Mortal/blokus [INFO] tweaked toml for git repo https://github.com/Mortal/blokus written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Mortal/blokus 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/Mortal/blokus 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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rand_jitter v0.1.3 [INFO] [stderr] Downloaded autocfg v0.1.2 [INFO] [stderr] Downloaded libc v0.2.50 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 7182fc27cdc1c267fe06a506e4c43823ad9b67c9610dd88c094c1d42054e33f0 [INFO] running `Command { std: "docker" "start" "-a" "7182fc27cdc1c267fe06a506e4c43823ad9b67c9610dd88c094c1d42054e33f0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7182fc27cdc1c267fe06a506e4c43823ad9b67c9610dd88c094c1d42054e33f0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7182fc27cdc1c267fe06a506e4c43823ad9b67c9610dd88c094c1d42054e33f0", kill_on_drop: false }` [INFO] [stdout] 7182fc27cdc1c267fe06a506e4c43823ad9b67c9610dd88c094c1d42054e33f0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2d0f2fb71e225dc39e669f3e3ae1b8240a52c138985cf39cc9555629197856ea [INFO] running `Command { std: "docker" "start" "-a" "2d0f2fb71e225dc39e669f3e3ae1b8240a52c138985cf39cc9555629197856ea", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Compiling autocfg v0.1.2 [INFO] [stderr] Checking rand_core v0.4.0 [INFO] [stderr] Compiling libc v0.2.50 [INFO] [stderr] Compiling rand_pcg v0.1.2 [INFO] [stderr] Compiling rand_chacha v0.1.1 [INFO] [stderr] Compiling rand v0.6.5 [INFO] [stderr] Checking rand_core v0.3.1 [INFO] [stderr] Checking rand_jitter v0.1.3 [INFO] [stderr] Checking rand_hc v0.1.0 [INFO] [stderr] Checking rand_isaac v0.1.1 [INFO] [stderr] Checking rand_xorshift v0.1.1 [INFO] [stderr] Checking rand_os v0.1.3 [INFO] [stderr] Checking blokus v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/neighbors.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | rows: rows, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rows` [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/neighbors.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | cols: cols, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `cols` [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/neighbors.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [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/neighbors.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [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/neighbors.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | rows: rows, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rows` [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/neighbors.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | cols: cols, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `cols` [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/neighbors.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [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/neighbors.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [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/board.rs:42:70 [INFO] [stdout] | [INFO] [stdout] 42 | let res = Some((offset, Translation { indices: self.indices, offset: offset, i: 0 })); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `offset` [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/board.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [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/board.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [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/board.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | board_width: board_width, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `board_width` [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/board.rs:144:13 [INFO] [stdout] | [INFO] [stdout] 144 | rows: rows, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rows` [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/board.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | cols: cols, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `cols` [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/board.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | positions: positions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `positions` [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/board.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | flags: flags, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `flags` [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/board.rs:150:13 [INFO] [stdout] | [INFO] [stdout] 150 | homes: homes, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `homes` [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/board.rs:231:33 [INFO] [stdout] | [INFO] [stdout] 231 | Ok(Moves { board: self, color: color, moves: moves }) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `color` [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/board.rs:231:47 [INFO] [stdout] | [INFO] [stdout] 231 | Ok(Moves { board: self, color: color, moves: moves }) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `moves` [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: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/board.rs:278:13 [INFO] [stdout] | [INFO] [stdout] 278 | try!(write!(f, "\n")); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/board.rs:274:29 [INFO] [stdout] | [INFO] [stdout] 274 | None => try!(write!(f, "\u{2591}\u{2591}")), [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/board.rs:275:32 [INFO] [stdout] | [INFO] [stdout] 275 | Some(c) => try!(write!(f, "\x1B[{}m\u{2588}\u{2588}\x1B[0m", 31 + c)), [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/treesearch.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | game_state: game_state, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `game_state` [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/main.rs:109:52 [INFO] [stdout] | [INFO] [stdout] 109 | let mut s = BoardStateMut {board: b, count: 0, homes: homes, best: 0.0}; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `homes` [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/neighbors.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | rows: rows, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rows` [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/neighbors.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | cols: cols, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `cols` [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/neighbors.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [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/neighbors.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [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/neighbors.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | rows: rows, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rows` [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/neighbors.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | cols: cols, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `cols` [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/neighbors.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [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/neighbors.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [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/board.rs:42:70 [INFO] [stdout] | [INFO] [stdout] 42 | let res = Some((offset, Translation { indices: self.indices, offset: offset, i: 0 })); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `offset` [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/board.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [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/board.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [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/board.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | board_width: board_width, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `board_width` [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/board.rs:144:13 [INFO] [stdout] | [INFO] [stdout] 144 | rows: rows, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rows` [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/board.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | cols: cols, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `cols` [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/board.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | positions: positions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `positions` [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/board.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | flags: flags, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `flags` [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/board.rs:150:13 [INFO] [stdout] | [INFO] [stdout] 150 | homes: homes, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `homes` [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/board.rs:231:33 [INFO] [stdout] | [INFO] [stdout] 231 | Ok(Moves { board: self, color: color, moves: moves }) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `color` [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/board.rs:231:47 [INFO] [stdout] | [INFO] [stdout] 231 | Ok(Moves { board: self, color: color, moves: moves }) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `moves` [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: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/board.rs:278:13 [INFO] [stdout] | [INFO] [stdout] 278 | try!(write!(f, "\n")); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/board.rs:274:29 [INFO] [stdout] | [INFO] [stdout] 274 | None => try!(write!(f, "\u{2591}\u{2591}")), [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/board.rs:275:32 [INFO] [stdout] | [INFO] [stdout] 275 | Some(c) => try!(write!(f, "\x1B[{}m\u{2588}\u{2588}\x1B[0m", 31 + c)), [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/treesearch.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | game_state: game_state, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `game_state` [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/main.rs:109:52 [INFO] [stdout] | [INFO] [stdout] 109 | let mut s = BoardStateMut {board: b, count: 0, homes: homes, best: 0.0}; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `homes` [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: unused variable: `a` [INFO] [stdout] --> src/board.rs:249:13 [INFO] [stdout] | [INFO] [stdout] 249 | let a = if first < margin { 0 } else { first - margin }; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/board.rs:250:13 [INFO] [stdout] | [INFO] [stdout] 250 | let b = (last + margin + 1).min(self.flags.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pieces.rs:56:54 [INFO] [stdout] | [INFO] [stdout] 56 | fn vary(&self, mut f: F) where F: FnMut(Piece) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pieces.rs:81:56 [INFO] [stdout] | [INFO] [stdout] 81 | fn expand(&self, mut f: F) where F: FnMut(Piece) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/pieces.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | 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: empty string literal in `println!` [INFO] [stdout] --> src/pieces.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | 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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/board.rs:191:12 [INFO] [stdout] | [INFO] [stdout] 191 | if self.board[i] != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `self.board[i].is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [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/board.rs:196:13 [INFO] [stdout] | [INFO] [stdout] 196 | / match self.board[j] { [INFO] [stdout] 197 | | Some(c) => flag |= BLOCKED << (2 * c), [INFO] [stdout] 198 | | None => (), [INFO] [stdout] 199 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Some(c) = self.board[j] { flag |= BLOCKED << (2 * c) }` [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] [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/board.rs:202:13 [INFO] [stdout] | [INFO] [stdout] 202 | / match self.board[j] { [INFO] [stdout] 203 | | Some(c) => flag |= CORNER << (2 * c), [INFO] [stdout] 204 | | None => (), [INFO] [stdout] 205 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Some(c) = self.board[j] { flag |= CORNER << (2 * c) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:214:16 [INFO] [stdout] | [INFO] [stdout] 214 | if !self.positions[color as usize][piece].is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.positions[color as usize][piece].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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/board.rs:238:16 [INFO] [stdout] | [INFO] [stdout] 238 | if first == None { [INFO] [stdout] | ^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `first.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> src/board.rs:249:17 [INFO] [stdout] | [INFO] [stdout] 249 | let a = if first < margin { 0 } else { first - margin }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `first.saturating_sub(margin)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> src/treesearch.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | std::io::stdout().flush().ok().expect("Could not flush stdout"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 53 - std::io::stdout().flush().ok().expect("Could not flush stdout"); [INFO] [stdout] 53 + std::io::stdout().flush().expect("Could not flush stdout"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/board.rs:105:75 [INFO] [stdout] | [INFO] [stdout] 105 | let translations = v.translations(board_width, board_height).map(|(o, p)| o).collect::>(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/treesearch.rs:60:26 [INFO] [stdout] | [INFO] [stdout] 60 | fn from_root_to_node(&mut self, mut i: usize) { [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: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/treesearch.rs:78:26 [INFO] [stdout] | [INFO] [stdout] 78 | fn from_node_to_root(&mut self, mut i: usize) { [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] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `flags` [INFO] [stdout] --> src/main.rs:47:18 [INFO] [stdout] | [INFO] [stdout] 47 | for i in 0..flags.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 47 - for i in 0..flags.len() { [INFO] [stdout] 47 + for (i, ) in flags.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | if self.board.at(i) == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.board.at(i).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/board.rs:249:13 [INFO] [stdout] | [INFO] [stdout] 249 | let a = if first < margin { 0 } else { first - margin }; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/board.rs:250:13 [INFO] [stdout] | [INFO] [stdout] 250 | let b = (last + margin + 1).min(self.flags.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/pieces.rs:76:23 [INFO] [stdout] | [INFO] [stdout] 76 | let mut res = vec![self.clone().translate_origin()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[self.clone().translate_origin()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/board.rs:77:21 [INFO] [stdout] | [INFO] [stdout] 77 | fn translations(&self, board_width: usize, board_height: usize) -> TranslationsIterator { [INFO] [stdout] | ^^^^^ the lifetime is elided here ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 77 | fn translations(&self, board_width: usize, board_height: usize) -> TranslationsIterator<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/board.rs:88:20 [INFO] [stdout] | [INFO] [stdout] 88 | fn translation(&self, d: usize) -> Translation { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 88 | fn translation(&self, d: usize) -> Translation<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/board.rs:210:18 [INFO] [stdout] | [INFO] [stdout] 210 | pub fn moves(&mut self, color: Color) -> Result { [INFO] [stdout] | ^^^^^^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 210 | pub fn moves(&mut self, color: Color) -> Result, &'static str> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pieces.rs:56:54 [INFO] [stdout] | [INFO] [stdout] 56 | fn vary(&self, mut f: F) where F: FnMut(Piece) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pieces.rs:81:56 [INFO] [stdout] | [INFO] [stdout] 81 | fn expand(&self, mut f: F) where F: FnMut(Piece) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/pieces.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | 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: empty string literal in `println!` [INFO] [stdout] --> src/pieces.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | 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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/board.rs:191:12 [INFO] [stdout] | [INFO] [stdout] 191 | if self.board[i] != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `self.board[i].is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [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/board.rs:196:13 [INFO] [stdout] | [INFO] [stdout] 196 | / match self.board[j] { [INFO] [stdout] 197 | | Some(c) => flag |= BLOCKED << (2 * c), [INFO] [stdout] 198 | | None => (), [INFO] [stdout] 199 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Some(c) = self.board[j] { flag |= BLOCKED << (2 * c) }` [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] [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/board.rs:202:13 [INFO] [stdout] | [INFO] [stdout] 202 | / match self.board[j] { [INFO] [stdout] 203 | | Some(c) => flag |= CORNER << (2 * c), [INFO] [stdout] 204 | | None => (), [INFO] [stdout] 205 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Some(c) = self.board[j] { flag |= CORNER << (2 * c) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:214:16 [INFO] [stdout] | [INFO] [stdout] 214 | if !self.positions[color as usize][piece].is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.positions[color as usize][piece].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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/board.rs:238:16 [INFO] [stdout] | [INFO] [stdout] 238 | if first == None { [INFO] [stdout] | ^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `first.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> src/board.rs:249:17 [INFO] [stdout] | [INFO] [stdout] 249 | let a = if first < margin { 0 } else { first - margin }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `first.saturating_sub(margin)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> src/treesearch.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | std::io::stdout().flush().ok().expect("Could not flush stdout"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 53 - std::io::stdout().flush().ok().expect("Could not flush stdout"); [INFO] [stdout] 53 + std::io::stdout().flush().expect("Could not flush stdout"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/treesearch.rs:60:26 [INFO] [stdout] | [INFO] [stdout] 60 | fn from_root_to_node(&mut self, mut i: usize) { [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: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/treesearch.rs:78:26 [INFO] [stdout] | [INFO] [stdout] 78 | fn from_node_to_root(&mut self, mut i: usize) { [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] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `flags` [INFO] [stdout] --> src/main.rs:47:18 [INFO] [stdout] | [INFO] [stdout] 47 | for i in 0..flags.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 47 - for i in 0..flags.len() { [INFO] [stdout] 47 + for (i, ) in flags.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | if self.board.at(i) == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.board.at(i).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/pieces.rs:76:23 [INFO] [stdout] | [INFO] [stdout] 76 | let mut res = vec![self.clone().translate_origin()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[self.clone().translate_origin()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/board.rs:77:21 [INFO] [stdout] | [INFO] [stdout] 77 | fn translations(&self, board_width: usize, board_height: usize) -> TranslationsIterator { [INFO] [stdout] | ^^^^^ the lifetime is elided here ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 77 | fn translations(&self, board_width: usize, board_height: usize) -> TranslationsIterator<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/board.rs:88:20 [INFO] [stdout] | [INFO] [stdout] 88 | fn translation(&self, d: usize) -> Translation { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 88 | fn translation(&self, d: usize) -> Translation<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/board.rs:210:18 [INFO] [stdout] | [INFO] [stdout] 210 | pub fn moves(&mut self, color: Color) -> Result { [INFO] [stdout] | ^^^^^^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 210 | pub fn moves(&mut self, color: Color) -> Result, &'static str> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.70s [INFO] running `Command { std: "docker" "inspect" "2d0f2fb71e225dc39e669f3e3ae1b8240a52c138985cf39cc9555629197856ea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2d0f2fb71e225dc39e669f3e3ae1b8240a52c138985cf39cc9555629197856ea", kill_on_drop: false }` [INFO] [stdout] 2d0f2fb71e225dc39e669f3e3ae1b8240a52c138985cf39cc9555629197856ea