[INFO] cloning repository https://github.com/mgeo99/cfr [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mgeo99/cfr" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmgeo99%2Fcfr", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmgeo99%2Fcfr'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c258b3bcf63254c1159ce84f847abe05e6ac3584 [INFO] linting mgeo99/cfr against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmgeo99%2Fcfr" "/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/mgeo99/cfr [INFO] finished tweaking git repo https://github.com/mgeo99/cfr [INFO] tweaked toml for git repo https://github.com/mgeo99/cfr written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mgeo99/cfr 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/mgeo99/cfr already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded text_io v0.1.9 [INFO] [stderr] Downloaded serde_derive v1.0.132 [INFO] [stderr] Downloaded quote v1.0.14 [INFO] [stderr] Downloaded futures-io v0.3.19 [INFO] [stderr] Downloaded gdk-pixbuf v0.9.0 [INFO] [stderr] Downloaded relm v0.20.0 [INFO] [stderr] Downloaded rand_hc v0.3.1 [INFO] [stderr] Downloaded strum_macros v0.18.0 [INFO] [stderr] Downloaded ndarray-rand v0.14.0 [INFO] [stderr] Downloaded futures-sink v0.3.19 [INFO] [stderr] Downloaded system-deps v1.3.2 [INFO] [stderr] Downloaded cairo-sys-rs v0.10.0 [INFO] [stderr] Downloaded noisy_float v0.2.0 [INFO] [stderr] Downloaded ppv-lite86 v0.2.15 [INFO] [stderr] Downloaded getrandom v0.2.3 [INFO] [stderr] Downloaded rand_distr v0.4.2 [INFO] [stderr] Downloaded indexmap v1.7.0 [INFO] [stderr] Downloaded rand v0.8.4 [INFO] [stderr] Downloaded gio-sys v0.10.1 [INFO] [stderr] Downloaded unicode-segmentation v1.8.0 [INFO] [stderr] Downloaded gtk-sys v0.10.0 [INFO] [stderr] Downloaded futures-util v0.3.19 [INFO] [stderr] Downloaded gio v0.9.1 [INFO] [stderr] Downloaded rayon v1.5.1 [INFO] [stderr] Downloaded glib v0.10.3 [INFO] [stderr] Downloaded crossbeam-channel v0.5.1 [INFO] [stderr] Downloaded syn v1.0.84 [INFO] [stderr] Downloaded gdk v0.13.2 [INFO] [stderr] Downloaded anyhow v1.0.52 [INFO] [stderr] Downloaded ndarray-stats v0.5.0 [INFO] [stderr] Downloaded rayon-core v1.9.1 [INFO] [stderr] Downloaded cc v1.0.72 [INFO] [stderr] Downloaded futures v0.3.19 [INFO] [stderr] Downloaded gdk-sys v0.10.0 [INFO] [stderr] Downloaded once_cell v1.9.0 [INFO] [stderr] Downloaded pango v0.9.1 [INFO] [stderr] Downloaded serde v1.0.132 [INFO] [stderr] Downloaded serde_json v1.0.73 [INFO] [stderr] Downloaded crossbeam-epoch v0.9.5 [INFO] [stderr] Downloaded crossbeam-utils v0.8.5 [INFO] [stderr] Downloaded atk v0.9.0 [INFO] [stderr] Downloaded gtk v0.9.2 [INFO] [stderr] Downloaded libc v0.2.112 [INFO] [stderr] Downloaded cairo-rs v0.9.1 [INFO] [stderr] Downloaded glib-sys v0.10.1 [INFO] [stderr] Downloaded atk-sys v0.10.0 [INFO] [stderr] Downloaded futures-channel v0.3.19 [INFO] [stderr] Downloaded pin-project-lite v0.2.7 [INFO] [stderr] Downloaded pango-sys v0.10.0 [INFO] [stderr] Downloaded gobject-sys v0.10.0 [INFO] [stderr] Downloaded gdk-pixbuf-sys v0.10.0 [INFO] [stderr] Downloaded futures-executor v0.3.19 [INFO] [stderr] Downloaded strum v0.18.0 [INFO] [stderr] Downloaded futures-core v0.3.19 [INFO] [stderr] Downloaded futures-task v0.3.19 [INFO] [stderr] Downloaded futures-macro v0.3.19 [INFO] [stderr] Downloaded glib-macros v0.10.1 [INFO] [stderr] Downloaded relm-derive v0.22.0 [INFO] [stderr] Downloaded version-compare v0.0.10 [INFO] [stderr] Downloaded fst v0.4.7 [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] 5b70f8234d3575164c5b53d90991ccee7ef04bb148a592439859678b180ad875 [INFO] running `Command { std: "docker" "start" "-a" "5b70f8234d3575164c5b53d90991ccee7ef04bb148a592439859678b180ad875", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5b70f8234d3575164c5b53d90991ccee7ef04bb148a592439859678b180ad875", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5b70f8234d3575164c5b53d90991ccee7ef04bb148a592439859678b180ad875", kill_on_drop: false }` [INFO] [stdout] 5b70f8234d3575164c5b53d90991ccee7ef04bb148a592439859678b180ad875 [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] 39cae0df8618555775871cf561dfa1613f813ff198da32dca563d1889cffef26 [INFO] running `Command { std: "docker" "start" "-a" "39cae0df8618555775871cf561dfa1613f813ff198da32dca563d1889cffef26", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.36 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling syn v1.0.84 [INFO] [stderr] Compiling serde v1.0.132 [INFO] [stderr] Compiling unicode-segmentation v1.8.0 [INFO] [stderr] Compiling pkg-config v0.3.24 [INFO] [stderr] Compiling version-compare v0.0.10 [INFO] [stderr] Compiling strum v0.18.0 [INFO] [stderr] Compiling libc v0.2.112 [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling futures-core v0.3.19 [INFO] [stderr] Compiling heck v0.3.3 [INFO] [stderr] Compiling memchr v2.4.1 [INFO] [stderr] Compiling futures-task v0.3.19 [INFO] [stderr] Compiling futures-channel v0.3.19 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Checking futures-sink v0.3.19 [INFO] [stderr] Compiling futures-util v0.3.19 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling quote v1.0.14 [INFO] [stderr] Checking pin-project-lite v0.2.7 [INFO] [stderr] Compiling anyhow v1.0.52 [INFO] [stderr] Checking slab v0.4.5 [INFO] [stderr] Checking futures-io v0.3.19 [INFO] [stderr] Compiling either v1.6.1 [INFO] [stderr] Compiling libm v0.2.1 [INFO] [stderr] Compiling itertools v0.9.0 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Checking once_cell v1.9.0 [INFO] [stderr] Checking bitflags v1.3.2 [INFO] [stderr] Compiling serde_derive v1.0.132 [INFO] [stderr] Compiling crossbeam-utils v0.8.5 [INFO] [stderr] Checking getrandom v0.2.3 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Compiling gio v0.9.1 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling crossbeam-epoch v0.9.5 [INFO] [stderr] Compiling proc-macro2 v0.4.30 [INFO] [stderr] Checking ppv-lite86 v0.2.15 [INFO] [stderr] Compiling gdk-pixbuf v0.9.0 [INFO] [stderr] Compiling pango v0.9.1 [INFO] [stderr] Compiling cairo-rs v0.9.1 [INFO] [stderr] Compiling atk v0.9.0 [INFO] [stderr] Compiling gdk v0.13.2 [INFO] [stderr] Checking rawpointer v0.2.1 [INFO] [stderr] Checking unicode-xid v0.1.0 [INFO] [stderr] Compiling rayon-core v1.9.1 [INFO] [stderr] Checking matrixmultiply v0.3.2 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Compiling gtk v0.9.2 [INFO] [stderr] Checking rand v0.8.4 [INFO] [stderr] Compiling indexmap v1.7.0 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling syn v0.15.44 [INFO] [stderr] Checking quote v0.6.13 [INFO] [stderr] Checking crossbeam-deque v0.8.1 [INFO] [stderr] Checking crossbeam-channel v0.5.1 [INFO] [stderr] Checking num_cpus v1.13.1 [INFO] [stderr] Compiling rayon v1.5.1 [INFO] [stderr] Checking num-complex v0.4.0 [INFO] [stderr] Compiling serde_json v1.0.73 [INFO] [stderr] Compiling fst v0.4.7 [INFO] [stderr] Checking hashbrown v0.11.2 [INFO] [stderr] Checking noisy_float v0.2.0 [INFO] [stderr] Checking itertools v0.10.3 [INFO] [stderr] Checking itoa v1.0.1 [INFO] [stderr] Checking rand_distr v0.4.2 [INFO] [stderr] Checking ryu v1.0.9 [INFO] [stderr] Checking text_io v0.1.9 [INFO] [stderr] Compiling toml v0.5.8 [INFO] [stderr] Compiling proc-macro-crate v0.1.5 [INFO] [stderr] Compiling thiserror-impl v1.0.30 [INFO] [stderr] Compiling strum_macros v0.18.0 [INFO] [stderr] Compiling futures-macro v0.3.19 [INFO] [stderr] Compiling glib-macros v0.10.1 [INFO] [stderr] Compiling relm-derive v0.22.0 [INFO] [stderr] Compiling thiserror v1.0.30 [INFO] [stderr] Compiling system-deps v1.3.2 [INFO] [stderr] Compiling glib-sys v0.10.1 [INFO] [stderr] Compiling gobject-sys v0.10.0 [INFO] [stderr] Compiling gio-sys v0.10.1 [INFO] [stderr] Compiling gdk-pixbuf-sys v0.10.0 [INFO] [stderr] Compiling cairo-sys-rs v0.10.0 [INFO] [stderr] Compiling pango-sys v0.10.0 [INFO] [stderr] Compiling gdk-sys v0.10.0 [INFO] [stderr] Compiling atk-sys v0.10.0 [INFO] [stderr] Compiling gtk-sys v0.10.0 [INFO] [stderr] Checking futures-executor v0.3.19 [INFO] [stderr] Checking glib v0.10.3 [INFO] [stderr] Checking futures v0.3.19 [INFO] [stderr] Checking ndarray v0.15.4 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking ndarray-stats v0.5.0 [INFO] [stderr] Checking ndarray-rand v0.14.0 [INFO] [stderr] Checking relm v0.20.0 [INFO] [stderr] Checking cfr v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [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: `cfr::node::StateNode` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use cfr::node::StateNode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Direction` and `Position` [INFO] [stdout] --> src/main.rs:10:22 [INFO] [stdout] | [INFO] [stdout] 10 | use scrabble::util::{Direction, Position}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `utils::serialization` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use utils::serialization; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scrabble::bag::Bag` [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::scrabble::bag::Bag; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scrabble::board::ScrabbleBoard` [INFO] [stdout] --> src/main.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::scrabble::board::ScrabbleBoard; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scrabble::rack::Rack` [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use crate::scrabble::rack::Rack; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MoveGrid` and `ScrabbleState` [INFO] [stdout] --> src/main.rs:20:30 [INFO] [stdout] | [INFO] [stdout] 20 | use crate::scrabble::state::{MoveGrid, ScrabbleGame, ScrabbleState}; [INFO] [stdout] | ^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scrabble::util::Letter` [INFO] [stdout] --> src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::scrabble::util::Letter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Uniform` [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:7:46 [INFO] [stdout] | [INFO] [stdout] 7 | use ndarray_rand::rand_distr::{Distribution, Uniform, WeightedIndex}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/cfr/trainer.rs:10:20 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::utils::{self, serialization}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::constraint::ConstraintQuery` [INFO] [stdout] --> src/scrabble/board.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use super::constraint::ConstraintQuery; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/scrabble/state.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / /// [INFO] [stdout] 18 | | [INFO] [stdout] | |_^ [INFO] [stdout] 19 | const MAX_LENGTH: usize = 7; [INFO] [stdout] | ---------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `GestureExt` and `Stack` [INFO] [stdout] --> src/scrabble/ui/scrabble_ui.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | GestureExt, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | Stack, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/scrabble/util.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::BTreeSet` [INFO] [stdout] --> src/scrabble/vocab.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::BTreeSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/scrabble/vocab.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BufRead` and `BufReader` [INFO] [stdout] --> src/scrabble/vocab.rs:3:15 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::{BufRead, BufReader}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::path::Path` [INFO] [stdout] --> src/scrabble/vocab.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::path::Path; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::BOARD_SIZE` [INFO] [stdout] --> src/scrabble/vocab.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use super::BOARD_SIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [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: `cfr::node::StateNode` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use cfr::node::StateNode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Direction` and `Position` [INFO] [stdout] --> src/main.rs:10:22 [INFO] [stdout] | [INFO] [stdout] 10 | use scrabble::util::{Direction, Position}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `utils::serialization` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use utils::serialization; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scrabble::bag::Bag` [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::scrabble::bag::Bag; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scrabble::board::ScrabbleBoard` [INFO] [stdout] --> src/main.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::scrabble::board::ScrabbleBoard; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scrabble::rack::Rack` [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use crate::scrabble::rack::Rack; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MoveGrid` and `ScrabbleState` [INFO] [stdout] --> src/main.rs:20:30 [INFO] [stdout] | [INFO] [stdout] 20 | use crate::scrabble::state::{MoveGrid, ScrabbleGame, ScrabbleState}; [INFO] [stdout] | ^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::scrabble::util::Letter` [INFO] [stdout] --> src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::scrabble::util::Letter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Uniform` [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:7:46 [INFO] [stdout] | [INFO] [stdout] 7 | use ndarray_rand::rand_distr::{Distribution, Uniform, WeightedIndex}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/cfr/trainer.rs:10:20 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::utils::{self, serialization}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::constraint::ConstraintQuery` [INFO] [stdout] --> src/scrabble/board.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use super::constraint::ConstraintQuery; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/scrabble/state.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / /// [INFO] [stdout] 18 | | [INFO] [stdout] | |_^ [INFO] [stdout] 19 | const MAX_LENGTH: usize = 7; [INFO] [stdout] | ---------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `GestureExt` and `Stack` [INFO] [stdout] --> src/scrabble/ui/scrabble_ui.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | GestureExt, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | Stack, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/scrabble/util.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::BTreeSet` [INFO] [stdout] --> src/scrabble/vocab.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::BTreeSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/scrabble/vocab.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BufRead` and `BufReader` [INFO] [stdout] --> src/scrabble/vocab.rs:3:15 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::{BufRead, BufReader}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::path::Path` [INFO] [stdout] --> src/scrabble/vocab.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::path::Path; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::BOARD_SIZE` [INFO] [stdout] --> src/scrabble/vocab.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use super::BOARD_SIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tictactoe/mod.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | board: board, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tictactoe/mod.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | 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/tictactoe/mod.rs:250:13 [INFO] [stdout] | [INFO] [stdout] 250 | 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: unused import: `std::ops::RangeBounds` [INFO] [stdout] --> src/scrabble/board.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ops::RangeBounds; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::RangeBounds` [INFO] [stdout] --> src/scrabble/board.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ops::RangeBounds; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vocab` [INFO] [stdout] --> src/main.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | fn build_dictionary(vocab: Vec) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_vocab` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `play_tictactoe` is never used [INFO] [stdout] --> src/main.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn play_tictactoe() { [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 `build_dictionary` is never used [INFO] [stdout] --> src/main.rs:94:4 [INFO] [stdout] | [INFO] [stdout] 94 | fn build_dictionary(vocab: Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `train_scrabble` is never used [INFO] [stdout] --> src/main.rs:98:4 [INFO] [stdout] | [INFO] [stdout] 98 | fn train_scrabble() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EPSILON` is never used [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:13:7 [INFO] [stdout] | [INFO] [stdout] 13 | const EPSILON: f32 = 0.6; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `REACH_CLIP` is never used [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:14:7 [INFO] [stdout] | [INFO] [stdout] 14 | const REACH_CLIP: f32 = 1e-12; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OutcomeSamplingSolver` is never constructed [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct OutcomeSamplingSolver<'a, S: GameState, A> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 27 | / impl<'a, S: GameState, A> OutcomeSamplingSolver<'a, S, A> [INFO] [stdout] 28 | | where [INFO] [stdout] 29 | | A: NdFloat + Zero + SampleUniform + Default + PartialOrd + for<'b> std::ops::AddAssign<&'b A>, [INFO] [stdout] | |__________________________________________________________________________________________________- associated items in this implementation [INFO] [stdout] 30 | { [INFO] [stdout] 31 | pub fn new(strategies: &'a mut HashMap>, num_actions: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | pub fn update_player_strategy(&mut self, initial_state: &S, player: usize) -> A { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn seen_states(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn strategies(&self) -> &HashMap> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | fn outcome_sampling_cfr( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 180 | fn sample_policy( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 205 | fn baseline_corrected_value( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CFRTrainer` is never constructed [INFO] [stdout] --> src/cfr/trainer.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct CFRTrainer [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `get_strategies`, and `train` are never used [INFO] [stdout] --> src/cfr/trainer.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 26 | / impl CFRTrainer [INFO] [stdout] 27 | | where [INFO] [stdout] 28 | | G: Game, [INFO] [stdout] 29 | | A: NdFloat + Zero + SampleUniform + Default + PartialOrd + for<'b> std::ops::AddAssign<&'b A> + Serialize + DeserializeOwned, [INFO] [stdout] 30 | | ::Key: Serialize + DeserializeOwned [INFO] [stdout] | |______________________________________________________________- associated items in this implementation [INFO] [stdout] 31 | { [INFO] [stdout] 32 | pub fn new(game: G) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn get_strategies(&self) -> &HashMap<::Key, StateNode> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn train(&mut self, rounds: usize, print_steps: usize, ckpt_steps: usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cfr/node.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 18 | / impl StateNode [INFO] [stdout] 19 | | where [INFO] [stdout] 20 | | A: NdFloat + Zero [INFO] [stdout] | |_____________________- associated items in this implementation [INFO] [stdout] 21 | { [INFO] [stdout] 22 | pub fn new(num_actions: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn compute_strategy(&mut self) -> ArrayView1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub fn update_regret_sum(&mut self, action: usize, value: A) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn get_regret_sum(&self, action: usize) -> A { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn get_strategy_sum(&self, action: usize) -> A { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn update_strategy_sum(&mut self, action: usize, value: A) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn update_strategy_sums(&mut self, prev_strategy: ArrayView1, realization_weight: A) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn update_regrets( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | pub fn get_strategy_for_action(&self, action: usize) -> A { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 96 | pub fn sample_action_greedy(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `num_players`, `num_actions`, and `reset` are never used [INFO] [stdout] --> src/cfr/state.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 21 | pub trait Game { [INFO] [stdout] | ---- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 25 | fn num_players(&self) -> usize; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | fn num_actions(&self) -> usize; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | fn reset(&mut self); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_file` is never used [INFO] [stdout] --> src/scrabble/agent.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl ScrabbleAgent { [INFO] [stdout] | ------------------ associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn from_file>(path: P) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new_with_order` and `is_empty` are never used [INFO] [stdout] --> src/scrabble/bag.rs:77:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Bag { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn new_with_order(order: &Vec) -> Bag { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | pub fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `empty` and `is_anchor` are never used [INFO] [stdout] --> src/scrabble/board.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 42 | impl ScrabbleBoard { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 43 | pub fn empty() -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 280 | pub fn is_anchor(&self, pos: Position) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `n_actions` is never read [INFO] [stdout] --> src/scrabble/state.rs:272:5 [INFO] [stdout] | [INFO] [stdout] 268 | pub struct ScrabbleGame { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 272 | n_actions: usize, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `GREY` is never used [INFO] [stdout] --> src/scrabble/ui/scrabble_ui.rs:42:7 [INFO] [stdout] | [INFO] [stdout] 42 | const GREY: RGBA = RGBA { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `move_options` and `selected_move` are never read [INFO] [stdout] --> src/scrabble/ui/scrabble_ui.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 49 | pub struct ScrabbleUI { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 57 | move_options: TreeView, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | selected_move: Option, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_center` and `adjacent` are never used [INFO] [stdout] --> src/scrabble/util.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 32 | impl Position { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 84 | pub fn is_center(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | pub fn adjacent(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_index` is never used [INFO] [stdout] --> src/scrabble/util.rs:241:12 [INFO] [stdout] | [INFO] [stdout] 240 | impl Letter { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 241 | pub fn as_index(&self) -> usize { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `DoubleWord` is never constructed [INFO] [stdout] --> src/scrabble/util.rs:260:5 [INFO] [stdout] | [INFO] [stdout] 259 | pub enum SquareEffect { [INFO] [stdout] | ------------ variant in this enum [INFO] [stdout] 260 | DoubleWord, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SquareEffect` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SEP` is never used [INFO] [stdout] --> src/scrabble/gaddag.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | static SEP: u8 = ',' as u8; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SEP_STR` is never used [INFO] [stdout] --> src/scrabble/gaddag.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | static SEP_STR: &str = ","; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_word_file` is never used [INFO] [stdout] --> src/scrabble/gaddag.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn read_word_file>(path: P) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_entries_sorted` is never used [INFO] [stdout] --> src/scrabble/gaddag.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn build_entries_sorted>(vocab_path: P) -> BTreeSet> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Gaddag` is never constructed [INFO] [stdout] --> src/scrabble/gaddag.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | pub struct Gaddag { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `build_from_file`, `find_suffixes`, `find_prefixes`, `search_fst`, and `demangle_item` are never used [INFO] [stdout] --> src/scrabble/gaddag.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 77 | impl Gaddag { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 78 | pub fn build_from_file>(vocab_path: P) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub fn find_suffixes(&self, text: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn find_prefixes(&self, input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | pub fn search_fst(&self, matcher: A) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 126 | fn demangle_item(item: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_many` and `count` are never used [INFO] [stdout] --> src/scrabble/constraint/letter_set.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl LetterSet { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn from_many(iter: impl Iterator) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn count(&self) -> u8 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `display_board` is never used [INFO] [stdout] --> src/tictactoe/mod.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl TicTacToeState { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] 10 | pub fn display_board(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TicTacToe` is never constructed [INFO] [stdout] --> src/tictactoe/mod.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub struct TicTacToe { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/tictactoe/mod.rs:182:12 [INFO] [stdout] | [INFO] [stdout] 181 | impl TicTacToe { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 182 | pub fn new(board_dim: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `serialize_bytes` is never used [INFO] [stdout] --> src/utils/serialization.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn serialize_bytes(data: &T) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deserialize_bytes` is never used [INFO] [stdout] --> src/utils/serialization.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn deserialize_bytes(bytes: &[u8]) -> T { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `save_to_disk` is never used [INFO] [stdout] --> src/utils/serialization.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn save_to_disk>(data: &T, path: TPath) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `load_from_disk` is never used [INFO] [stdout] --> src/utils/serialization.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn load_from_disk>(path: TPath) -> T { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 39 | / let utility = self.outcome_sampling_cfr( [INFO] [stdout] 40 | | initial_state, [INFO] [stdout] 41 | | player, [INFO] [stdout] 42 | | A::from(1.0).unwrap(), [INFO] [stdout] 43 | | A::from(1.0).unwrap(), [INFO] [stdout] 44 | | A::from(1.0).unwrap(), [INFO] [stdout] 45 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 46 | utility [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 39 ~ [INFO] [stdout] 40 ~ self.outcome_sampling_cfr( [INFO] [stdout] 41 + initial_state, [INFO] [stdout] 42 + player, [INFO] [stdout] 43 + A::from(1.0).unwrap(), [INFO] [stdout] 44 + A::from(1.0).unwrap(), [INFO] [stdout] 45 + A::from(1.0).unwrap(), [INFO] [stdout] 46 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | &self.strategies [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.strategies` [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/cfr/solvers/outcome_sampling.rs:188:23 [INFO] [stdout] | [INFO] [stdout] 188 | debug_assert!(valid_actions.len() > 0, "Must have at least 1 valid action"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!valid_actions.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: unneeded `return` statement [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:215:13 [INFO] [stdout] | [INFO] [stdout] 215 | return baseline + (value - baseline) / sample_prob; [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] 215 - return baseline + (value - baseline) / sample_prob; [INFO] [stdout] 215 + baseline + (value - baseline) / sample_prob [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:217:13 [INFO] [stdout] | [INFO] [stdout] 217 | return baseline; [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] 217 - return baseline; [INFO] [stdout] 217 + baseline [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `p` is used to index `cumulative_utility` [INFO] [stdout] --> src/cfr/trainer.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | for p in 0..self.game.num_players() { [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] 54 - for p in 0..self.game.num_players() { [INFO] [stdout] 54 + for (p, ) in cumulative_utility.iter_mut().enumerate().take(self.game.num_players()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/cfr/node.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 97 | let strat = self.strategy.argmax().unwrap(); [INFO] [stdout] | -------------------------------------------- unnecessary `let` binding [INFO] [stdout] 98 | strat [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 97 ~ [INFO] [stdout] 98 ~ self.strategy.argmax().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/scrabble/bag.rs:77:34 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn new_with_order(order: &Vec) -> Bag { [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] 77 - pub fn new_with_order(order: &Vec) -> Bag { [INFO] [stdout] 77 + pub fn new_with_order(order: &[Letter]) -> Bag { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/scrabble/bag.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | let tiles: Vec; [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 `tiles` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 96 ~ [INFO] [stdout] 97 ~ let tiles: Vec = if self.random { [INFO] [stdout] 98 ~ self [INFO] [stdout] 99 | .distribution [INFO] [stdout] 100 | .choose_multiple(&mut rand::thread_rng(), n) [INFO] [stdout] 101 | .cloned() [INFO] [stdout] 102 ~ .collect() [INFO] [stdout] 103 | } else { [INFO] [stdout] 104 ~ self.distribution.iter().take(n).cloned().collect() [INFO] [stdout] 105 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/scrabble/board.rs:171:20 [INFO] [stdout] | [INFO] [stdout] 171 | .chain(down_cands.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 171 - .chain(down_cands.into_iter()) [INFO] [stdout] 171 + .chain(down_cands) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/scrabble/board.rs:295:9 [INFO] [stdout] | [INFO] [stdout] 295 | / match self.state[pos.row][pos.col] { [INFO] [stdout] 296 | | Tile::Letter(_) => true, [INFO] [stdout] 297 | | _ => false, [INFO] [stdout] 298 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 295 - match self.state[pos.row][pos.col] { [INFO] [stdout] 296 - Tile::Letter(_) => true, [INFO] [stdout] 297 - _ => false, [INFO] [stdout] 298 - } [INFO] [stdout] 295 + matches!(self.state[pos.row][pos.col], Tile::Letter(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/scrabble/board.rs:311:13 [INFO] [stdout] | [INFO] [stdout] 311 | 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] 311 - print!("\n"); [INFO] [stdout] 311 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/state.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | if self.move_ids[i][j][k].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.move_ids[i][j][k].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 boolean expression can be simplified [INFO] [stdout] --> src/scrabble/state.rs:153:74 [INFO] [stdout] | [INFO] [stdout] 153 | let mut inactive_players = next_player_active.iter().filter(|&x| !x == false).count(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `x != false` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/scrabble/state.rs:153:74 [INFO] [stdout] | [INFO] [stdout] 153 | let mut inactive_players = next_player_active.iter().filter(|&x| !x == false).count(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `!!x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/state.rs:174:43 [INFO] [stdout] | [INFO] [stdout] 174 | next_player_active[next_player] = next_movegrid.moves.len() > 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!next_movegrid.moves.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: length comparison to zero [INFO] [stdout] --> src/scrabble/state.rs:234:32 [INFO] [stdout] | [INFO] [stdout] 234 | let selected_move = if self.curr_move_grid.moves.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.curr_move_grid.moves.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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/scrabble/ui/scrabble_ui.rs:482:9 [INFO] [stdout] | [INFO] [stdout] 473 | / let game = Self::new( [INFO] [stdout] 474 | | initial_state, [INFO] [stdout] 475 | | board, [INFO] [stdout] 476 | | rack, [INFO] [stdout] ... | [INFO] [stdout] 480 | | tree_model, [INFO] [stdout] 481 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 482 | game [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 473 ~ [INFO] [stdout] 474 ~ Self::new( [INFO] [stdout] 475 + initial_state, [INFO] [stdout] 476 + board, [INFO] [stdout] 477 + rack, [INFO] [stdout] 478 + window, [INFO] [stdout] 479 + relm.clone(), [INFO] [stdout] 480 + options, [INFO] [stdout] 481 + tree_model, [INFO] [stdout] 482 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/scrabble/ui/util.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | std::f64::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] 47 - std::f64::MIN, [INFO] [stdout] 47 + f64::MIN, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/scrabble/ui/util.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | std::f64::MAX, [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] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 48 - std::f64::MAX, [INFO] [stdout] 48 + f64::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/scrabble/util.rs:222:55 [INFO] [stdout] | [INFO] [stdout] 222 | Some(p) => match self._m.word.chars().nth(self._curr as usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self._curr` [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: casting a character literal to `u8` truncates [INFO] [stdout] --> src/scrabble/gaddag.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | static SEP: u8 = ',' as u8; [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b','` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/gaddag.rs:57:15 [INFO] [stdout] | [INFO] [stdout] 57 | while before_sep.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!before_sep.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: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/scrabble/gaddag.rs:65:36 [INFO] [stdout] | [INFO] [stdout] 65 | entries.insert(new_word.iter().cloned().collect()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/scrabble/word_search.rs:64:21 [INFO] [stdout] | [INFO] [stdout] 64 | / if state.position < self.min_length { [INFO] [stdout] 65 | | false [INFO] [stdout] 66 | | } else { [INFO] [stdout] 67 | | true [INFO] [stdout] 68 | | } [INFO] [stdout] | |_____________________^ help: you can reduce it to: `state.position >= self.min_length` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `state` [INFO] [stdout] --> src/scrabble/constraint/grid.rs:48:18 [INFO] [stdout] | [INFO] [stdout] 48 | for i in 0..BOARD_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 48 - for i in 0..BOARD_SIZE { [INFO] [stdout] 48 + for in state.iter_mut().take(BOARD_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ConstraintIndex` which implements the `Copy` trait [INFO] [stdout] --> src/scrabble/constraint/grid.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | let mut curr_pos = pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `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: the loop variable `j` is only used to index `tiles` [INFO] [stdout] --> src/scrabble/constraint/grid.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | for j in 0..BOARD_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 54 - for j in 0..BOARD_SIZE { [INFO] [stdout] 54 + for in tiles.iter_mut().take(BOARD_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vocab` [INFO] [stdout] --> src/main.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | fn build_dictionary(vocab: Vec) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_vocab` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `line` [INFO] [stdout] --> src/scrabble/constraint/grid.rs:97:34 [INFO] [stdout] | [INFO] [stdout] 97 | for j in (i + 1)..(line.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 97 - for j in (i + 1)..(line.len()) { [INFO] [stdout] 97 + for in line.iter().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `play_tictactoe` is never used [INFO] [stdout] --> src/main.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn play_tictactoe() { [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 `build_dictionary` is never used [INFO] [stdout] --> src/main.rs:94:4 [INFO] [stdout] | [INFO] [stdout] 94 | fn build_dictionary(vocab: Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ConstraintIndex` which implements the `Copy` trait [INFO] [stdout] --> src/scrabble/constraint/grid.rs:154:28 [INFO] [stdout] | [INFO] [stdout] 154 | let mut head = line.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `line` [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: function `train_scrabble` is never used [INFO] [stdout] --> src/main.rs:98:4 [INFO] [stdout] | [INFO] [stdout] 98 | fn train_scrabble() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EPSILON` is never used [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:13:7 [INFO] [stdout] | [INFO] [stdout] 13 | const EPSILON: f32 = 0.6; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `REACH_CLIP` is never used [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:14:7 [INFO] [stdout] | [INFO] [stdout] 14 | const REACH_CLIP: f32 = 1e-12; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OutcomeSamplingSolver` is never constructed [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct OutcomeSamplingSolver<'a, S: GameState, A> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 27 | / impl<'a, S: GameState, A> OutcomeSamplingSolver<'a, S, A> [INFO] [stdout] 28 | | where [INFO] [stdout] 29 | | A: NdFloat + Zero + SampleUniform + Default + PartialOrd + for<'b> std::ops::AddAssign<&'b A>, [INFO] [stdout] | |__________________________________________________________________________________________________- associated items in this implementation [INFO] [stdout] 30 | { [INFO] [stdout] 31 | pub fn new(strategies: &'a mut HashMap>, num_actions: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | pub fn update_player_strategy(&mut self, initial_state: &S, player: usize) -> A { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn seen_states(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn strategies(&self) -> &HashMap> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | fn outcome_sampling_cfr( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 180 | fn sample_policy( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 205 | fn baseline_corrected_value( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ConstraintIndex` which implements the `Copy` trait [INFO] [stdout] --> src/scrabble/constraint/grid.rs:174:29 [INFO] [stdout] | [INFO] [stdout] 174 | let place = head.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `head` [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 `ConstraintIndex` which implements the `Copy` trait [INFO] [stdout] --> src/scrabble/constraint/grid.rs:178:31 [INFO] [stdout] | [INFO] [stdout] 178 | let mut end = place.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `place` [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: struct `CFRTrainer` is never constructed [INFO] [stdout] --> src/cfr/trainer.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct CFRTrainer [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `get_strategies`, and `train` are never used [INFO] [stdout] --> src/cfr/trainer.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 26 | / impl CFRTrainer [INFO] [stdout] 27 | | where [INFO] [stdout] 28 | | G: Game, [INFO] [stdout] 29 | | A: NdFloat + Zero + SampleUniform + Default + PartialOrd + for<'b> std::ops::AddAssign<&'b A> + Serialize + DeserializeOwned, [INFO] [stdout] 30 | | ::Key: Serialize + DeserializeOwned [INFO] [stdout] | |______________________________________________________________- associated items in this implementation [INFO] [stdout] 31 | { [INFO] [stdout] 32 | pub fn new(game: G) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn get_strategies(&self) -> &HashMap<::Key, StateNode> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn train(&mut self, rounds: usize, print_steps: usize, ckpt_steps: usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cfr/node.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 18 | / impl StateNode [INFO] [stdout] 19 | | where [INFO] [stdout] 20 | | A: NdFloat + Zero [INFO] [stdout] | |_____________________- associated items in this implementation [INFO] [stdout] 21 | { [INFO] [stdout] 22 | pub fn new(num_actions: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn compute_strategy(&mut self) -> ArrayView1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub fn update_regret_sum(&mut self, action: usize, value: A) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn get_regret_sum(&self, action: usize) -> A { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn get_strategy_sum(&self, action: usize) -> A { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn update_strategy_sum(&mut self, action: usize, value: A) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn update_strategy_sums(&mut self, prev_strategy: ArrayView1, realization_weight: A) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn update_regrets( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | pub fn get_strategy_for_action(&self, action: usize) -> A { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 96 | pub fn sample_action_greedy(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `active_player`, `is_terminal`, and `get_reward` are never used [INFO] [stdout] --> src/cfr/state.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait GameState: Sized { [INFO] [stdout] | --------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 7 | fn active_player(&self) -> usize; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | fn is_terminal(&self) -> bool; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 17 | /// Gets the payout for the player at this state [INFO] [stdout] 18 | fn get_reward(&self, player: usize) -> f32; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `num_players`, `num_actions`, and `reset` are never used [INFO] [stdout] --> src/cfr/state.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 21 | pub trait Game { [INFO] [stdout] | ---- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 25 | fn num_players(&self) -> usize; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | fn num_actions(&self) -> usize; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | fn reset(&mut self); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_file` is never used [INFO] [stdout] --> src/scrabble/agent.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl ScrabbleAgent { [INFO] [stdout] | ------------------ associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn from_file>(path: P) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/scrabble/constraint/grid.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / match self.state[pos.row][pos.col] { [INFO] [stdout] 211 | | Constraint::Filled(_) => true, [INFO] [stdout] 212 | | _ => false, [INFO] [stdout] 213 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 210 - match self.state[pos.row][pos.col] { [INFO] [stdout] 211 - Constraint::Filled(_) => true, [INFO] [stdout] 212 - _ => false, [INFO] [stdout] 213 - } [INFO] [stdout] 210 + matches!(self.state[pos.row][pos.col], Constraint::Filled(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new_with_order` and `is_empty` are never used [INFO] [stdout] --> src/scrabble/bag.rs:77:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Bag { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn new_with_order(order: &Vec) -> Bag { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | pub fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `empty` and `is_anchor` are never used [INFO] [stdout] --> src/scrabble/board.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 42 | impl ScrabbleBoard { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 43 | pub fn empty() -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 280 | pub fn is_anchor(&self, pos: Position) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `n_actions` is never read [INFO] [stdout] --> src/scrabble/state.rs:272:5 [INFO] [stdout] | [INFO] [stdout] 268 | pub struct ScrabbleGame { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 272 | n_actions: usize, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `GREY` is never used [INFO] [stdout] --> src/scrabble/ui/scrabble_ui.rs:42:7 [INFO] [stdout] | [INFO] [stdout] 42 | const GREY: RGBA = RGBA { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `move_options` and `selected_move` are never read [INFO] [stdout] --> src/scrabble/ui/scrabble_ui.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 49 | pub struct ScrabbleUI { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 57 | move_options: TreeView, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | selected_move: Option, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_center` and `adjacent` are never used [INFO] [stdout] --> src/scrabble/util.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 32 | impl Position { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 84 | pub fn is_center(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | pub fn adjacent(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_index` is never used [INFO] [stdout] --> src/scrabble/util.rs:241:12 [INFO] [stdout] | [INFO] [stdout] 240 | impl Letter { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 241 | pub fn as_index(&self) -> usize { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `DoubleWord` is never constructed [INFO] [stdout] --> src/scrabble/util.rs:260:5 [INFO] [stdout] | [INFO] [stdout] 259 | pub enum SquareEffect { [INFO] [stdout] | ------------ variant in this enum [INFO] [stdout] 260 | DoubleWord, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SquareEffect` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SEP` is never used [INFO] [stdout] --> src/scrabble/gaddag.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | static SEP: u8 = ',' as u8; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SEP_STR` is never used [INFO] [stdout] --> src/scrabble/gaddag.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | static SEP_STR: &str = ","; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_word_file` is never used [INFO] [stdout] --> src/scrabble/gaddag.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn read_word_file>(path: P) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_entries_sorted` is never used [INFO] [stdout] --> src/scrabble/gaddag.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn build_entries_sorted>(vocab_path: P) -> BTreeSet> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Gaddag` is never constructed [INFO] [stdout] --> src/scrabble/gaddag.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | pub struct Gaddag { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `build_from_file`, `find_suffixes`, `find_prefixes`, `search_fst`, and `demangle_item` are never used [INFO] [stdout] --> src/scrabble/gaddag.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 77 | impl Gaddag { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 78 | pub fn build_from_file>(vocab_path: P) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub fn find_suffixes(&self, text: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn find_prefixes(&self, input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | pub fn search_fst(&self, matcher: A) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 126 | fn demangle_item(item: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_many` and `count` are never used [INFO] [stdout] --> src/scrabble/constraint/letter_set.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl LetterSet { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn from_many(iter: impl Iterator) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn count(&self) -> u8 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TicTacToeState` is never constructed [INFO] [stdout] --> src/tictactoe/mod.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct TicTacToeState { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `display_board`, `is_full`, `get_winner`, and `all_same` are never used [INFO] [stdout] --> src/tictactoe/mod.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl TicTacToeState { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] 10 | pub fn display_board(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | fn is_full(&self) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | fn get_winner(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 80 | fn all_same(&self, start: (usize, usize), dir: (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TicTacToe` is never constructed [INFO] [stdout] --> src/tictactoe/mod.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub struct TicTacToe { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/constraint/searcher.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | if self.prefix.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.prefix.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: associated function `new` is never used [INFO] [stdout] --> src/tictactoe/mod.rs:182:12 [INFO] [stdout] | [INFO] [stdout] 181 | impl TicTacToe { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 182 | pub fn new(board_dim: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `serialize_bytes` is never used [INFO] [stdout] --> src/utils/serialization.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn serialize_bytes(data: &T) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deserialize_bytes` is never used [INFO] [stdout] --> src/utils/serialization.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn deserialize_bytes(bytes: &[u8]) -> T { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `save_to_disk` is never used [INFO] [stdout] --> src/utils/serialization.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn save_to_disk>(data: &T, path: TPath) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `load_from_disk` is never used [INFO] [stdout] --> src/utils/serialization.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn load_from_disk>(path: TPath) -> T { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/scrabble/constraint/searcher.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | / match state { [INFO] [stdout] 32 | | Some(ConstraintSearcherState::Done(_)) => true, [INFO] [stdout] 33 | | _ => false, [INFO] [stdout] 34 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 31 - match state { [INFO] [stdout] 32 - Some(ConstraintSearcherState::Done(_)) => true, [INFO] [stdout] 33 - _ => false, [INFO] [stdout] 34 - } [INFO] [stdout] 31 + matches!(state, Some(ConstraintSearcherState::Done(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/constraint/searcher.rs:55:53 [INFO] [stdout] | [INFO] [stdout] 55 | ConstraintSearcherState::Mid => Some(if self.suffix.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.suffix.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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 39 | / let utility = self.outcome_sampling_cfr( [INFO] [stdout] 40 | | initial_state, [INFO] [stdout] 41 | | player, [INFO] [stdout] 42 | | A::from(1.0).unwrap(), [INFO] [stdout] 43 | | A::from(1.0).unwrap(), [INFO] [stdout] 44 | | A::from(1.0).unwrap(), [INFO] [stdout] 45 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 46 | utility [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 39 ~ [INFO] [stdout] 40 ~ self.outcome_sampling_cfr( [INFO] [stdout] 41 + initial_state, [INFO] [stdout] 42 + player, [INFO] [stdout] 43 + A::from(1.0).unwrap(), [INFO] [stdout] 44 + A::from(1.0).unwrap(), [INFO] [stdout] 45 + A::from(1.0).unwrap(), [INFO] [stdout] 46 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | &self.strategies [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.strategies` [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: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/tictactoe/mod.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | 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] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 26 - print!("\n"); [INFO] [stdout] 26 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:188:23 [INFO] [stdout] | [INFO] [stdout] 188 | debug_assert!(valid_actions.len() > 0, "Must have at least 1 valid action"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!valid_actions.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: unneeded `return` statement [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:215:13 [INFO] [stdout] | [INFO] [stdout] 215 | return baseline + (value - baseline) / sample_prob; [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] 215 - return baseline + (value - baseline) / sample_prob; [INFO] [stdout] 215 + baseline + (value - baseline) / sample_prob [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cfr/solvers/outcome_sampling.rs:217:13 [INFO] [stdout] | [INFO] [stdout] 217 | return baseline; [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] 217 - return baseline; [INFO] [stdout] 217 + baseline [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/tictactoe/mod.rs:159:16 [INFO] [stdout] | [INFO] [stdout] 159 | if let Some(_) = self.get_winner() { [INFO] [stdout] | -------^^^^^^^-------------------- help: try: `if self.get_winner().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `p` is used to index `cumulative_utility` [INFO] [stdout] --> src/cfr/trainer.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | for p in 0..self.game.num_players() { [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] 54 - for p in 0..self.game.num_players() { [INFO] [stdout] 54 + for (p, ) in cumulative_utility.iter_mut().enumerate().take(self.game.num_players()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/tictactoe/mod.rs:201:31 [INFO] [stdout] | [INFO] [stdout] 201 | let mut row = Vec::with_capacity(self.board_dim); [INFO] [stdout] | _______________________________^ [INFO] [stdout] 202 | | row.resize(self.board_dim, 0); [INFO] [stdout] | |_____________________________________________^ help: consider replacing this with: `vec![0; self.board_dim]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/cfr/node.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 97 | let strat = self.strategy.argmax().unwrap(); [INFO] [stdout] | -------------------------------------------- unnecessary `let` binding [INFO] [stdout] 98 | strat [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 97 ~ [INFO] [stdout] 98 ~ self.strategy.argmax().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/scrabble/util.rs:323:24 [INFO] [stdout] | [INFO] [stdout] 323 | let expected = vec![20, 8, 1, 788]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[20, 8, 1, 788]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/scrabble/util.rs:335:22 [INFO] [stdout] | [INFO] [stdout] 335 | let coords = vec![ [INFO] [stdout] | ______________________^ [INFO] [stdout] 336 | | vec![0, 1, 3], [INFO] [stdout] 337 | | vec![1, 5], // random position in the middle [INFO] [stdout] 338 | | vec![2, 2], // Last index [INFO] [stdout] 339 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 335 ~ let coords = [vec![0, 1, 3], [INFO] [stdout] 336 + vec![1, 5], // random position in the middle [INFO] [stdout] 337 ~ vec![2, 2]]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cfr/node.rs:31:29 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn compute_strategy(&mut self) -> ArrayView1 { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 31 | pub fn compute_strategy(&mut self) -> ArrayView1<'_, A> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/scrabble/bag.rs:77:34 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn new_with_order(order: &Vec) -> Bag { [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] 77 - pub fn new_with_order(order: &Vec) -> Bag { [INFO] [stdout] 77 + pub fn new_with_order(order: &[Letter]) -> Bag { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/scrabble/bag.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | let tiles: Vec; [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 `tiles` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 96 ~ [INFO] [stdout] 97 ~ let tiles: Vec = if self.random { [INFO] [stdout] 98 ~ self [INFO] [stdout] 99 | .distribution [INFO] [stdout] 100 | .choose_multiple(&mut rand::thread_rng(), n) [INFO] [stdout] 101 | .cloned() [INFO] [stdout] 102 ~ .collect() [INFO] [stdout] 103 | } else { [INFO] [stdout] 104 ~ self.distribution.iter().take(n).cloned().collect() [INFO] [stdout] 105 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scrabble/util.rs:207:17 [INFO] [stdout] | [INFO] [stdout] 207 | pub fn iter(&self) -> IterMove { [INFO] [stdout] | ^^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 207 | pub fn iter(&self) -> IterMove<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scrabble/constraint/grid.rs:147:28 [INFO] [stdout] | [INFO] [stdout] 147 | pub fn compute_queries(&self) -> Vec { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 147 | pub fn compute_queries(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/scrabble/board.rs:171:20 [INFO] [stdout] | [INFO] [stdout] 171 | .chain(down_cands.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 171 - .chain(down_cands.into_iter()) [INFO] [stdout] 171 + .chain(down_cands) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/scrabble/board.rs:295:9 [INFO] [stdout] | [INFO] [stdout] 295 | / match self.state[pos.row][pos.col] { [INFO] [stdout] 296 | | Tile::Letter(_) => true, [INFO] [stdout] 297 | | _ => false, [INFO] [stdout] 298 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 295 - match self.state[pos.row][pos.col] { [INFO] [stdout] 296 - Tile::Letter(_) => true, [INFO] [stdout] 297 - _ => false, [INFO] [stdout] 298 - } [INFO] [stdout] 295 + matches!(self.state[pos.row][pos.col], Tile::Letter(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/scrabble/board.rs:311:13 [INFO] [stdout] | [INFO] [stdout] 311 | 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] 311 - print!("\n"); [INFO] [stdout] 311 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/state.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | if self.move_ids[i][j][k].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.move_ids[i][j][k].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 boolean expression can be simplified [INFO] [stdout] --> src/scrabble/state.rs:153:74 [INFO] [stdout] | [INFO] [stdout] 153 | let mut inactive_players = next_player_active.iter().filter(|&x| !x == false).count(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `x != false` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/scrabble/state.rs:153:74 [INFO] [stdout] | [INFO] [stdout] 153 | let mut inactive_players = next_player_active.iter().filter(|&x| !x == false).count(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `!!x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/state.rs:174:43 [INFO] [stdout] | [INFO] [stdout] 174 | next_player_active[next_player] = next_movegrid.moves.len() > 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!next_movegrid.moves.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: length comparison to zero [INFO] [stdout] --> src/scrabble/state.rs:234:32 [INFO] [stdout] | [INFO] [stdout] 234 | let selected_move = if self.curr_move_grid.moves.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.curr_move_grid.moves.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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/scrabble/ui/scrabble_ui.rs:482:9 [INFO] [stdout] | [INFO] [stdout] 473 | / let game = Self::new( [INFO] [stdout] 474 | | initial_state, [INFO] [stdout] 475 | | board, [INFO] [stdout] 476 | | rack, [INFO] [stdout] ... | [INFO] [stdout] 480 | | tree_model, [INFO] [stdout] 481 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 482 | game [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 473 ~ [INFO] [stdout] 474 ~ Self::new( [INFO] [stdout] 475 + initial_state, [INFO] [stdout] 476 + board, [INFO] [stdout] 477 + rack, [INFO] [stdout] 478 + window, [INFO] [stdout] 479 + relm.clone(), [INFO] [stdout] 480 + options, [INFO] [stdout] 481 + tree_model, [INFO] [stdout] 482 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/scrabble/ui/util.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | std::f64::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] 47 - std::f64::MIN, [INFO] [stdout] 47 + f64::MIN, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/scrabble/ui/util.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | std::f64::MAX, [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] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 48 - std::f64::MAX, [INFO] [stdout] 48 + f64::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/scrabble/util.rs:222:55 [INFO] [stdout] | [INFO] [stdout] 222 | Some(p) => match self._m.word.chars().nth(self._curr as usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self._curr` [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: casting a character literal to `u8` truncates [INFO] [stdout] --> src/scrabble/gaddag.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | static SEP: u8 = ',' as u8; [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b','` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/gaddag.rs:57:15 [INFO] [stdout] | [INFO] [stdout] 57 | while before_sep.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!before_sep.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: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/scrabble/gaddag.rs:65:36 [INFO] [stdout] | [INFO] [stdout] 65 | entries.insert(new_word.iter().cloned().collect()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/scrabble/word_search.rs:64:21 [INFO] [stdout] | [INFO] [stdout] 64 | / if state.position < self.min_length { [INFO] [stdout] 65 | | false [INFO] [stdout] 66 | | } else { [INFO] [stdout] 67 | | true [INFO] [stdout] 68 | | } [INFO] [stdout] | |_____________________^ help: you can reduce it to: `state.position >= self.min_length` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `state` [INFO] [stdout] --> src/scrabble/constraint/grid.rs:48:18 [INFO] [stdout] | [INFO] [stdout] 48 | for i in 0..BOARD_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 48 - for i in 0..BOARD_SIZE { [INFO] [stdout] 48 + for in state.iter_mut().take(BOARD_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ConstraintIndex` which implements the `Copy` trait [INFO] [stdout] --> src/scrabble/constraint/grid.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | let mut curr_pos = pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `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: the loop variable `j` is only used to index `tiles` [INFO] [stdout] --> src/scrabble/constraint/grid.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | for j in 0..BOARD_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 54 - for j in 0..BOARD_SIZE { [INFO] [stdout] 54 + for in tiles.iter_mut().take(BOARD_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `line` [INFO] [stdout] --> src/scrabble/constraint/grid.rs:97:34 [INFO] [stdout] | [INFO] [stdout] 97 | for j in (i + 1)..(line.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 97 - for j in (i + 1)..(line.len()) { [INFO] [stdout] 97 + for in line.iter().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ConstraintIndex` which implements the `Copy` trait [INFO] [stdout] --> src/scrabble/constraint/grid.rs:154:28 [INFO] [stdout] | [INFO] [stdout] 154 | let mut head = line.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `line` [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 `ConstraintIndex` which implements the `Copy` trait [INFO] [stdout] --> src/scrabble/constraint/grid.rs:174:29 [INFO] [stdout] | [INFO] [stdout] 174 | let place = head.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `head` [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 `ConstraintIndex` which implements the `Copy` trait [INFO] [stdout] --> src/scrabble/constraint/grid.rs:178:31 [INFO] [stdout] | [INFO] [stdout] 178 | let mut end = place.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `place` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/scrabble/constraint/grid.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / match self.state[pos.row][pos.col] { [INFO] [stdout] 211 | | Constraint::Filled(_) => true, [INFO] [stdout] 212 | | _ => false, [INFO] [stdout] 213 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 210 - match self.state[pos.row][pos.col] { [INFO] [stdout] 211 - Constraint::Filled(_) => true, [INFO] [stdout] 212 - _ => false, [INFO] [stdout] 213 - } [INFO] [stdout] 210 + matches!(self.state[pos.row][pos.col], Constraint::Filled(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/constraint/searcher.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | if self.prefix.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.prefix.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: match expression looks like `matches!` macro [INFO] [stdout] --> src/scrabble/constraint/searcher.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | / match state { [INFO] [stdout] 32 | | Some(ConstraintSearcherState::Done(_)) => true, [INFO] [stdout] 33 | | _ => false, [INFO] [stdout] 34 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 31 - match state { [INFO] [stdout] 32 - Some(ConstraintSearcherState::Done(_)) => true, [INFO] [stdout] 33 - _ => false, [INFO] [stdout] 34 - } [INFO] [stdout] 31 + matches!(state, Some(ConstraintSearcherState::Done(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scrabble/constraint/searcher.rs:55:53 [INFO] [stdout] | [INFO] [stdout] 55 | ConstraintSearcherState::Mid => Some(if self.suffix.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.suffix.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: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/tictactoe/mod.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | 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] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 26 - print!("\n"); [INFO] [stdout] 26 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/tictactoe/mod.rs:159:16 [INFO] [stdout] | [INFO] [stdout] 159 | if let Some(_) = self.get_winner() { [INFO] [stdout] | -------^^^^^^^-------------------- help: try: `if self.get_winner().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/tictactoe/mod.rs:201:31 [INFO] [stdout] | [INFO] [stdout] 201 | let mut row = Vec::with_capacity(self.board_dim); [INFO] [stdout] | _______________________________^ [INFO] [stdout] 202 | | row.resize(self.board_dim, 0); [INFO] [stdout] | |_____________________________________________^ help: consider replacing this with: `vec![0; self.board_dim]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cfr/node.rs:31:29 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn compute_strategy(&mut self) -> ArrayView1 { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 31 | pub fn compute_strategy(&mut self) -> ArrayView1<'_, A> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scrabble/util.rs:207:17 [INFO] [stdout] | [INFO] [stdout] 207 | pub fn iter(&self) -> IterMove { [INFO] [stdout] | ^^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 207 | pub fn iter(&self) -> IterMove<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/scrabble/constraint/grid.rs:147:28 [INFO] [stdout] | [INFO] [stdout] 147 | pub fn compute_queries(&self) -> Vec { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 147 | pub fn compute_queries(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 30s [INFO] running `Command { std: "docker" "inspect" "39cae0df8618555775871cf561dfa1613f813ff198da32dca563d1889cffef26", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "39cae0df8618555775871cf561dfa1613f813ff198da32dca563d1889cffef26", kill_on_drop: false }` [INFO] [stdout] 39cae0df8618555775871cf561dfa1613f813ff198da32dca563d1889cffef26