[INFO] cloning repository https://github.com/ibirley101/words [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ibirley101/words" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fibirley101%2Fwords", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fibirley101%2Fwords'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 21602cd0ea100681f529d0452263aec9048a368a [INFO] linting ibirley101/words against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fibirley101%2Fwords" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ibirley101/words [INFO] finished tweaking git repo https://github.com/ibirley101/words [INFO] tweaked toml for git repo https://github.com/ibirley101/words written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ibirley101/words 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/ibirley101/words already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] e043f5667b64a7bea8624b840c8b06db3f704bfbcc6d983a8019060e5c50724d [INFO] running `Command { std: "docker" "start" "-a" "e043f5667b64a7bea8624b840c8b06db3f704bfbcc6d983a8019060e5c50724d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e043f5667b64a7bea8624b840c8b06db3f704bfbcc6d983a8019060e5c50724d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e043f5667b64a7bea8624b840c8b06db3f704bfbcc6d983a8019060e5c50724d", kill_on_drop: false }` [INFO] [stdout] e043f5667b64a7bea8624b840c8b06db3f704bfbcc6d983a8019060e5c50724d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] d95a709f03fa3079ad956ba4cd703f7b609b5d76b881f27988e76a179b70d7e2 [INFO] running `Command { std: "docker" "start" "-a" "d95a709f03fa3079ad956ba4cd703f7b609b5d76b881f27988e76a179b70d7e2", kill_on_drop: false }` [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking anstream v0.6.20 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking clap_builder v4.5.47 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling clap_derive v4.5.47 [INFO] [stderr] Checking clap v4.5.47 [INFO] [stderr] Checking words v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/game.rs:57:15 [INFO] [stdout] | [INFO] [stdout] 57 | Bag { tiles: tiles, rng: rng } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `tiles` [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/game.rs:57:29 [INFO] [stdout] | [INFO] [stdout] 57 | Bag { tiles: tiles, rng: rng } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `rng` [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/game.rs:97:16 [INFO] [stdout] | [INFO] [stdout] 97 | Rack { tiles: tiles, size: 0 } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `tiles` [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/game.rs:232:17 [INFO] [stdout] | [INFO] [stdout] 232 | Board { board: board, staged_spaces: Vec::new(), word_list: word_list, partials_list: partials_list, neighbors: neighbors } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/game.rs:232:58 [INFO] [stdout] | [INFO] [stdout] 232 | Board { board: board, staged_spaces: Vec::new(), word_list: word_list, partials_list: partials_list, neighbors: neighbors } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `word_list` [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/game.rs:232:80 [INFO] [stdout] | [INFO] [stdout] 232 | Board { board: board, staged_spaces: Vec::new(), word_list: word_list, partials_list: partials_list, neighbors: neighbors } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `partials_list` [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/game.rs:232:110 [INFO] [stdout] | [INFO] [stdout] 232 | Board { board: board, staged_spaces: Vec::new(), word_list: word_list, partials_list: partials_list, neighbors: neighbors } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `neighbors` [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/shell.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | bag: bag, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `bag` [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/shell.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | board: board, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/shell.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | player: player, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `player` [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/game.rs:57:15 [INFO] [stdout] | [INFO] [stdout] 57 | Bag { tiles: tiles, rng: rng } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `tiles` [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/game.rs:57:29 [INFO] [stdout] | [INFO] [stdout] 57 | Bag { tiles: tiles, rng: rng } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `rng` [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/game.rs:97:16 [INFO] [stdout] | [INFO] [stdout] 97 | Rack { tiles: tiles, size: 0 } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `tiles` [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/game.rs:232:17 [INFO] [stdout] | [INFO] [stdout] 232 | Board { board: board, staged_spaces: Vec::new(), word_list: word_list, partials_list: partials_list, neighbors: neighbors } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/game.rs:232:58 [INFO] [stdout] | [INFO] [stdout] 232 | Board { board: board, staged_spaces: Vec::new(), word_list: word_list, partials_list: partials_list, neighbors: neighbors } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `word_list` [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/game.rs:232:80 [INFO] [stdout] | [INFO] [stdout] 232 | Board { board: board, staged_spaces: Vec::new(), word_list: word_list, partials_list: partials_list, neighbors: neighbors } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `partials_list` [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/game.rs:232:110 [INFO] [stdout] | [INFO] [stdout] 232 | Board { board: board, staged_spaces: Vec::new(), word_list: word_list, partials_list: partials_list, neighbors: neighbors } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `neighbors` [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/shell.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | bag: bag, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `bag` [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/shell.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | board: board, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/shell.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | player: player, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `player` [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: you should consider adding a `Default` implementation for `Bag` [INFO] [stdout] --> src/game.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | let mut tiles = vec![ [INFO] [stdout] 26 | | 'A','A','A','A','A','A','A','A','A', [INFO] [stdout] 27 | | 'B','B', [INFO] [stdout] ... | [INFO] [stdout] 57 | | Bag { tiles: tiles, rng: rng } [INFO] [stdout] 58 | | } [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] 23 + impl Default for Bag { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Rack` [INFO] [stdout] --> src/game.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | / pub fn new() -> Self { [INFO] [stdout] 96 | | let tiles = [0; 128]; [INFO] [stdout] 97 | | Rack { tiles: tiles, size: 0 } [INFO] [stdout] 98 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 94 + impl Default for Rack { [INFO] [stdout] 95 + fn default() -> Self { [INFO] [stdout] 96 + Self::new() [INFO] [stdout] 97 + } [INFO] [stdout] 98 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/game.rs:132:13 [INFO] [stdout] | [INFO] [stdout] 132 | result.push('*'); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec!['*';SIZE]` [INFO] [stdout] = help: or `result.extend(std::iter::repeat_n('*', SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/game.rs:166:13 [INFO] [stdout] | [INFO] [stdout] 166 | result.push('*'); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec!['*';SIZE]` [INFO] [stdout] = help: or `result.extend(std::iter::repeat_n('*', SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/game.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 172 - print!("\n"); [INFO] [stdout] 172 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/game.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | / let mut board: Vec> = Vec::new(); [INFO] [stdout] 212 | | [INFO] [stdout] 213 | | board.push(vec![tw.clone(), id.clone(), id.clone(), dl.clone(), id.clone(), id.clone(), id.clone(), tw.clone(), id.clone(), id.clone(), id.clone(), dl.clone(), id.clone(), id.clone(), tw.clone()]); [INFO] [stdout] 214 | | board.push(vec![id.clone(), dw.clone(), id.clone(), id.clone(), id.clone(), tl.clone(), id.clone(), id.clone(), id.clone(), tl.clone(), id.clone(), id.clone(), id.clone(), dw.clone(), id.clone()]); [INFO] [stdout] ... | [INFO] [stdout] 226 | | board.push(vec![id.clone(), dw.clone(), id.clone(), id.clone(), id.clone(), tl.clone(), id.clone(), id.clone(), id.clone(), tl.clone(), id.clone(), id.clone(), id.clone(), dw.clone(), id.clone()]); [INFO] [stdout] 227 | | board.push(vec![tw.clone(), id.clone(), id.clone(), dl.clone(), id.clone(), id.clone(), id.clone(), tw.clone(), id.clone(), id.clone(), id.clone(), dl.clone(), id.clone(), id.clone(), tw.clone()]); [INFO] [stdout] | |_____________________________________________________________________________________________________________________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let board: Vec> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/game.rs:318:21 [INFO] [stdout] | [INFO] [stdout] 318 | let start = match self.get_upmost_row(row, col) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 319 | | Some(n) => n, [INFO] [stdout] 320 | | None => return None, [INFO] [stdout] 321 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.get_upmost_row(row, col)?` [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 `match` expression can be replaced with `?` [INFO] [stdout] --> src/game.rs:322:19 [INFO] [stdout] | [INFO] [stdout] 322 | let end = match self.get_downmost_row(row, col) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 323 | | Some(n) => n, [INFO] [stdout] 324 | | None => return None, [INFO] [stdout] 325 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.get_downmost_row(row, col)?` [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: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/game.rs:347:21 [INFO] [stdout] | [INFO] [stdout] 347 | let start = match self.get_leftmost_col(row, col) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 348 | | Some(n) => n, [INFO] [stdout] 349 | | None => return None, [INFO] [stdout] 350 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.get_leftmost_col(row, col)?` [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: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/game.rs:351:19 [INFO] [stdout] | [INFO] [stdout] 351 | let end = match self.get_rightmost_col(row, col) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 352 | | Some(n) => n, [INFO] [stdout] 353 | | None => return None, [INFO] [stdout] 354 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.get_rightmost_col(row, col)?` [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: this boolean expression can be simplified [INFO] [stdout] --> src/game.rs:463:16 [INFO] [stdout] | [INFO] [stdout] 463 | if !word.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `word.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game.rs:472:16 [INFO] [stdout] | [INFO] [stdout] 472 | if !word.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `word.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `word` after checking its variant with `is_none` [INFO] [stdout] --> src/game.rs:464:28 [INFO] [stdout] | [INFO] [stdout] 463 | if !word.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 464 | let word = word.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `word` after checking its variant with `is_none` [INFO] [stdout] --> src/game.rs:473:28 [INFO] [stdout] | [INFO] [stdout] 472 | if !word.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 473 | let word = word.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/game.rs:757:13 [INFO] [stdout] | [INFO] [stdout] 757 | let cross_score; [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 `cross_score` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 757 ~ [INFO] [stdout] 758 ~ let cross_score = if across { [INFO] [stdout] 759 ~ self.score_down(space.0, space.1) [INFO] [stdout] 760 | } [INFO] [stdout] 761 | else { [INFO] [stdout] 762 ~ self.score_across(space.0, space.1) [INFO] [stdout] 763 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Bag` [INFO] [stdout] --> src/game.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | let mut tiles = vec![ [INFO] [stdout] 26 | | 'A','A','A','A','A','A','A','A','A', [INFO] [stdout] 27 | | 'B','B', [INFO] [stdout] ... | [INFO] [stdout] 57 | | Bag { tiles: tiles, rng: rng } [INFO] [stdout] 58 | | } [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] 23 + impl Default for Bag { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/game.rs:889:9 [INFO] [stdout] | [INFO] [stdout] 889 | write!(&mut result, " 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 889 - write!(&mut result, " 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14\n").unwrap(); [INFO] [stdout] 889 + writeln!(&mut result, " 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `count` is used as a loop counter [INFO] [stdout] --> src/game.rs:890:9 [INFO] [stdout] | [INFO] [stdout] 890 | for row in &self.board { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (count, row) in self.board.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Rack` [INFO] [stdout] --> src/game.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | / pub fn new() -> Self { [INFO] [stdout] 96 | | let tiles = [0; 128]; [INFO] [stdout] 97 | | Rack { tiles: tiles, size: 0 } [INFO] [stdout] 98 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 94 + impl Default for Rack { [INFO] [stdout] 95 + fn default() -> Self { [INFO] [stdout] 96 + Self::new() [INFO] [stdout] 97 + } [INFO] [stdout] 98 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/game.rs:132:13 [INFO] [stdout] | [INFO] [stdout] 132 | result.push('*'); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec!['*';SIZE]` [INFO] [stdout] = help: or `result.extend(std::iter::repeat_n('*', SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `curr_col` is used as a loop counter [INFO] [stdout] --> src/game.rs:935:9 [INFO] [stdout] | [INFO] [stdout] 935 | for c in word.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (curr_col, c) in (col..).zip(word.chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/game.rs:166:13 [INFO] [stdout] | [INFO] [stdout] 166 | result.push('*'); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec!['*';SIZE]` [INFO] [stdout] = help: or `result.extend(std::iter::repeat_n('*', SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/game.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 172 - print!("\n"); [INFO] [stdout] 172 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `curr_row` is used as a loop counter [INFO] [stdout] --> src/game.rs:960:9 [INFO] [stdout] | [INFO] [stdout] 960 | for c in word.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (curr_row, c) in (row..).zip(word.chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `curr_col` is used as a loop counter [INFO] [stdout] --> src/game.rs:983:9 [INFO] [stdout] | [INFO] [stdout] 983 | for c in word.to_ascii_uppercase().chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (curr_col, c) in (col..).zip(word.to_ascii_uppercase().chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `curr_row` is used as a loop counter [INFO] [stdout] --> src/game.rs:1013:9 [INFO] [stdout] | [INFO] [stdout] 1013 | for c in word.to_ascii_uppercase().chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (curr_row, c) in (row..).zip(word.to_ascii_uppercase().chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/game.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | / let mut board: Vec> = Vec::new(); [INFO] [stdout] 212 | | [INFO] [stdout] 213 | | board.push(vec![tw.clone(), id.clone(), id.clone(), dl.clone(), id.clone(), id.clone(), id.clone(), tw.clone(), id.clone(), id.clone(), id.clone(), dl.clone(), id.clone(), id.clone(), tw.clone()]); [INFO] [stdout] 214 | | board.push(vec![id.clone(), dw.clone(), id.clone(), id.clone(), id.clone(), tl.clone(), id.clone(), id.clone(), id.clone(), tl.clone(), id.clone(), id.clone(), id.clone(), dw.clone(), id.clone()]); [INFO] [stdout] ... | [INFO] [stdout] 226 | | board.push(vec![id.clone(), dw.clone(), id.clone(), id.clone(), id.clone(), tl.clone(), id.clone(), id.clone(), id.clone(), tl.clone(), id.clone(), id.clone(), id.clone(), dw.clone(), id.clone()]); [INFO] [stdout] 227 | | board.push(vec![tw.clone(), id.clone(), id.clone(), dl.clone(), id.clone(), id.clone(), id.clone(), tw.clone(), id.clone(), id.clone(), id.clone(), dl.clone(), id.clone(), id.clone(), tw.clone()]); [INFO] [stdout] | |_____________________________________________________________________________________________________________________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let board: Vec> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/player.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let turn_result; [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] help: move the declaration `turn_result` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ let turn_result = if self.cpu { [INFO] [stdout] 44 ~ self.play_turn_cpu(board, bag) [INFO] [stdout] 45 | } else { [INFO] [stdout] 46 ~ self.play_turn_player(board, bag) [INFO] [stdout] 47 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `find_greediest_word` doesn't need a mutable reference [INFO] [stdout] --> src/player.rs:61:54 [INFO] [stdout] | [INFO] [stdout] 61 | let word_choice = find_greediest_word(board, &mut self.rack); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 61 - let word_choice = find_greediest_word(board, &mut self.rack); [INFO] [stdout] 61 + let word_choice = find_greediest_word(board, &self.rack); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/game.rs:318:21 [INFO] [stdout] | [INFO] [stdout] 318 | let start = match self.get_upmost_row(row, col) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 319 | | Some(n) => n, [INFO] [stdout] 320 | | None => return None, [INFO] [stdout] 321 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.get_upmost_row(row, col)?` [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: unneeded late initialization [INFO] [stdout] --> src/shell.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | let cmd; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 83 | / cmd = match iter.next() { [INFO] [stdout] 84 | | Some(s) => s.to_string(), [INFO] [stdout] 85 | | None => String::new(), [INFO] [stdout] 86 | | }; [INFO] [stdout] | |_________^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `cmd` here [INFO] [stdout] | [INFO] [stdout] 79 ~ [INFO] [stdout] 80 | let mut args = Vec::new(); [INFO] [stdout] 81 | [INFO] [stdout] 82 | let mut iter = line.split_whitespace(); [INFO] [stdout] 83 ~ let cmd = match iter.next() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/shell.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | while let Some(s) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/game.rs:322:19 [INFO] [stdout] | [INFO] [stdout] 322 | let end = match self.get_downmost_row(row, col) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 323 | | Some(n) => n, [INFO] [stdout] 324 | | None => return None, [INFO] [stdout] 325 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.get_downmost_row(row, col)?` [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: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/game.rs:347:21 [INFO] [stdout] | [INFO] [stdout] 347 | let start = match self.get_leftmost_col(row, col) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 348 | | Some(n) => n, [INFO] [stdout] 349 | | None => return None, [INFO] [stdout] 350 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.get_leftmost_col(row, col)?` [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: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/game.rs:351:19 [INFO] [stdout] | [INFO] [stdout] 351 | let end = match self.get_rightmost_col(row, col) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 352 | | Some(n) => n, [INFO] [stdout] 353 | | None => return None, [INFO] [stdout] 354 | | }; [INFO] [stdout] | |_________^ help: try instead: `self.get_rightmost_col(row, col)?` [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: unneeded late initialization [INFO] [stdout] --> src/shell.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | let letter; [INFO] [stdout] | ^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 116 | letter = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `letter` here [INFO] [stdout] | [INFO] [stdout] 107 ~ [INFO] [stdout] 108 | let row; [INFO] [stdout] ... [INFO] [stdout] 115 | row = args.pop().expect("Vector is length 3."); [INFO] [stdout] 116 ~ let letter = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | let row; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 115 | row = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `row` here [INFO] [stdout] | [INFO] [stdout] 108 ~ [INFO] [stdout] 109 | let col; [INFO] [stdout] ... [INFO] [stdout] 114 | col = args.pop().expect("Vector is length 3."); [INFO] [stdout] 115 ~ let row = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | let col; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 114 | col = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `col` here [INFO] [stdout] | [INFO] [stdout] 109 ~ [INFO] [stdout] 110 | if args.len() != 3 { [INFO] [stdout] ... [INFO] [stdout] 113 | } [INFO] [stdout] 114 ~ let col = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | let word; [INFO] [stdout] | ^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 164 | word = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `word` here [INFO] [stdout] | [INFO] [stdout] 155 ~ [INFO] [stdout] 156 | let row; [INFO] [stdout] ... [INFO] [stdout] 163 | row = args.pop().expect("Vector is length 3."); [INFO] [stdout] 164 ~ let word = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | let row; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 163 | row = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `row` here [INFO] [stdout] | [INFO] [stdout] 156 ~ [INFO] [stdout] 157 | let col; [INFO] [stdout] ... [INFO] [stdout] 162 | col = args.pop().expect("Vector is length 3."); [INFO] [stdout] 163 ~ let row = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | let col; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 162 | col = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `col` here [INFO] [stdout] | [INFO] [stdout] 157 ~ [INFO] [stdout] 158 | if args.len() != 3 { [INFO] [stdout] ... [INFO] [stdout] 161 | } [INFO] [stdout] 162 ~ let col = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game.rs:463:16 [INFO] [stdout] | [INFO] [stdout] 463 | if !word.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `word.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game.rs:472:16 [INFO] [stdout] | [INFO] [stdout] 472 | if !word.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `word.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `word` after checking its variant with `is_none` [INFO] [stdout] --> src/game.rs:464:28 [INFO] [stdout] | [INFO] [stdout] 463 | if !word.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 464 | let word = word.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `word` after checking its variant with `is_none` [INFO] [stdout] --> src/game.rs:473:28 [INFO] [stdout] | [INFO] [stdout] 472 | if !word.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 473 | let word = word.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/shell.rs:216:16 [INFO] [stdout] | [INFO] [stdout] 216 | if args.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.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/shell.rs:220:51 [INFO] [stdout] | [INFO] [stdout] 220 | let word_choice = find_greediest_word(&mut self.board, &self.player.rack); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `self.board` [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/shell.rs:301:34 [INFO] [stdout] | [INFO] [stdout] 301 | if self.player.rack.swap(&mut self.bag, to_swap) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.bag` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/greedy.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 32 | tiles: &Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 ~ tiles: &[char], [INFO] [stdout] 33 | row: usize, [INFO] [stdout] ... [INFO] [stdout] 66 | board.put_tile(*letter, candidate.0, candidate.1); [INFO] [stdout] 67 ~ let mut tiles_copy = tiles.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/greedy.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | let across_candidates; [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] help: move the declaration `across_candidates` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 37 ~ [INFO] [stdout] 38 ~ let across_candidates = if board.get_tile(row, col) == '-' { [INFO] [stdout] 39 ~ vec![(row, col)] [INFO] [stdout] 40 | } else { [INFO] [stdout] 41 ~ get_across_candidates(board, row, col) [INFO] [stdout] 42 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/greedy.rs:44:50 [INFO] [stdout] | [INFO] [stdout] 44 | let substr = board.get_word_across(row, col).unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/greedy.rs:77:12 [INFO] [stdout] | [INFO] [stdout] 77 | tiles: &Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 77 ~ tiles: &[char], [INFO] [stdout] 78 | row: usize, [INFO] [stdout] ... [INFO] [stdout] 111 | board.put_tile(*letter, candidate.0, candidate.1); [INFO] [stdout] 112 ~ let mut tiles_copy = tiles.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/greedy.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | let down_candidates; [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] help: move the declaration `down_candidates` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 82 ~ [INFO] [stdout] 83 ~ let down_candidates = if board.get_tile(row, col) == '-' { [INFO] [stdout] 84 ~ vec![(row, col)] [INFO] [stdout] 85 | } else { [INFO] [stdout] 86 ~ get_down_candidates(board, row, col) [INFO] [stdout] 87 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/greedy.rs:89:48 [INFO] [stdout] | [INFO] [stdout] 89 | let substr = board.get_word_down(row, col).unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/game.rs:757:13 [INFO] [stdout] | [INFO] [stdout] 757 | let cross_score; [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 `cross_score` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 757 ~ [INFO] [stdout] 758 ~ let cross_score = if across { [INFO] [stdout] 759 ~ self.score_down(space.0, space.1) [INFO] [stdout] 760 | } [INFO] [stdout] 761 | else { [INFO] [stdout] 762 ~ self.score_across(space.0, space.1) [INFO] [stdout] 763 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/game.rs:889:9 [INFO] [stdout] | [INFO] [stdout] 889 | write!(&mut result, " 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 889 - write!(&mut result, " 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14\n").unwrap(); [INFO] [stdout] 889 + writeln!(&mut result, " 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `count` is used as a loop counter [INFO] [stdout] --> src/game.rs:890:9 [INFO] [stdout] | [INFO] [stdout] 890 | for row in &self.board { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (count, row) in self.board.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `curr_col` is used as a loop counter [INFO] [stdout] --> src/game.rs:935:9 [INFO] [stdout] | [INFO] [stdout] 935 | for c in word.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (curr_col, c) in (col..).zip(word.chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `curr_row` is used as a loop counter [INFO] [stdout] --> src/game.rs:960:9 [INFO] [stdout] | [INFO] [stdout] 960 | for c in word.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (curr_row, c) in (row..).zip(word.chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `curr_col` is used as a loop counter [INFO] [stdout] --> src/game.rs:983:9 [INFO] [stdout] | [INFO] [stdout] 983 | for c in word.to_ascii_uppercase().chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (curr_col, c) in (col..).zip(word.to_ascii_uppercase().chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `curr_row` is used as a loop counter [INFO] [stdout] --> src/game.rs:1013:9 [INFO] [stdout] | [INFO] [stdout] 1013 | for c in word.to_ascii_uppercase().chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (curr_row, c) in (row..).zip(word.to_ascii_uppercase().chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/player.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let turn_result; [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] help: move the declaration `turn_result` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ let turn_result = if self.cpu { [INFO] [stdout] 44 ~ self.play_turn_cpu(board, bag) [INFO] [stdout] 45 | } else { [INFO] [stdout] 46 ~ self.play_turn_player(board, bag) [INFO] [stdout] 47 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `find_greediest_word` doesn't need a mutable reference [INFO] [stdout] --> src/player.rs:61:54 [INFO] [stdout] | [INFO] [stdout] 61 | let word_choice = find_greediest_word(board, &mut self.rack); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 61 - let word_choice = find_greediest_word(board, &mut self.rack); [INFO] [stdout] 61 + let word_choice = find_greediest_word(board, &self.rack); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | let cmd; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 83 | / cmd = match iter.next() { [INFO] [stdout] 84 | | Some(s) => s.to_string(), [INFO] [stdout] 85 | | None => String::new(), [INFO] [stdout] 86 | | }; [INFO] [stdout] | |_________^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `cmd` here [INFO] [stdout] | [INFO] [stdout] 79 ~ [INFO] [stdout] 80 | let mut args = Vec::new(); [INFO] [stdout] 81 | [INFO] [stdout] 82 | let mut iter = line.split_whitespace(); [INFO] [stdout] 83 ~ let cmd = match iter.next() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/shell.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | while let Some(s) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | let letter; [INFO] [stdout] | ^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 116 | letter = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `letter` here [INFO] [stdout] | [INFO] [stdout] 107 ~ [INFO] [stdout] 108 | let row; [INFO] [stdout] ... [INFO] [stdout] 115 | row = args.pop().expect("Vector is length 3."); [INFO] [stdout] 116 ~ let letter = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | let row; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 115 | row = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `row` here [INFO] [stdout] | [INFO] [stdout] 108 ~ [INFO] [stdout] 109 | let col; [INFO] [stdout] ... [INFO] [stdout] 114 | col = args.pop().expect("Vector is length 3."); [INFO] [stdout] 115 ~ let row = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | let col; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 114 | col = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `col` here [INFO] [stdout] | [INFO] [stdout] 109 ~ [INFO] [stdout] 110 | if args.len() != 3 { [INFO] [stdout] ... [INFO] [stdout] 113 | } [INFO] [stdout] 114 ~ let col = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | let word; [INFO] [stdout] | ^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 164 | word = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `word` here [INFO] [stdout] | [INFO] [stdout] 155 ~ [INFO] [stdout] 156 | let row; [INFO] [stdout] ... [INFO] [stdout] 163 | row = args.pop().expect("Vector is length 3."); [INFO] [stdout] 164 ~ let word = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | let row; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 163 | row = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `row` here [INFO] [stdout] | [INFO] [stdout] 156 ~ [INFO] [stdout] 157 | let col; [INFO] [stdout] ... [INFO] [stdout] 162 | col = args.pop().expect("Vector is length 3."); [INFO] [stdout] 163 ~ let row = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/shell.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | let col; [INFO] [stdout] | ^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 162 | col = args.pop().expect("Vector is length 3."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `col` here [INFO] [stdout] | [INFO] [stdout] 157 ~ [INFO] [stdout] 158 | if args.len() != 3 { [INFO] [stdout] ... [INFO] [stdout] 161 | } [INFO] [stdout] 162 ~ let col = args.pop().expect("Vector is length 3."); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/shell.rs:216:16 [INFO] [stdout] | [INFO] [stdout] 216 | if args.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.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/shell.rs:220:51 [INFO] [stdout] | [INFO] [stdout] 220 | let word_choice = find_greediest_word(&mut self.board, &self.player.rack); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `self.board` [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/shell.rs:301:34 [INFO] [stdout] | [INFO] [stdout] 301 | if self.player.rack.swap(&mut self.bag, to_swap) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.bag` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/greedy.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 32 | tiles: &Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 ~ tiles: &[char], [INFO] [stdout] 33 | row: usize, [INFO] [stdout] ... [INFO] [stdout] 66 | board.put_tile(*letter, candidate.0, candidate.1); [INFO] [stdout] 67 ~ let mut tiles_copy = tiles.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/greedy.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | let across_candidates; [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] help: move the declaration `across_candidates` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 37 ~ [INFO] [stdout] 38 ~ let across_candidates = if board.get_tile(row, col) == '-' { [INFO] [stdout] 39 ~ vec![(row, col)] [INFO] [stdout] 40 | } else { [INFO] [stdout] 41 ~ get_across_candidates(board, row, col) [INFO] [stdout] 42 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/greedy.rs:44:50 [INFO] [stdout] | [INFO] [stdout] 44 | let substr = board.get_word_across(row, col).unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/greedy.rs:77:12 [INFO] [stdout] | [INFO] [stdout] 77 | tiles: &Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 77 ~ tiles: &[char], [INFO] [stdout] 78 | row: usize, [INFO] [stdout] ... [INFO] [stdout] 111 | board.put_tile(*letter, candidate.0, candidate.1); [INFO] [stdout] 112 ~ let mut tiles_copy = tiles.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/greedy.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | let down_candidates; [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] help: move the declaration `down_candidates` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 82 ~ [INFO] [stdout] 83 ~ let down_candidates = if board.get_tile(row, col) == '-' { [INFO] [stdout] 84 ~ vec![(row, col)] [INFO] [stdout] 85 | } else { [INFO] [stdout] 86 ~ get_down_candidates(board, row, col) [INFO] [stdout] 87 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/greedy.rs:89:48 [INFO] [stdout] | [INFO] [stdout] 89 | let substr = board.get_word_down(row, col).unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | CPU, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/main.rs:48:38 [INFO] [stdout] | [INFO] [stdout] 48 | fn initialize_players(args: Args) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] = note: `#[warn(clippy::vec_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `id` is used as a loop counter [INFO] [stdout] --> src/main.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | for player_type in player_types { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (id, player_type) in (1..).zip(player_types.into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/main.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | fn run(mut players: Vec>) -> io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | CPU, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/main.rs:48:38 [INFO] [stdout] | [INFO] [stdout] 48 | fn initialize_players(args: Args) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] = note: `#[warn(clippy::vec_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `id` is used as a loop counter [INFO] [stdout] --> src/main.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | for player_type in player_types { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (id, player_type) in (1..).zip(player_types.into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/main.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | fn run(mut players: Vec>) -> io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.24s [INFO] running `Command { std: "docker" "inspect" "d95a709f03fa3079ad956ba4cd703f7b609b5d76b881f27988e76a179b70d7e2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d95a709f03fa3079ad956ba4cd703f7b609b5d76b881f27988e76a179b70d7e2", kill_on_drop: false }` [INFO] [stdout] d95a709f03fa3079ad956ba4cd703f7b609b5d76b881f27988e76a179b70d7e2