[INFO] cloning repository https://github.com/djh592/wordle-dingjh21 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/djh592/wordle-dingjh21" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdjh592%2Fwordle-dingjh21", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdjh592%2Fwordle-dingjh21'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6021f5e54a06db19f9cb867dd9ae43dcd8801079 [INFO] linting djh592/wordle-dingjh21 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdjh592%2Fwordle-dingjh21" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/djh592/wordle-dingjh21 [INFO] finished tweaking git repo https://github.com/djh592/wordle-dingjh21 [INFO] tweaked toml for git repo https://github.com/djh592/wordle-dingjh21 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/djh592/wordle-dingjh21 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/djh592/wordle-dingjh21 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 ntest_timeout v0.9.3 [INFO] [stderr] Downloaded ntest_test_cases v0.9.3 [INFO] [stderr] Downloaded ntest v0.9.3 [INFO] [stderr] Downloaded anstyle v1.0.7 [INFO] [stderr] Downloaded clap_lex v0.7.1 [INFO] [stderr] Downloaded clap_derive v4.5.8 [INFO] [stderr] Downloaded clap v4.5.8 [INFO] [stderr] Downloaded clap_builder v4.5.8 [INFO] [stderr] Downloaded serde v1.0.203 [INFO] [stderr] Downloaded serde_derive v1.0.203 [INFO] [stderr] Downloaded syn v2.0.68 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 8d726f37a3704341917de1188bca5880b084f5d9568dd37c4da48e627a6db394 [INFO] running `Command { std: "docker" "start" "-a" "8d726f37a3704341917de1188bca5880b084f5d9568dd37c4da48e627a6db394", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8d726f37a3704341917de1188bca5880b084f5d9568dd37c4da48e627a6db394", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8d726f37a3704341917de1188bca5880b084f5d9568dd37c4da48e627a6db394", kill_on_drop: false }` [INFO] [stdout] 8d726f37a3704341917de1188bca5880b084f5d9568dd37c4da48e627a6db394 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d9341c9bad372522b619ced6fdac539a1bc2fc1972452bae65ef6bc8fdffcc33 [INFO] running `Command { std: "docker" "start" "-a" "d9341c9bad372522b619ced6fdac539a1bc2fc1972452bae65ef6bc8fdffcc33", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.86 [INFO] [stderr] Compiling hashbrown v0.14.5 [INFO] [stderr] Compiling serde v1.0.203 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking anstyle-parse v0.2.4 [INFO] [stderr] Compiling serde_json v1.0.117 [INFO] [stderr] Compiling toml_datetime v0.6.6 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking anstyle-query v1.1.0 [INFO] [stderr] Checking is_terminal_polyfill v1.70.0 [INFO] [stderr] Checking colorchoice v1.0.1 [INFO] [stderr] Checking anstyle v1.0.7 [INFO] [stderr] Checking clap_lex v0.7.1 [INFO] [stderr] Checking unicode-width v0.1.13 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Checking console v0.15.8 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking yansi v0.5.1 [INFO] [stderr] Checking anstream v0.6.14 [INFO] [stderr] Checking pretty_assertions v1.4.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking clap_builder v4.5.8 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling indexmap v2.2.6 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Compiling syn v2.0.68 [INFO] [stderr] Compiling toml_edit v0.21.1 [INFO] [stderr] Compiling proc-macro-crate v3.1.0 [INFO] [stderr] Compiling serde_derive v1.0.203 [INFO] [stderr] Compiling clap_derive v4.5.8 [INFO] [stderr] Compiling ntest_test_cases v0.9.3 [INFO] [stderr] Compiling ntest_timeout v0.9.3 [INFO] [stderr] Checking ntest v0.9.3 [INFO] [stderr] Checking clap v4.5.8 [INFO] [stderr] Checking assert-json-diff v2.0.2 [INFO] [stderr] Checking wordle v1.2.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | use console; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> tests/common.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> tests/common.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | use console; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:74:1 [INFO] [stdout] | [INFO] [stdout] 74 | / impl Default for ConfigOptions { [INFO] [stdout] 75 | | fn default() -> Self { [INFO] [stdout] 76 | | Self { [INFO] [stdout] 77 | | word: None, [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub struct ConfigOptions { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/config.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | merged.word = cli_config.word.clone().or(file_config.word.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `config::ConfigOptions { word: cli_config.word.clone().or(file_config.word.clone()), random: cli_config.random || file_config.random, difficult: cli_config.difficult || file_config.difficult, stats: cli_config.stats || file_config.stats, seed: cli_config.seed.or(file_config.seed), day: cli_config.day.or(file_config.day), final_set: cli_config [INFO] [stdout] .final_set [INFO] [stdout] .clone() [INFO] [stdout] .or(file_config.final_set.clone()), acceptable_set: cli_config [INFO] [stdout] .acceptable_set [INFO] [stdout] .clone() [INFO] [stdout] .or(file_config.acceptable_set.clone()), state: cli_config.state.clone().or(file_config.state.clone()), config: cli_config.config.clone().or(file_config.config.clone()), hint_num: cli_config.hint_num.or(file_config.hint_num), best_start: cli_config.best_start || file_config.best_start, solver_mode: cli_config.solver_mode || file_config.solver_mode }` and removing relevant reassignments [INFO] [stdout] --> src/config.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | let mut merged = ConfigOptions::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/game.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | fn new(answer: &str, guesses: &Vec) -> RoundStat { [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] 24 ~ fn new(answer: &str, guesses: &[String]) -> RoundStat { [INFO] [stdout] 25 | RoundStat { [INFO] [stdout] 26 | answer: answer.to_string(), [INFO] [stdout] 27 ~ guesses: guesses.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/game.rs:148:28 [INFO] [stdout] | [INFO] [stdout] 148 | self.final_words = final_words.iter().map(|s| s.clone()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `final_words.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/game.rs:149:33 [INFO] [stdout] | [INFO] [stdout] 149 | self.acceptable_words = acceptable_words.iter().map(|s| s.clone()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `acceptable_words.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/game.rs:161:32 [INFO] [stdout] | [INFO] [stdout] 161 | self.word_of_day = final_words.iter().map(|s| s.clone()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `final_words.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game.rs:221:16 [INFO] [stdout] | [INFO] [stdout] 221 | if !(result.letters[guess_idx] == LetterState::Correct) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(result.letters[guess_idx] != LetterState::Correct)` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/game.rs:254:9 [INFO] [stdout] | [INFO] [stdout] 254 | / if let Some(word) = self.word_of_day.get(self.day - 1) { [INFO] [stdout] 255 | | Some(word.clone()) [INFO] [stdout] 256 | | } else { [INFO] [stdout] 257 | | None [INFO] [stdout] 258 | | } [INFO] [stdout] | |_________^ help: try: `self.word_of_day.get(self.day - 1).map(|word| word.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/game.rs:381:35 [INFO] [stdout] | [INFO] [stdout] 381 | if msg == String::from("Y") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"Y"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/game.rs:383:42 [INFO] [stdout] | [INFO] [stdout] 383 | } else if msg == String::from("N") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"N"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:495:46 [INFO] [stdout] | [INFO] [stdout] 495 | let guess_result = Self::judge_guess(&guess, &self.answer); [INFO] [stdout] | ^^^^^^ help: change this to: `guess` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:496:35 [INFO] [stdout] | [INFO] [stdout] 496 | self.update_letter_states(&guess, &guess_result); [INFO] [stdout] | ^^^^^^ help: change this to: `guess` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:498:32 [INFO] [stdout] | [INFO] [stdout] 498 | solver.update_info(&guess, &guess_result); [INFO] [stdout] | ^^^^^^ help: change this to: `guess` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/game.rs:555:17 [INFO] [stdout] | [INFO] [stdout] 555 | / if last_guess == &s.answer { [INFO] [stdout] 556 | | true [INFO] [stdout] 557 | | } else { [INFO] [stdout] 558 | | false [INFO] [stdout] 559 | | } [INFO] [stdout] | |_________________^ help: you can reduce it to: `last_guess == &s.answer` [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: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/game.rs:570:21 [INFO] [stdout] | [INFO] [stdout] 570 | / if last_guess == &s.answer { [INFO] [stdout] 571 | | true [INFO] [stdout] 572 | | } else { [INFO] [stdout] 573 | | false [INFO] [stdout] 574 | | } [INFO] [stdout] | |_____________________^ help: you can reduce it to: `last_guess == &s.answer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:607:25 [INFO] [stdout] | [INFO] [stdout] 607 | b.1.cmp(&a.1) [INFO] [stdout] | ^^^^ help: change this to: `a.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/letter.rs:22:20 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn to_char(&self) -> char { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solver.rs:19:27 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn new(word_list: &Vec, hint_num: usize) -> WordleSolver { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 ~ pub fn new(word_list: &[String], hint_num: usize) -> WordleSolver { [INFO] [stdout] 20 | WordleSolver { [INFO] [stdout] ... [INFO] [stdout] 23 | letter_count: [0; 26], [INFO] [stdout] 24 ~ acceptable_words: word_list.to_owned(), [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/solver.rs:56:27 [INFO] [stdout] | [INFO] [stdout] 56 | fn get_entropy(words: &Vec) -> (Vec, Vec) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 56 - fn get_entropy(words: &Vec) -> (Vec, Vec) { [INFO] [stdout] 56 + fn get_entropy(words: &[String]) -> (Vec, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/solver.rs:96:38 [INFO] [stdout] | [INFO] [stdout] 96 | let mut word_letter_count = [0 as usize; 26]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [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 integer literal to `usize` is unnecessary [INFO] [stdout] --> src/solver.rs:130:37 [INFO] [stdout] | [INFO] [stdout] 130 | let mut new_letter_count = [0 as usize; 26]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solver.rs:169:27 [INFO] [stdout] | [INFO] [stdout] 169 | acceptable_words: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 169 ~ acceptable_words: &[String], [INFO] [stdout] 170 | guess_cnt: u64, [INFO] [stdout] 171 | ) -> (Vec, Vec) { [INFO] [stdout] 172 ~ let word_list = acceptable_words.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/solver.rs:176:17 [INFO] [stdout] | [INFO] [stdout] 176 | min_num_of_guesses.push(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![0.0;SIZE]` [INFO] [stdout] = help: or `min_num_of_guesses.extend(std::iter::repeat_n(0.0, SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[[bool; 26]; 5]` which implements the `Copy` trait [INFO] [stdout] --> src/solver.rs:184:43 [INFO] [stdout] | [INFO] [stdout] 184 | let mut new_can_present = can_present.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*can_present` [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: using `clone` on type `[usize; 26]` which implements the `Copy` trait [INFO] [stdout] --> src/solver.rs:185:44 [INFO] [stdout] | [INFO] [stdout] 185 | let mut new_letter_count = letter_count.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*letter_count` [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: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/solver.rs:187:45 [INFO] [stdout] | [INFO] [stdout] 187 | let mut tmp_letter_count = [0 as usize; 26]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/solver.rs:222:54 [INFO] [stdout] | [INFO] [stdout] 222 | let mut word_letter_count = [0 as usize; 26]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `next_num_of_guesses.get(0)` [INFO] [stdout] --> src/solver.rs:253:50 [INFO] [stdout] | [INFO] [stdout] 253 | sum_num_of_guesses += 1.0 + (next_num_of_guesses.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_num_of_guesses.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/solver.rs:281:12 [INFO] [stdout] | [INFO] [stdout] 281 | if self.candidate_words.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.candidate_words.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: length comparison to zero [INFO] [stdout] --> src/solver.rs:297:12 [INFO] [stdout] | [INFO] [stdout] 297 | if self.best_guess.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.best_guess.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: empty string literal in `println!` [INFO] [stdout] --> src/solver.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:74:1 [INFO] [stdout] | [INFO] [stdout] 74 | / impl Default for ConfigOptions { [INFO] [stdout] 75 | | fn default() -> Self { [INFO] [stdout] 76 | | Self { [INFO] [stdout] 77 | | word: None, [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub struct ConfigOptions { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/config.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | merged.word = cli_config.word.clone().or(file_config.word.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `config::ConfigOptions { word: cli_config.word.clone().or(file_config.word.clone()), random: cli_config.random || file_config.random, difficult: cli_config.difficult || file_config.difficult, stats: cli_config.stats || file_config.stats, seed: cli_config.seed.or(file_config.seed), day: cli_config.day.or(file_config.day), final_set: cli_config [INFO] [stdout] .final_set [INFO] [stdout] .clone() [INFO] [stdout] .or(file_config.final_set.clone()), acceptable_set: cli_config [INFO] [stdout] .acceptable_set [INFO] [stdout] .clone() [INFO] [stdout] .or(file_config.acceptable_set.clone()), state: cli_config.state.clone().or(file_config.state.clone()), config: cli_config.config.clone().or(file_config.config.clone()), hint_num: cli_config.hint_num.or(file_config.hint_num), best_start: cli_config.best_start || file_config.best_start, solver_mode: cli_config.solver_mode || file_config.solver_mode }` and removing relevant reassignments [INFO] [stdout] --> src/config.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | let mut merged = ConfigOptions::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/game.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | fn new(answer: &str, guesses: &Vec) -> RoundStat { [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] 24 ~ fn new(answer: &str, guesses: &[String]) -> RoundStat { [INFO] [stdout] 25 | RoundStat { [INFO] [stdout] 26 | answer: answer.to_string(), [INFO] [stdout] 27 ~ guesses: guesses.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/game.rs:148:28 [INFO] [stdout] | [INFO] [stdout] 148 | self.final_words = final_words.iter().map(|s| s.clone()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `final_words.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/game.rs:149:33 [INFO] [stdout] | [INFO] [stdout] 149 | self.acceptable_words = acceptable_words.iter().map(|s| s.clone()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `acceptable_words.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/game.rs:161:32 [INFO] [stdout] | [INFO] [stdout] 161 | self.word_of_day = final_words.iter().map(|s| s.clone()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `final_words.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game.rs:221:16 [INFO] [stdout] | [INFO] [stdout] 221 | if !(result.letters[guess_idx] == LetterState::Correct) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(result.letters[guess_idx] != LetterState::Correct)` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/game.rs:254:9 [INFO] [stdout] | [INFO] [stdout] 254 | / if let Some(word) = self.word_of_day.get(self.day - 1) { [INFO] [stdout] 255 | | Some(word.clone()) [INFO] [stdout] 256 | | } else { [INFO] [stdout] 257 | | None [INFO] [stdout] 258 | | } [INFO] [stdout] | |_________^ help: try: `self.word_of_day.get(self.day - 1).map(|word| word.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/game.rs:381:35 [INFO] [stdout] | [INFO] [stdout] 381 | if msg == String::from("Y") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"Y"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/game.rs:383:42 [INFO] [stdout] | [INFO] [stdout] 383 | } else if msg == String::from("N") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"N"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:495:46 [INFO] [stdout] | [INFO] [stdout] 495 | let guess_result = Self::judge_guess(&guess, &self.answer); [INFO] [stdout] | ^^^^^^ help: change this to: `guess` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:496:35 [INFO] [stdout] | [INFO] [stdout] 496 | self.update_letter_states(&guess, &guess_result); [INFO] [stdout] | ^^^^^^ help: change this to: `guess` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:498:32 [INFO] [stdout] | [INFO] [stdout] 498 | solver.update_info(&guess, &guess_result); [INFO] [stdout] | ^^^^^^ help: change this to: `guess` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/game.rs:555:17 [INFO] [stdout] | [INFO] [stdout] 555 | / if last_guess == &s.answer { [INFO] [stdout] 556 | | true [INFO] [stdout] 557 | | } else { [INFO] [stdout] 558 | | false [INFO] [stdout] 559 | | } [INFO] [stdout] | |_________________^ help: you can reduce it to: `last_guess == &s.answer` [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: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/game.rs:570:21 [INFO] [stdout] | [INFO] [stdout] 570 | / if last_guess == &s.answer { [INFO] [stdout] 571 | | true [INFO] [stdout] 572 | | } else { [INFO] [stdout] 573 | | false [INFO] [stdout] 574 | | } [INFO] [stdout] | |_____________________^ help: you can reduce it to: `last_guess == &s.answer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:607:25 [INFO] [stdout] | [INFO] [stdout] 607 | b.1.cmp(&a.1) [INFO] [stdout] | ^^^^ help: change this to: `a.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/letter.rs:22:20 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn to_char(&self) -> char { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solver.rs:19:27 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn new(word_list: &Vec, hint_num: usize) -> WordleSolver { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 ~ pub fn new(word_list: &[String], hint_num: usize) -> WordleSolver { [INFO] [stdout] 20 | WordleSolver { [INFO] [stdout] ... [INFO] [stdout] 23 | letter_count: [0; 26], [INFO] [stdout] 24 ~ acceptable_words: word_list.to_owned(), [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/solver.rs:56:27 [INFO] [stdout] | [INFO] [stdout] 56 | fn get_entropy(words: &Vec) -> (Vec, Vec) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 56 - fn get_entropy(words: &Vec) -> (Vec, Vec) { [INFO] [stdout] 56 + fn get_entropy(words: &[String]) -> (Vec, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/solver.rs:96:38 [INFO] [stdout] | [INFO] [stdout] 96 | let mut word_letter_count = [0 as usize; 26]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [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 integer literal to `usize` is unnecessary [INFO] [stdout] --> src/solver.rs:130:37 [INFO] [stdout] | [INFO] [stdout] 130 | let mut new_letter_count = [0 as usize; 26]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solver.rs:169:27 [INFO] [stdout] | [INFO] [stdout] 169 | acceptable_words: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 169 ~ acceptable_words: &[String], [INFO] [stdout] 170 | guess_cnt: u64, [INFO] [stdout] 171 | ) -> (Vec, Vec) { [INFO] [stdout] 172 ~ let word_list = acceptable_words.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/solver.rs:176:17 [INFO] [stdout] | [INFO] [stdout] 176 | min_num_of_guesses.push(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![0.0;SIZE]` [INFO] [stdout] = help: or `min_num_of_guesses.extend(std::iter::repeat_n(0.0, SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[[bool; 26]; 5]` which implements the `Copy` trait [INFO] [stdout] --> src/solver.rs:184:43 [INFO] [stdout] | [INFO] [stdout] 184 | let mut new_can_present = can_present.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*can_present` [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: using `clone` on type `[usize; 26]` which implements the `Copy` trait [INFO] [stdout] --> src/solver.rs:185:44 [INFO] [stdout] | [INFO] [stdout] 185 | let mut new_letter_count = letter_count.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*letter_count` [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: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/solver.rs:187:45 [INFO] [stdout] | [INFO] [stdout] 187 | let mut tmp_letter_count = [0 as usize; 26]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/solver.rs:222:54 [INFO] [stdout] | [INFO] [stdout] 222 | let mut word_letter_count = [0 as usize; 26]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `next_num_of_guesses.get(0)` [INFO] [stdout] --> src/solver.rs:253:50 [INFO] [stdout] | [INFO] [stdout] 253 | sum_num_of_guesses += 1.0 + (next_num_of_guesses.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_num_of_guesses.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/solver.rs:281:12 [INFO] [stdout] | [INFO] [stdout] 281 | if self.candidate_words.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.candidate_words.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: length comparison to zero [INFO] [stdout] --> src/solver.rs:297:12 [INFO] [stdout] | [INFO] [stdout] 297 | if self.best_guess.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.best_guess.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: empty string literal in `println!` [INFO] [stdout] --> src/solver.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 32.42s [INFO] running `Command { std: "docker" "inspect" "d9341c9bad372522b619ced6fdac539a1bc2fc1972452bae65ef6bc8fdffcc33", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d9341c9bad372522b619ced6fdac539a1bc2fc1972452bae65ef6bc8fdffcc33", kill_on_drop: false }` [INFO] [stdout] d9341c9bad372522b619ced6fdac539a1bc2fc1972452bae65ef6bc8fdffcc33