[INFO] cloning repository https://github.com/konao/othello [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/konao/othello" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkonao%2Fothello", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkonao%2Fothello'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c8d31769cebf9469903ed3eb80f9007c529cc9c4 [INFO] linting konao/othello against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkonao%2Fothello" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/konao/othello [INFO] finished tweaking git repo https://github.com/konao/othello [INFO] tweaked toml for git repo https://github.com/konao/othello written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/konao/othello 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/konao/othello 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] Downloading crates ... [INFO] [stderr] Downloaded sdl2 v0.36.0 [INFO] [stderr] Downloaded sdl2-sys v0.36.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 4e8e6f0da26a21ec9ac8a24f9ecc756576046f5719dcf3f5567b200eb59992c3 [INFO] running `Command { std: "docker" "start" "-a" "4e8e6f0da26a21ec9ac8a24f9ecc756576046f5719dcf3f5567b200eb59992c3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4e8e6f0da26a21ec9ac8a24f9ecc756576046f5719dcf3f5567b200eb59992c3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4e8e6f0da26a21ec9ac8a24f9ecc756576046f5719dcf3f5567b200eb59992c3", kill_on_drop: false }` [INFO] [stdout] 4e8e6f0da26a21ec9ac8a24f9ecc756576046f5719dcf3f5567b200eb59992c3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 75f8757febbd7513b8acbea2d04e3e0c9fca94f40941fb4b97b2dacac9162311 [INFO] running `Command { std: "docker" "start" "-a" "75f8757febbd7513b8acbea2d04e3e0c9fca94f40941fb4b97b2dacac9162311", kill_on_drop: false }` [INFO] [stderr] Compiling version-compare v0.1.1 [INFO] [stderr] Compiling libc v0.2.101 [INFO] [stderr] Compiling sdl2 v0.36.0 [INFO] [stderr] Compiling sdl2-sys v0.36.0 [INFO] [stderr] Checking othello v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/board.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | pieces: pieces, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `pieces` [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/board.rs:177:13 [INFO] [stdout] | [INFO] [stdout] 177 | coefs: coefs [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `coefs` [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:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | ntake: ntake, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `ntake` [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:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | score: score, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `score` [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:366:17 [INFO] [stdout] | [INFO] [stdout] 366 | dirs: dirs [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `dirs` [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:456:13 [INFO] [stdout] | [INFO] [stdout] 456 | capturedPieceLocs: capturedPieceLocs [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `capturedPieceLocs` [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:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | pieces: pieces, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `pieces` [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/board.rs:177:13 [INFO] [stdout] | [INFO] [stdout] 177 | coefs: coefs [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `coefs` [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:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | ntake: ntake, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `ntake` [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:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | score: score, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `score` [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:366:17 [INFO] [stdout] | [INFO] [stdout] 366 | dirs: dirs [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `dirs` [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:456:13 [INFO] [stdout] | [INFO] [stdout] 456 | capturedPieceLocs: capturedPieceLocs [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `capturedPieceLocs` [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: `np` [INFO] [stdout] --> src/board.rs:499:21 [INFO] [stdout] | [INFO] [stdout] 499 | let np = nextBoard.pos.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_np` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / return match *piece { [INFO] [stdout] 18 | | Piece::Space => Piece::Space, [INFO] [stdout] 19 | | Piece::White => Piece::Black, [INFO] [stdout] 20 | | Piece::Black => Piece::White [INFO] [stdout] 21 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 ~ match *piece { [INFO] [stdout] 18 + Piece::Space => Piece::Space, [INFO] [stdout] 19 + Piece::White => Piece::Black, [INFO] [stdout] 20 + Piece::Black => Piece::White [INFO] [stdout] 21 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / return match &self { [INFO] [stdout] 27 | | Piece::Space => "Space", [INFO] [stdout] 28 | | Piece::White => "Black", [INFO] [stdout] 29 | | Piece::Black => "White" [INFO] [stdout] 30 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 26 ~ match &self { [INFO] [stdout] 27 + Piece::Space => "Space", [INFO] [stdout] 28 + Piece::White => "Black", [INFO] [stdout] 29 + Piece::Black => "White" [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | return Some(((y-1) * 8 + (x-1)) as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 50 - return Some(((y-1) * 8 + (x-1)) as usize); [INFO] [stdout] 50 + Some(((y-1) * 8 + (x-1)) as usize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `np` [INFO] [stdout] --> src/board.rs:499:21 [INFO] [stdout] | [INFO] [stdout] 499 | let np = nextBoard.pos.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_np` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return None; [INFO] [stdout] 52 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/board.rs:49:36 [INFO] [stdout] | [INFO] [stdout] 49 | if (x >= 1) && (x <= 8) && (y >= 1) && (y <= 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/board.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 49 | if (x >= 1) && (x <= 8) && (y >= 1) && (y <= 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=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: unneeded `return` statement [INFO] [stdout] --> src/board.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / return match dir { [INFO] [stdout] 58 | | 0 => (0, -1), [INFO] [stdout] 59 | | 1 => (1, -1), [INFO] [stdout] 60 | | 2 => (1, 0), [INFO] [stdout] ... | [INFO] [stdout] 66 | | _ => (0, 0) [INFO] [stdout] 67 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 57 ~ match dir { [INFO] [stdout] 58 + 0 => (0, -1), [INFO] [stdout] 59 + 1 => (1, -1), [INFO] [stdout] 60 + 2 => (1, 0), [INFO] [stdout] 61 + 3 => (1, 1), [INFO] [stdout] 62 + 4 => (0, 1), [INFO] [stdout] 63 + 5 => (-1, 1), [INFO] [stdout] 64 + 6 => (-1, 0), [INFO] [stdout] 65 + 7 => (-1, -1), [INFO] [stdout] 66 + _ => (0, 0) [INFO] [stdout] 67 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | return format!("{}{}", xstr, y); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 82 - return format!("{}{}", xstr, y); [INFO] [stdout] 82 + format!("{}{}", xstr, y) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / return match *piece { [INFO] [stdout] 18 | | Piece::Space => Piece::Space, [INFO] [stdout] 19 | | Piece::White => Piece::Black, [INFO] [stdout] 20 | | Piece::Black => Piece::White [INFO] [stdout] 21 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 ~ match *piece { [INFO] [stdout] 18 + Piece::Space => Piece::Space, [INFO] [stdout] 19 + Piece::White => Piece::Black, [INFO] [stdout] 20 + Piece::Black => Piece::White [INFO] [stdout] 21 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / return match &self { [INFO] [stdout] 27 | | Piece::Space => "Space", [INFO] [stdout] 28 | | Piece::White => "Black", [INFO] [stdout] 29 | | Piece::Black => "White" [INFO] [stdout] 30 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 26 ~ match &self { [INFO] [stdout] 27 + Piece::Space => "Space", [INFO] [stdout] 28 + Piece::White => "Black", [INFO] [stdout] 29 + Piece::Black => "White" [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | return Some(((y-1) * 8 + (x-1)) as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 50 - return Some(((y-1) * 8 + (x-1)) as usize); [INFO] [stdout] 50 + Some(((y-1) * 8 + (x-1)) as usize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return None; [INFO] [stdout] 52 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/board.rs:49:36 [INFO] [stdout] | [INFO] [stdout] 49 | if (x >= 1) && (x <= 8) && (y >= 1) && (y <= 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/board.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 49 | if (x >= 1) && (x <= 8) && (y >= 1) && (y <= 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=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: unneeded `return` statement [INFO] [stdout] --> src/board.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / return match dir { [INFO] [stdout] 58 | | 0 => (0, -1), [INFO] [stdout] 59 | | 1 => (1, -1), [INFO] [stdout] 60 | | 2 => (1, 0), [INFO] [stdout] ... | [INFO] [stdout] 66 | | _ => (0, 0) [INFO] [stdout] 67 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 57 ~ match dir { [INFO] [stdout] 58 + 0 => (0, -1), [INFO] [stdout] 59 + 1 => (1, -1), [INFO] [stdout] 60 + 2 => (1, 0), [INFO] [stdout] 61 + 3 => (1, 1), [INFO] [stdout] 62 + 4 => (0, 1), [INFO] [stdout] 63 + 5 => (-1, 1), [INFO] [stdout] 64 + 6 => (-1, 0), [INFO] [stdout] 65 + 7 => (-1, -1), [INFO] [stdout] 66 + _ => (0, 0) [INFO] [stdout] 67 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | return format!("{}{}", xstr, y); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 82 - return format!("{}{}", xstr, y); [INFO] [stdout] 82 + format!("{}{}", xstr, y) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Board` [INFO] [stdout] --> src/board.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | / pub fn new() -> Self { [INFO] [stdout] 135 | | let mut pieces = Vec::::new(); [INFO] [stdout] 136 | | for _y in 1..=8 { [INFO] [stdout] 137 | | for _x in 1..=8 { [INFO] [stdout] ... | [INFO] [stdout] 178 | | }; [INFO] [stdout] 179 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 132 + impl Default for Board { [INFO] [stdout] 133 + fn default() -> Self { [INFO] [stdout] 134 + Self::new() [INFO] [stdout] 135 + } [INFO] [stdout] 136 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:147:21 [INFO] [stdout] | [INFO] [stdout] 147 | / ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 | | ((_x == 8) && (_y == 1)) || [INFO] [stdout] 149 | | ((_x == 1) && (_y == 8)) || [INFO] [stdout] 150 | | ((_x == 8) && (_y == 8)) { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 147 - ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 - ((_x == 8) && (_y == 1)) || [INFO] [stdout] 149 - ((_x == 1) && (_y == 8)) || [INFO] [stdout] 150 - ((_x == 8) && (_y == 8)) { [INFO] [stdout] 147 + !(_x != 1 && _x != 8 || _y != 1 && _y != 8) { [INFO] [stdout] | [INFO] [stdout] 147 - ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 - ((_x == 8) && (_y == 1)) || [INFO] [stdout] 149 - ((_x == 1) && (_y == 8)) || [INFO] [stdout] 150 - ((_x == 8) && (_y == 8)) { [INFO] [stdout] 147 + ((_y == 8) || (_y == 1)) && ((_x == 8) || (_x == 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:147:21 [INFO] [stdout] | [INFO] [stdout] 147 | / ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 | | ((_x == 8) && (_y == 1)) || [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 147 - ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 - ((_x == 8) && (_y == 1)) || [INFO] [stdout] 147 + !(_y != 1 || _x != 1 && _x != 8) || [INFO] [stdout] | [INFO] [stdout] 147 - ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 - ((_x == 8) && (_y == 1)) || [INFO] [stdout] 147 + ((_x == 8) || (_x == 1)) && (_y == 1) || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | / return Board { [INFO] [stdout] 176 | | pieces: pieces, [INFO] [stdout] 177 | | coefs: coefs [INFO] [stdout] 178 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 175 ~ Board { [INFO] [stdout] 176 + pieces: pieces, [INFO] [stdout] 177 + coefs: coefs [INFO] [stdout] 178 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/board.rs:182:24 [INFO] [stdout] | [INFO] [stdout] 182 | pub fn print(&self) -> () { [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/board.rs:205:27 [INFO] [stdout] | [INFO] [stdout] 205 | pub fn init(&mut self) -> () { [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: you should consider adding a `Default` implementation for `Board` [INFO] [stdout] --> src/board.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | / pub fn new() -> Self { [INFO] [stdout] 135 | | let mut pieces = Vec::::new(); [INFO] [stdout] 136 | | for _y in 1..=8 { [INFO] [stdout] 137 | | for _x in 1..=8 { [INFO] [stdout] ... | [INFO] [stdout] 178 | | }; [INFO] [stdout] 179 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 132 + impl Default for Board { [INFO] [stdout] 133 + fn default() -> Self { [INFO] [stdout] 134 + Self::new() [INFO] [stdout] 135 + } [INFO] [stdout] 136 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:147:21 [INFO] [stdout] | [INFO] [stdout] 147 | / ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 | | ((_x == 8) && (_y == 1)) || [INFO] [stdout] 149 | | ((_x == 1) && (_y == 8)) || [INFO] [stdout] 150 | | ((_x == 8) && (_y == 8)) { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 147 - ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 - ((_x == 8) && (_y == 1)) || [INFO] [stdout] 149 - ((_x == 1) && (_y == 8)) || [INFO] [stdout] 150 - ((_x == 8) && (_y == 8)) { [INFO] [stdout] 147 + !(_x != 1 && _x != 8 || _y != 1 && _y != 8) { [INFO] [stdout] | [INFO] [stdout] 147 - ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 - ((_x == 8) && (_y == 1)) || [INFO] [stdout] 149 - ((_x == 1) && (_y == 8)) || [INFO] [stdout] 150 - ((_x == 8) && (_y == 8)) { [INFO] [stdout] 147 + ((_y == 8) || (_y == 1)) && ((_x == 8) || (_x == 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/board.rs:147:21 [INFO] [stdout] | [INFO] [stdout] 147 | / ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 | | ((_x == 8) && (_y == 1)) || [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 147 - ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 - ((_x == 8) && (_y == 1)) || [INFO] [stdout] 147 + !(_y != 1 || _x != 1 && _x != 8) || [INFO] [stdout] | [INFO] [stdout] 147 - ((_x == 1) && (_y == 1)) || [INFO] [stdout] 148 - ((_x == 8) && (_y == 1)) || [INFO] [stdout] 147 + ((_x == 8) || (_x == 1)) && (_y == 1) || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | / return Board { [INFO] [stdout] 176 | | pieces: pieces, [INFO] [stdout] 177 | | coefs: coefs [INFO] [stdout] 178 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 175 ~ Board { [INFO] [stdout] 176 + pieces: pieces, [INFO] [stdout] 177 + coefs: coefs [INFO] [stdout] 178 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 231 - return false; [INFO] [stdout] 231 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/board.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | if let Some(lines) = self.readTextFile(boardPath).ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(lines)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 213 - if let Some(lines) = self.readTextFile(boardPath).ok() { [INFO] [stdout] 213 + if let Ok(lines) = self.readTextFile(boardPath) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `lines` [INFO] [stdout] --> src/board.rs:214:22 [INFO] [stdout] | [INFO] [stdout] 214 | for i in 2..10 { [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] 214 - for i in 2..10 { [INFO] [stdout] 214 + for (i, ) in lines.iter().enumerate().take(10).skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `line` [INFO] [stdout] --> src/board.rs:216:26 [INFO] [stdout] | [INFO] [stdout] 216 | for j in 2..10 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 216 - for j in 2..10 { [INFO] [stdout] 216 + for (j, ) in line.iter().enumerate().take(10).skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/board.rs:182:24 [INFO] [stdout] | [INFO] [stdout] 182 | pub fn print(&self) -> () { [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/board.rs:254:61 [INFO] [stdout] | [INFO] [stdout] 254 | pub fn setPiece(&mut self, x: i32, y: i32, piece: 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: unneeded `return` statement [INFO] [stdout] --> src/board.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | return Some(&self.pieces[idx]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 262 - return Some(&self.pieces[idx]); [INFO] [stdout] 262 + Some(&self.pieces[idx]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:264:13 [INFO] [stdout] | [INFO] [stdout] 264 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 264 - return None; [INFO] [stdout] 264 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:270:13 [INFO] [stdout] | [INFO] [stdout] 270 | return self.coefs[idx]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 270 - return self.coefs[idx]; [INFO] [stdout] 270 + self.coefs[idx] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:272:13 [INFO] [stdout] | [INFO] [stdout] 272 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 272 - return 0; [INFO] [stdout] 272 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/board.rs:205:27 [INFO] [stdout] | [INFO] [stdout] 205 | pub fn init(&mut self) -> () { [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: unneeded `return` statement [INFO] [stdout] --> src/board.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 231 - return false; [INFO] [stdout] 231 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:290:9 [INFO] [stdout] | [INFO] [stdout] 290 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 290 - return result; [INFO] [stdout] 290 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/board.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | if let Some(lines) = self.readTextFile(boardPath).ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(lines)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 213 - if let Some(lines) = self.readTextFile(boardPath).ok() { [INFO] [stdout] 213 + if let Ok(lines) = self.readTextFile(boardPath) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `lines` [INFO] [stdout] --> src/board.rs:214:22 [INFO] [stdout] | [INFO] [stdout] 214 | for i in 2..10 { [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] 214 - for i in 2..10 { [INFO] [stdout] 214 + for (i, ) in lines.iter().enumerate().take(10).skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `line` [INFO] [stdout] --> src/board.rs:216:26 [INFO] [stdout] | [INFO] [stdout] 216 | for j in 2..10 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 216 - for j in 2..10 { [INFO] [stdout] 216 + for (j, ) in line.iter().enumerate().take(10).skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:319:29 [INFO] [stdout] | [INFO] [stdout] 319 | ... x1 = x1 + dx; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `x1 += dx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:320:29 [INFO] [stdout] | [INFO] [stdout] 320 | ... y1 = y1 + dy; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `y1 += dy` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:332:33 [INFO] [stdout] | [INFO] [stdout] 332 | ... n = n + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `n += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:333:33 [INFO] [stdout] | [INFO] [stdout] 333 | ... c = c + self.getCoef(x1, y1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `c += self.getCoef(x1, y1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:335:33 [INFO] [stdout] | [INFO] [stdout] 335 | ... x1 = x1 + dx; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `x1 += dx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:336:33 [INFO] [stdout] | [INFO] [stdout] 336 | ... y1 = y1 + dy; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `y1 += dy` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:350:33 [INFO] [stdout] | [INFO] [stdout] 350 | ... ntake = ntake + n; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `ntake += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:351:33 [INFO] [stdout] | [INFO] [stdout] 351 | ... score = score + c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `score += c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/board.rs:254:61 [INFO] [stdout] | [INFO] [stdout] 254 | pub fn setPiece(&mut self, x: i32, y: i32, piece: 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: unneeded `return` statement [INFO] [stdout] --> src/board.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | return Some(&self.pieces[idx]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 262 - return Some(&self.pieces[idx]); [INFO] [stdout] 262 + Some(&self.pieces[idx]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:264:13 [INFO] [stdout] | [INFO] [stdout] 264 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 264 - return None; [INFO] [stdout] 264 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:270:13 [INFO] [stdout] | [INFO] [stdout] 270 | return self.coefs[idx]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 270 - return self.coefs[idx]; [INFO] [stdout] 270 + self.coefs[idx] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:272:13 [INFO] [stdout] | [INFO] [stdout] 272 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 272 - return 0; [INFO] [stdout] 272 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:290:9 [INFO] [stdout] | [INFO] [stdout] 290 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 290 - return result; [INFO] [stdout] 290 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:319:29 [INFO] [stdout] | [INFO] [stdout] 319 | ... x1 = x1 + dx; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `x1 += dx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:320:29 [INFO] [stdout] | [INFO] [stdout] 320 | ... y1 = y1 + dy; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `y1 += dy` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:332:33 [INFO] [stdout] | [INFO] [stdout] 332 | ... n = n + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `n += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:333:33 [INFO] [stdout] | [INFO] [stdout] 333 | ... c = c + self.getCoef(x1, y1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `c += self.getCoef(x1, y1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:335:33 [INFO] [stdout] | [INFO] [stdout] 335 | ... x1 = x1 + dx; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `x1 += dx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:336:33 [INFO] [stdout] | [INFO] [stdout] 336 | ... y1 = y1 + dy; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `y1 += dy` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:350:33 [INFO] [stdout] | [INFO] [stdout] 350 | ... ntake = ntake + n; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `ntake += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:351:33 [INFO] [stdout] | [INFO] [stdout] 351 | ... score = score + c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `score += c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pos` which implements the `Copy` trait [INFO] [stdout] --> src/board.rs:363:22 [INFO] [stdout] | [INFO] [stdout] 363 | pos: pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:406:9 [INFO] [stdout] | [INFO] [stdout] 406 | return results; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 406 - return results; [INFO] [stdout] 406 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/board.rs:386:37 [INFO] [stdout] | [INFO] [stdout] 386 | let places = self.searchPos(&piece); [INFO] [stdout] | ^^^^^^ help: change this to: `piece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/board.rs:389:12 [INFO] [stdout] | [INFO] [stdout] 389 | if places.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `places.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/board.rs:420:9 [INFO] [stdout] | [INFO] [stdout] 420 | / if optRes.is_none() { [INFO] [stdout] 421 | | // posには置けない [INFO] [stdout] 422 | | return None; [INFO] [stdout] 423 | | } [INFO] [stdout] | |_________^ help: replace it with: `optRes.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:444:17 [INFO] [stdout] | [INFO] [stdout] 444 | x1 = x1 + dx; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `x1 += dx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:445:17 [INFO] [stdout] | [INFO] [stdout] 445 | y1 = y1 + dy; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `y1 += dy` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pos` which implements the `Copy` trait [INFO] [stdout] --> src/board.rs:451:18 [INFO] [stdout] | [INFO] [stdout] 451 | pos: pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Piece` which implements the `Copy` trait [INFO] [stdout] --> src/board.rs:452:20 [INFO] [stdout] | [INFO] [stdout] 452 | piece: piece.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*piece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:468:9 [INFO] [stdout] | [INFO] [stdout] 468 | return self.genSearchTreeSub(piece, piece, depth, &root); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 468 - return self.genSearchTreeSub(piece, piece, depth, &root); [INFO] [stdout] 468 + self.genSearchTreeSub(piece, piece, depth, &root) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pos` which implements the `Copy` trait [INFO] [stdout] --> src/board.rs:363:22 [INFO] [stdout] | [INFO] [stdout] 363 | pos: pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:406:9 [INFO] [stdout] | [INFO] [stdout] 406 | return results; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 406 - return results; [INFO] [stdout] 406 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/board.rs:386:37 [INFO] [stdout] | [INFO] [stdout] 386 | let places = self.searchPos(&piece); [INFO] [stdout] | ^^^^^^ help: change this to: `piece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/board.rs:389:12 [INFO] [stdout] | [INFO] [stdout] 389 | if places.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `places.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/board.rs:420:9 [INFO] [stdout] | [INFO] [stdout] 420 | / if optRes.is_none() { [INFO] [stdout] 421 | | // posには置けない [INFO] [stdout] 422 | | return None; [INFO] [stdout] 423 | | } [INFO] [stdout] | |_________^ help: replace it with: `optRes.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:444:17 [INFO] [stdout] | [INFO] [stdout] 444 | x1 = x1 + dx; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `x1 += dx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:445:17 [INFO] [stdout] | [INFO] [stdout] 445 | y1 = y1 + dy; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `y1 += dy` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:550:9 [INFO] [stdout] | [INFO] [stdout] 550 | return results; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 550 - return results; [INFO] [stdout] 550 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/board.rs:476:16 [INFO] [stdout] | [INFO] [stdout] 476 | if nextBoards.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `nextBoards.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.filter(..)` [INFO] [stdout] --> src/board.rs:490:52 [INFO] [stdout] | [INFO] [stdout] 490 | let maxScoreBoards = nextBoards.iter().filter_map( [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 491 | | |elem| if elem.score == maxScore { [INFO] [stdout] 492 | | return Some(elem); [INFO] [stdout] 493 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 496 | | ); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:492:21 [INFO] [stdout] | [INFO] [stdout] 492 | return Some(elem); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 492 - return Some(elem); [INFO] [stdout] 492 + Some(elem) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:494:21 [INFO] [stdout] | [INFO] [stdout] 494 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 494 - return None; [INFO] [stdout] 494 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pos` which implements the `Copy` trait [INFO] [stdout] --> src/board.rs:499:26 [INFO] [stdout] | [INFO] [stdout] 499 | let np = nextBoard.pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `nextBoard.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:576:9 [INFO] [stdout] | [INFO] [stdout] 576 | return bestMove; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 576 - return bestMove; [INFO] [stdout] 576 + bestMove [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/board.rs:559:29 [INFO] [stdout] | [INFO] [stdout] 559 | let mut bestScore = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 559 - let mut bestScore = std::i32::MIN; [INFO] [stdout] 559 + let mut bestScore = i32::MIN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pos` which implements the `Copy` trait [INFO] [stdout] --> src/board.rs:451:18 [INFO] [stdout] | [INFO] [stdout] 451 | pos: pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Piece` which implements the `Copy` trait [INFO] [stdout] --> src/board.rs:452:20 [INFO] [stdout] | [INFO] [stdout] 452 | piece: piece.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*piece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:468:9 [INFO] [stdout] | [INFO] [stdout] 468 | return self.genSearchTreeSub(piece, piece, depth, &root); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 468 - return self.genSearchTreeSub(piece, piece, depth, &root); [INFO] [stdout] 468 + self.genSearchTreeSub(piece, piece, depth, &root) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:550:9 [INFO] [stdout] | [INFO] [stdout] 550 | return results; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 550 - return results; [INFO] [stdout] 550 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/board.rs:476:16 [INFO] [stdout] | [INFO] [stdout] 476 | if nextBoards.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `nextBoards.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.filter(..)` [INFO] [stdout] --> src/board.rs:490:52 [INFO] [stdout] | [INFO] [stdout] 490 | let maxScoreBoards = nextBoards.iter().filter_map( [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 491 | | |elem| if elem.score == maxScore { [INFO] [stdout] 492 | | return Some(elem); [INFO] [stdout] 493 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 496 | | ); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:492:21 [INFO] [stdout] | [INFO] [stdout] 492 | return Some(elem); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 492 - return Some(elem); [INFO] [stdout] 492 + Some(elem) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:494:21 [INFO] [stdout] | [INFO] [stdout] 494 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 494 - return None; [INFO] [stdout] 494 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pos` which implements the `Copy` trait [INFO] [stdout] --> src/board.rs:499:26 [INFO] [stdout] | [INFO] [stdout] 499 | let np = nextBoard.pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `nextBoard.pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:590:29 [INFO] [stdout] | [INFO] [stdout] 590 | ... nWhitePieces = nWhitePieces + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `nWhitePieces += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:593:29 [INFO] [stdout] | [INFO] [stdout] 593 | ... nBlackPieces = nBlackPieces + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `nBlackPieces += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/Util.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn textOut<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 13 | texture_creator: &'a TextureCreator, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 10 ~ pub fn textOut( [INFO] [stdout] 11 | canvas: &mut Canvas, [INFO] [stdout] 12 | font: &Font, [INFO] [stdout] 13 ~ texture_creator: &TextureCreator, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/Util.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / pub fn textOut<'a>( [INFO] [stdout] 11 | | canvas: &mut Canvas, [INFO] [stdout] 12 | | font: &Font, [INFO] [stdout] 13 | | texture_creator: &'a TextureCreator, [INFO] [stdout] ... | [INFO] [stdout] 17 | | w: u32, h: u32 // 1文字分の幅と高さ [INFO] [stdout] 18 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> src/Util.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 20 | let rendered_text = texture_creator.create_texture_from_surface(&surface).ok().expect("failed to render text"); [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] 20 - let rendered_text = texture_creator.create_texture_from_surface(&surface).ok().expect("failed to render text"); [INFO] [stdout] 20 + let rendered_text = texture_creator.create_texture_from_surface(&surface).expect("failed to render text"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/board.rs:576:9 [INFO] [stdout] | [INFO] [stdout] 576 | return bestMove; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 576 - return bestMove; [INFO] [stdout] 576 + bestMove [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/board.rs:559:29 [INFO] [stdout] | [INFO] [stdout] 559 | let mut bestScore = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 559 - let mut bestScore = std::i32::MIN; [INFO] [stdout] 559 + let mut bestScore = i32::MIN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:590:29 [INFO] [stdout] | [INFO] [stdout] 590 | ... nWhitePieces = nWhitePieces + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `nWhitePieces += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/board.rs:593:29 [INFO] [stdout] | [INFO] [stdout] 593 | ... nBlackPieces = nBlackPieces + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `nBlackPieces += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/Util.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn textOut<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 13 | texture_creator: &'a TextureCreator, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 10 ~ pub fn textOut( [INFO] [stdout] 11 | canvas: &mut Canvas, [INFO] [stdout] 12 | font: &Font, [INFO] [stdout] 13 ~ texture_creator: &TextureCreator, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/Util.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / pub fn textOut<'a>( [INFO] [stdout] 11 | | canvas: &mut Canvas, [INFO] [stdout] 12 | | font: &Font, [INFO] [stdout] 13 | | texture_creator: &'a TextureCreator, [INFO] [stdout] ... | [INFO] [stdout] 17 | | w: u32, h: u32 // 1文字分の幅と高さ [INFO] [stdout] 18 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> src/Util.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 20 | let rendered_text = texture_creator.create_texture_from_surface(&surface).ok().expect("failed to render text"); [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] 20 - let rendered_text = texture_creator.create_texture_from_surface(&surface).ok().expect("failed to render text"); [INFO] [stdout] 20 + let rendered_text = texture_creator.create_texture_from_surface(&surface).expect("failed to render text"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread` [INFO] [stdout] --> src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use std::thread; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time` [INFO] [stdout] --> src/main.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use std::time; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/main.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `getUserInput` is never used [INFO] [stdout] --> src/main.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn getUserInput(piece: &board::Piece) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test00` is never used [INFO] [stdout] --> src/main.rs:74:4 [INFO] [stdout] | [INFO] [stdout] 74 | fn test00(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test01` is never used [INFO] [stdout] --> src/main.rs:102:4 [INFO] [stdout] | [INFO] [stdout] 102 | fn test01(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test02` is never used [INFO] [stdout] --> src/main.rs:126:4 [INFO] [stdout] | [INFO] [stdout] 126 | fn test02(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test03` is never used [INFO] [stdout] --> src/main.rs:159:4 [INFO] [stdout] | [INFO] [stdout] 159 | fn test03(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test04` is never used [INFO] [stdout] --> src/main.rs:193:4 [INFO] [stdout] | [INFO] [stdout] 193 | fn test04(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 71 - return None; [INFO] [stdout] 71 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:43:17 [INFO] [stdout] | [INFO] [stdout] 43 | let first = line.chars().nth(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | / if first.is_none() { [INFO] [stdout] 45 | | return None; [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ help: replace it with: `first?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/main.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | / if second.is_none() { [INFO] [stdout] 64 | | return None; [INFO] [stdout] 65 | | } [INFO] [stdout] | |_____^ help: replace it with: `second?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/main.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | if let Some(y) = second.unwrap().to_string().parse::().ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(y)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 66 - if let Some(y) = second.unwrap().to_string().parse::().ok() { [INFO] [stdout] 66 + if let Ok(y) = second.unwrap().to_string().parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 67 | if (y >= 1) && (y <= 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=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 implementation of an assign operation [INFO] [stdout] --> src/main.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | c=c+1; [INFO] [stdout] | ^^^^^ help: replace it with: `c += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/main.rs:206:14 [INFO] [stdout] | [INFO] [stdout] 206 | fn drawBoard<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 210 | texture_creator: &'a TextureCreator, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 206 ~ fn drawBoard( [INFO] [stdout] 207 | canvas: &mut Canvas, [INFO] [stdout] 208 | texture: &Texture, [INFO] [stdout] 209 | font: &Font, [INFO] [stdout] 210 ~ texture_creator: &TextureCreator, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/main.rs:211:26 [INFO] [stdout] | [INFO] [stdout] 211 | board: &board::Board) -> () [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 late initialization [INFO] [stdout] --> src/main.rs:221:17 [INFO] [stdout] | [INFO] [stdout] 221 | let src: Rect; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `src` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 221 ~ [INFO] [stdout] 222 ~ let src: Rect = match piece { [INFO] [stdout] 223 | &board::Piece::White => { [INFO] [stdout] 224 ~ Rect::new(192, 0, 96, 96) [INFO] [stdout] 225 | }, [INFO] [stdout] 226 | &board::Piece::Black => { [INFO] [stdout] 227 ~ Rect::new(96, 0, 96, 96) [INFO] [stdout] 228 | }, [INFO] [stdout] 229 | &board::Piece::Space => { [INFO] [stdout] 230 ~ Rect::new(0, 0, 96, 96) [INFO] [stdout] 231 | } [INFO] [stdout] 232 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/main.rs:222:17 [INFO] [stdout] | [INFO] [stdout] 222 | / match piece { [INFO] [stdout] 223 | | &board::Piece::White => { [INFO] [stdout] 224 | | src = Rect::new(192, 0, 96, 96); [INFO] [stdout] 225 | | }, [INFO] [stdout] ... | [INFO] [stdout] 232 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 222 ~ match *piece { [INFO] [stdout] 223 ~ board::Piece::White => { [INFO] [stdout] 224 | src = Rect::new(192, 0, 96, 96); [INFO] [stdout] 225 | }, [INFO] [stdout] 226 ~ board::Piece::Black => { [INFO] [stdout] 227 | src = Rect::new(96, 0, 96, 96); [INFO] [stdout] 228 | }, [INFO] [stdout] 229 ~ board::Piece::Space => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `xChars` [INFO] [stdout] --> src/main.rs:242:14 [INFO] [stdout] | [INFO] [stdout] 242 | for i in 0..xChars.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] 242 - for i in 0..xChars.len() { [INFO] [stdout] 242 + for (i, ) in xChars.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:244:31 [INFO] [stdout] | [INFO] [stdout] 244 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, 5, wl, hl); [INFO] [stdout] | ^^^^^ help: change this to: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:244:38 [INFO] [stdout] | [INFO] [stdout] 244 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, 5, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `texture_creator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:245:31 [INFO] [stdout] | [INFO] [stdout] 245 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, (ps as i32) * 8 + (tm as i32) + 2, wl, hl); [INFO] [stdout] | ^^^^^ help: change this to: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:245:38 [INFO] [stdout] | [INFO] [stdout] 245 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, (ps as i32) * 8 + (tm as i32) + 2, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `texture_creator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/main.rs:245:103 [INFO] [stdout] | [INFO] [stdout] 245 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, (ps as i32) * 8 + (tm as i32) + 2, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `tm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:249:31 [INFO] [stdout] | [INFO] [stdout] 249 | Util::textOut(canvas, &font, &texture_creator, &((i+1) as i32).to_string(), 255, 255, 255, 8, y, wl, hl); [INFO] [stdout] | ^^^^^ help: change this to: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:249:38 [INFO] [stdout] | [INFO] [stdout] 249 | Util::textOut(canvas, &font, &texture_creator, &((i+1) as i32).to_string(), 255, 255, 255, 8, y, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `texture_creator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:250:31 [INFO] [stdout] | [INFO] [stdout] 250 | ... Util::textOut(canvas, &font, &texture_creator, &((i+1) as i32).to_string(), 255, 255, 255, 8 + (ps as i32) * 8 + (tm - 2) as ... [INFO] [stdout] | ^^^^^ help: change this to: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:250:38 [INFO] [stdout] | [INFO] [stdout] 250 | ... Util::textOut(canvas, &font, &texture_creator, &((i+1) as i32).to_string(), 255, 255, 255, 8 + (ps as i32) * 8 + (tm - 2) as ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `texture_creator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/main.rs:250:122 [INFO] [stdout] | [INFO] [stdout] 250 | ...ring(), 255, 255, 255, 8 + (ps as i32) * 8 + (tm - 2) as i32, y, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(tm - 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:275:5 [INFO] [stdout] | [INFO] [stdout] 275 | return Some(board::Pos {x: ix+1, y: iy+1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 275 - return Some(board::Pos {x: ix+1, y: iy+1}); [INFO] [stdout] 275 + Some(board::Pos {x: ix+1, y: iy+1}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:326:51 [INFO] [stdout] | [INFO] [stdout] 326 | let computerPiece = board::Piece::getOpponent(&playerPiece); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `playerPiece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:356:49 [INFO] [stdout] | [INFO] [stdout] 356 | let possibleMoves = board.searchPos(&playerPiece); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `playerPiece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:357:16 [INFO] [stdout] | [INFO] [stdout] 357 | if possibleMoves.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!possibleMoves.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:366:46 [INFO] [stdout] | [INFO] [stdout] 366 | if let Some(ret) = board.put(&playerPiece, &playerPos) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `playerPiece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:393:20 [INFO] [stdout] | [INFO] [stdout] 393 | if result.path.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread` [INFO] [stdout] --> src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use std::thread; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time` [INFO] [stdout] --> src/main.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use std::time; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/main.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `getUserInput` is never used [INFO] [stdout] --> src/main.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn getUserInput(piece: &board::Piece) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test00` is never used [INFO] [stdout] --> src/main.rs:74:4 [INFO] [stdout] | [INFO] [stdout] 74 | fn test00(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test01` is never used [INFO] [stdout] --> src/main.rs:102:4 [INFO] [stdout] | [INFO] [stdout] 102 | fn test01(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test02` is never used [INFO] [stdout] --> src/main.rs:126:4 [INFO] [stdout] | [INFO] [stdout] 126 | fn test02(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test03` is never used [INFO] [stdout] --> src/main.rs:159:4 [INFO] [stdout] | [INFO] [stdout] 159 | fn test03(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test04` is never used [INFO] [stdout] --> src/main.rs:193:4 [INFO] [stdout] | [INFO] [stdout] 193 | fn test04(optBoardPath: Option) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 71 - return None; [INFO] [stdout] 71 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:43:17 [INFO] [stdout] | [INFO] [stdout] 43 | let first = line.chars().nth(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | / if first.is_none() { [INFO] [stdout] 45 | | return None; [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ help: replace it with: `first?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/main.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | / if second.is_none() { [INFO] [stdout] 64 | | return None; [INFO] [stdout] 65 | | } [INFO] [stdout] | |_____^ help: replace it with: `second?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/main.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | if let Some(y) = second.unwrap().to_string().parse::().ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(y)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 66 - if let Some(y) = second.unwrap().to_string().parse::().ok() { [INFO] [stdout] 66 + if let Ok(y) = second.unwrap().to_string().parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 67 | if (y >= 1) && (y <= 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=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 implementation of an assign operation [INFO] [stdout] --> src/main.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | c=c+1; [INFO] [stdout] | ^^^^^ help: replace it with: `c += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/main.rs:206:14 [INFO] [stdout] | [INFO] [stdout] 206 | fn drawBoard<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 210 | texture_creator: &'a TextureCreator, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 206 ~ fn drawBoard( [INFO] [stdout] 207 | canvas: &mut Canvas, [INFO] [stdout] 208 | texture: &Texture, [INFO] [stdout] 209 | font: &Font, [INFO] [stdout] 210 ~ texture_creator: &TextureCreator, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/main.rs:211:26 [INFO] [stdout] | [INFO] [stdout] 211 | board: &board::Board) -> () [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 late initialization [INFO] [stdout] --> src/main.rs:221:17 [INFO] [stdout] | [INFO] [stdout] 221 | let src: Rect; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `src` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 221 ~ [INFO] [stdout] 222 ~ let src: Rect = match piece { [INFO] [stdout] 223 | &board::Piece::White => { [INFO] [stdout] 224 ~ Rect::new(192, 0, 96, 96) [INFO] [stdout] 225 | }, [INFO] [stdout] 226 | &board::Piece::Black => { [INFO] [stdout] 227 ~ Rect::new(96, 0, 96, 96) [INFO] [stdout] 228 | }, [INFO] [stdout] 229 | &board::Piece::Space => { [INFO] [stdout] 230 ~ Rect::new(0, 0, 96, 96) [INFO] [stdout] 231 | } [INFO] [stdout] 232 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/main.rs:222:17 [INFO] [stdout] | [INFO] [stdout] 222 | / match piece { [INFO] [stdout] 223 | | &board::Piece::White => { [INFO] [stdout] 224 | | src = Rect::new(192, 0, 96, 96); [INFO] [stdout] 225 | | }, [INFO] [stdout] ... | [INFO] [stdout] 232 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 222 ~ match *piece { [INFO] [stdout] 223 ~ board::Piece::White => { [INFO] [stdout] 224 | src = Rect::new(192, 0, 96, 96); [INFO] [stdout] 225 | }, [INFO] [stdout] 226 ~ board::Piece::Black => { [INFO] [stdout] 227 | src = Rect::new(96, 0, 96, 96); [INFO] [stdout] 228 | }, [INFO] [stdout] 229 ~ board::Piece::Space => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `xChars` [INFO] [stdout] --> src/main.rs:242:14 [INFO] [stdout] | [INFO] [stdout] 242 | for i in 0..xChars.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] 242 - for i in 0..xChars.len() { [INFO] [stdout] 242 + for (i, ) in xChars.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:244:31 [INFO] [stdout] | [INFO] [stdout] 244 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, 5, wl, hl); [INFO] [stdout] | ^^^^^ help: change this to: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:244:38 [INFO] [stdout] | [INFO] [stdout] 244 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, 5, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `texture_creator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:245:31 [INFO] [stdout] | [INFO] [stdout] 245 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, (ps as i32) * 8 + (tm as i32) + 2, wl, hl); [INFO] [stdout] | ^^^^^ help: change this to: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:245:38 [INFO] [stdout] | [INFO] [stdout] 245 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, (ps as i32) * 8 + (tm as i32) + 2, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `texture_creator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/main.rs:245:103 [INFO] [stdout] | [INFO] [stdout] 245 | Util::textOut(canvas, &font, &texture_creator, xChars[i], 255, 255, 255, x, (ps as i32) * 8 + (tm as i32) + 2, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `tm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:249:31 [INFO] [stdout] | [INFO] [stdout] 249 | Util::textOut(canvas, &font, &texture_creator, &((i+1) as i32).to_string(), 255, 255, 255, 8, y, wl, hl); [INFO] [stdout] | ^^^^^ help: change this to: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:249:38 [INFO] [stdout] | [INFO] [stdout] 249 | Util::textOut(canvas, &font, &texture_creator, &((i+1) as i32).to_string(), 255, 255, 255, 8, y, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `texture_creator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:250:31 [INFO] [stdout] | [INFO] [stdout] 250 | ... Util::textOut(canvas, &font, &texture_creator, &((i+1) as i32).to_string(), 255, 255, 255, 8 + (ps as i32) * 8 + (tm - 2) as ... [INFO] [stdout] | ^^^^^ help: change this to: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:250:38 [INFO] [stdout] | [INFO] [stdout] 250 | ... Util::textOut(canvas, &font, &texture_creator, &((i+1) as i32).to_string(), 255, 255, 255, 8 + (ps as i32) * 8 + (tm - 2) as ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `texture_creator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/main.rs:250:122 [INFO] [stdout] | [INFO] [stdout] 250 | ...ring(), 255, 255, 255, 8 + (ps as i32) * 8 + (tm - 2) as i32, y, wl, hl); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(tm - 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:275:5 [INFO] [stdout] | [INFO] [stdout] 275 | return Some(board::Pos {x: ix+1, y: iy+1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 275 - return Some(board::Pos {x: ix+1, y: iy+1}); [INFO] [stdout] 275 + Some(board::Pos {x: ix+1, y: iy+1}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:326:51 [INFO] [stdout] | [INFO] [stdout] 326 | let computerPiece = board::Piece::getOpponent(&playerPiece); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `playerPiece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:356:49 [INFO] [stdout] | [INFO] [stdout] 356 | let possibleMoves = board.searchPos(&playerPiece); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `playerPiece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:357:16 [INFO] [stdout] | [INFO] [stdout] 357 | if possibleMoves.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!possibleMoves.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.96s [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:366:46 [INFO] [stdout] | [INFO] [stdout] 366 | if let Some(ret) = board.put(&playerPiece, &playerPos) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `playerPiece` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:393:20 [INFO] [stdout] | [INFO] [stdout] 393 | if result.path.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "75f8757febbd7513b8acbea2d04e3e0c9fca94f40941fb4b97b2dacac9162311", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "75f8757febbd7513b8acbea2d04e3e0c9fca94f40941fb4b97b2dacac9162311", kill_on_drop: false }` [INFO] [stdout] 75f8757febbd7513b8acbea2d04e3e0c9fca94f40941fb4b97b2dacac9162311