[INFO] cloning repository https://github.com/Francis-Rockwell/Wordle [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Francis-Rockwell/Wordle" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFrancis-Rockwell%2FWordle", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFrancis-Rockwell%2FWordle'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] aeb6668767182b64780efc38a06da4af88afd043 [INFO] linting Francis-Rockwell/Wordle against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFrancis-Rockwell%2FWordle" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] [stderr] Updating files: 29% (549/1878) Updating files: 30% (564/1878) Updating files: 31% (583/1878) Updating files: 32% (601/1878) Updating files: 33% (620/1878) Updating files: 34% (639/1878) Updating files: 35% (658/1878) Updating files: 36% (677/1878) Updating files: 37% (695/1878) Updating files: 38% (714/1878) Updating files: 39% (733/1878) Updating files: 40% (752/1878) Updating files: 41% (770/1878) Updating files: 42% (789/1878) Updating files: 43% (808/1878) Updating files: 44% (827/1878) Updating files: 45% (846/1878) Updating files: 46% (864/1878) Updating files: 47% (883/1878) Updating files: 48% (902/1878) Updating files: 49% (921/1878) Updating files: 50% (939/1878) Updating files: 51% (958/1878) Updating files: 52% (977/1878) Updating files: 53% (996/1878) Updating files: 54% (1015/1878) Updating files: 54% (1028/1878) Updating files: 55% (1033/1878) Updating files: 56% (1052/1878) Updating files: 57% (1071/1878) Updating files: 58% (1090/1878) Updating files: 59% (1109/1878) Updating files: 60% (1127/1878) Updating files: 60% (1135/1878) Updating files: 61% (1146/1878) Updating files: 62% (1165/1878) Updating files: 63% (1184/1878) Updating files: 64% (1202/1878) Updating files: 65% (1221/1878) Updating files: 66% (1240/1878) Updating files: 67% (1259/1878) Updating files: 68% (1278/1878) Updating files: 69% (1296/1878) Updating files: 70% (1315/1878) Updating files: 71% (1334/1878) Updating files: 72% (1353/1878) Updating files: 73% (1371/1878) Updating files: 74% (1390/1878) Updating files: 75% (1409/1878) Updating files: 76% (1428/1878) Updating files: 77% (1447/1878) Updating files: 78% (1465/1878) Updating files: 79% (1484/1878) Updating files: 80% (1503/1878) Updating files: 81% (1522/1878) Updating files: 82% (1540/1878) Updating files: 83% (1559/1878) Updating files: 84% (1578/1878) Updating files: 85% (1597/1878) Updating files: 86% (1616/1878) Updating files: 87% (1634/1878) Updating files: 88% (1653/1878) Updating files: 89% (1672/1878) Updating files: 90% (1691/1878) Updating files: 91% (1709/1878) Updating files: 92% (1728/1878) Updating files: 93% (1747/1878) Updating files: 94% (1766/1878) Updating files: 95% (1785/1878) Updating files: 96% (1803/1878) Updating files: 97% (1822/1878) Updating files: 98% (1841/1878) Updating files: 99% (1860/1878) Updating files: 100% (1878/1878) Updating files: 100% (1878/1878), done. [INFO] started tweaking git repo https://github.com/Francis-Rockwell/Wordle [INFO] finished tweaking git repo https://github.com/Francis-Rockwell/Wordle [INFO] tweaked toml for git repo https://github.com/Francis-Rockwell/Wordle written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Francis-Rockwell/Wordle 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/Francis-Rockwell/Wordle 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.8.1 [INFO] [stderr] Downloaded ntest v0.8.1 [INFO] [stderr] Downloaded ctor v0.1.23 [INFO] [stderr] Downloaded ansi_term v0.9.0 [INFO] [stderr] Downloaded serde_derive v1.0.143 [INFO] [stderr] Downloaded strsim v0.6.0 [INFO] [stderr] Downloaded tui v0.17.0 [INFO] [stderr] Downloaded crossterm v0.22.1 [INFO] [stderr] Downloaded textwrap v0.9.0 [INFO] [stderr] Downloaded console v0.15.1 [INFO] [stderr] Downloaded ntest_test_cases v0.8.0 [INFO] [stderr] Downloaded ntest_proc_macro_helper v0.8.0 [INFO] [stderr] Downloaded pretty_assertions v1.2.1 [INFO] [stderr] Downloaded output_vt100 v0.1.3 [INFO] [stderr] Downloaded libc v0.2.131 [INFO] [stderr] Downloaded clap v2.27.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] b6cb550dbc8d27175dd2e821b5a09747cfdab18f3cdfc3c7b42bc1fc141ec32e [INFO] running `Command { std: "docker" "start" "-a" "b6cb550dbc8d27175dd2e821b5a09747cfdab18f3cdfc3c7b42bc1fc141ec32e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b6cb550dbc8d27175dd2e821b5a09747cfdab18f3cdfc3c7b42bc1fc141ec32e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b6cb550dbc8d27175dd2e821b5a09747cfdab18f3cdfc3c7b42bc1fc141ec32e", kill_on_drop: false }` [INFO] [stdout] b6cb550dbc8d27175dd2e821b5a09747cfdab18f3cdfc3c7b42bc1fc141ec32e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 374b5e1b0a75509f606ebec83807a782a15027b08e9a360f1bb438a50997fbca [INFO] running `Command { std: "docker" "start" "-a" "374b5e1b0a75509f606ebec83807a782a15027b08e9a360f1bb438a50997fbca", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.131 [INFO] [stderr] Compiling proc-macro2 v1.0.43 [INFO] [stderr] Compiling unicode-ident v1.0.3 [INFO] [stderr] Compiling syn v1.0.99 [INFO] [stderr] Compiling serde_derive v1.0.143 [INFO] [stderr] Compiling serde v1.0.143 [INFO] [stderr] Checking smallvec v1.9.0 [INFO] [stderr] Checking unicode-width v0.1.9 [INFO] [stderr] Compiling lock_api v0.4.7 [INFO] [stderr] Compiling serde_json v1.0.83 [INFO] [stderr] Compiling once_cell v1.13.0 [INFO] [stderr] Checking itoa v1.0.3 [INFO] [stderr] Checking ryu v1.0.11 [INFO] [stderr] Checking cassowary v0.3.0 [INFO] [stderr] Checking vec_map v0.8.2 [INFO] [stderr] Checking strsim v0.6.0 [INFO] [stderr] Checking textwrap v0.9.0 [INFO] [stderr] Compiling ntest_proc_macro_helper v0.8.0 [INFO] [stderr] Checking bitflags v0.9.1 [INFO] [stderr] Checking unicode-segmentation v1.9.0 [INFO] [stderr] Checking ansi_term v0.9.0 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Checking ansi_term v0.12.1 [INFO] [stderr] Checking pretty_assertions v1.2.1 [INFO] [stderr] Compiling quote v1.0.21 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking parking_lot_core v0.8.5 [INFO] [stderr] Checking mio v0.7.14 [INFO] [stderr] Checking getrandom v0.2.7 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking terminal_size v0.1.17 [INFO] [stderr] Checking clap v2.27.1 [INFO] [stderr] Checking console v0.15.1 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking signal-hook v0.3.14 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking signal-hook-mio v0.2.3 [INFO] [stderr] Compiling thiserror-impl v1.0.32 [INFO] [stderr] Compiling ntest_test_cases v0.8.0 [INFO] [stderr] Compiling toml v0.5.9 [INFO] [stderr] Compiling thiserror v1.0.32 [INFO] [stderr] Compiling proc-macro-crate v1.2.1 [INFO] [stderr] Compiling ntest_timeout v0.8.1 [INFO] [stderr] Checking ntest v0.8.1 [INFO] [stderr] Checking crossterm v0.22.1 [INFO] [stderr] Checking tui v0.17.0 [INFO] [stderr] Checking assert-json-diff v2.0.2 [INFO] [stderr] Checking wordle v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> tests/common.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | 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:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | 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: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common.rs:44:28 [INFO] [stdout] | [INFO] [stdout] 44 | build_command.args(&["build", "--quiet"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["build", "--quiet"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common.rs:44:28 [INFO] [stdout] | [INFO] [stdout] 44 | build_command.args(&["build", "--quiet"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["build", "--quiet"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` 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/common.rs:153:27 [INFO] [stdout] | [INFO] [stdout] 153 | pub(crate) fn y_or_r(ans: &Vec, guess: &Vec, num: usize) -> bool { [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] 153 - pub(crate) fn y_or_r(ans: &Vec, guess: &Vec, num: usize) -> bool { [INFO] [stdout] 153 + pub(crate) fn y_or_r(ans: &[char], guess: &Vec, num: usize) -> bool { [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/common.rs:153:46 [INFO] [stdout] | [INFO] [stdout] 153 | pub(crate) fn y_or_r(ans: &Vec, guess: &Vec, num: usize) -> bool { [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] 153 - pub(crate) fn y_or_r(ans: &Vec, guess: &Vec, num: usize) -> bool { [INFO] [stdout] 153 + pub(crate) fn y_or_r(ans: &Vec, guess: &[char], num: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `ans` [INFO] [stdout] --> src/common.rs:156:14 [INFO] [stdout] | [INFO] [stdout] 156 | for i in 0..LENGTH { [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 [INFO] [stdout] | [INFO] [stdout] 156 - for i in 0..LENGTH { [INFO] [stdout] 156 + for in ans.iter().take(LENGTH) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/common.rs:171:5 [INFO] [stdout] | [INFO] [stdout] 171 | / if guess_order > ans_count { [INFO] [stdout] 172 | | false [INFO] [stdout] 173 | | } else { [INFO] [stdout] 174 | | true [INFO] [stdout] 175 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `guess_order <= ans_count` [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: unneeded `return` statement [INFO] [stdout] --> src/common.rs:212:5 [INFO] [stdout] | [INFO] [stdout] 212 | return judge; [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] 212 - return judge; [INFO] [stdout] 212 + judge [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/common.rs:185:66 [INFO] [stdout] | [INFO] [stdout] 185 | pub(crate) fn diffcult(word: &str, last_guess: &str, last_color: &Vec) -> bool { [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] 185 - pub(crate) fn diffcult(word: &str, last_guess: &str, last_color: &Vec) -> bool { [INFO] [stdout] 185 + pub(crate) fn diffcult(word: &str, last_guess: &str, last_color: &[char]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/common.rs:270:62 [INFO] [stdout] | [INFO] [stdout] 270 | pub fn random(day: &Option, seed: &Option, list: &mut Vec) -> usize { [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] 270 - pub fn random(day: &Option, seed: &Option, list: &mut Vec) -> usize { [INFO] [stdout] 270 + pub fn random(day: &Option, seed: &Option, list: &mut [usize]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/common.rs:356:12 [INFO] [stdout] | [INFO] [stdout] 356 | if let Err(_) = file.read_to_string(&mut text) { [INFO] [stdout] | -------^^^^^^--------------------------------- help: try: `if file.read_to_string(&mut text).is_err()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/common.rs:419:27 [INFO] [stdout] | [INFO] [stdout] 419 | if !wordcheck(&acceptvec[i]) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `acceptvec[i]` [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: the loop variable `i` is only used to index `finalvec` [INFO] [stdout] --> src/common.rs:430:18 [INFO] [stdout] | [INFO] [stdout] 430 | for i in 1..finalvec.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] 430 - for i in 1..finalvec.len() { [INFO] [stdout] 430 + for in finalvec.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `text.games` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:461:18 [INFO] [stdout] | [INFO] [stdout] 460 | if text.games.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = text.games` [INFO] [stdout] 461 | for i in text.games.unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/common.rs:499:14 [INFO] [stdout] | [INFO] [stdout] 499 | answers: &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] 499 - answers: &Vec>, [INFO] [stdout] 499 + answers: &[Option], [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/common.rs:500:14 [INFO] [stdout] | [INFO] [stdout] 500 | guesses: &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] 500 - guesses: &Vec, [INFO] [stdout] 500 + guesses: &[String], [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/common.rs:501:14 [INFO] [stdout] | [INFO] [stdout] 501 | results: &Vec, Option)>>, [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] 501 - results: &Vec, Option)>>, [INFO] [stdout] 501 + results: &[Option<(Option, Option)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `results` [INFO] [stdout] --> src/common.rs:509:18 [INFO] [stdout] | [INFO] [stdout] 509 | for j in 0..i { [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] 509 - for j in 0..i { [INFO] [stdout] 509 + for in results.iter().take(i) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/common.rs:520:9 [INFO] [stdout] | [INFO] [stdout] 520 | let answer: Option; [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 `answer` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 520 ~ [INFO] [stdout] 521 ~ let answer: Option = if answers[i].is_some() { [INFO] [stdout] 522 ~ Some(answers[i].as_ref().unwrap().clone().to_ascii_uppercase()) [INFO] [stdout] 523 | } else { [INFO] [stdout] 524 ~ None [INFO] [stdout] 525 ~ }; // answer is the answer for this round [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/common.rs:546:12 [INFO] [stdout] | [INFO] [stdout] 546 | if let Err(_) = file.write_all(text.as_bytes()) { [INFO] [stdout] | -------^^^^^^---------------------------------- help: try: `if file.write_all(text.as_bytes()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `resultstr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:564:28 [INFO] [stdout] | [INFO] [stdout] 563 | if resultstr.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = resultstr` [INFO] [stdout] 564 | _result = Some(resultstr.unwrap().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `wordstr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:592:21 [INFO] [stdout] | [INFO] [stdout] 591 | if wordstr.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = wordstr` [INFO] [stdout] 592 | word = Some(wordstr.unwrap().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `seedstr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:597:12 [INFO] [stdout] | [INFO] [stdout] 596 | if seedstr.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = seedstr` [INFO] [stdout] 597 | if seedstr.unwrap().parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `seedstr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:598:26 [INFO] [stdout] | [INFO] [stdout] 596 | if seedstr.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = seedstr` [INFO] [stdout] 597 | if seedstr.unwrap().parse::().is_ok() { [INFO] [stdout] 598 | _seed = Some(seedstr.unwrap().parse::().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `daystr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:609:12 [INFO] [stdout] | [INFO] [stdout] 608 | if daystr.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = daystr` [INFO] [stdout] 609 | if daystr.unwrap().parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `daystr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:610:25 [INFO] [stdout] | [INFO] [stdout] 608 | if daystr.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = daystr` [INFO] [stdout] 609 | if daystr.unwrap().parse::().is_ok() { [INFO] [stdout] 610 | _day = Some(daystr.unwrap().parse::().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/tty_false.rs:27:41 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn keyboard_out(guess: &str, color: &Vec, keyboard: &mut [char; 26]) { [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] 27 - pub fn keyboard_out(guess: &str, color: &Vec, keyboard: &mut [char; 26]) { [INFO] [stdout] 27 + pub fn keyboard_out(guess: &str, color: &[char], keyboard: &mut [char; 26]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `keyboard` [INFO] [stdout] --> src/tty_false.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | for i in 0..26 { [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] 36 - for i in 0..26 { [INFO] [stdout] 36 + for in keyboard.iter().take(26) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/tty_false.rs:59:62 [INFO] [stdout] | [INFO] [stdout] 59 | if exist(&guess[..], unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 60 | | println!("INVALID"); [INFO] [stdout] 61 | | } else if hard [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/tty_false.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | / { [INFO] [stdout] 69 | | println!("INVALID"); [INFO] [stdout] 70 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/tty_false.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | if exist(&guess[..], unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!exist(&guess[..], unsafe { &ACCEPTSET })` [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: unneeded `return` statement [INFO] [stdout] --> src/tty_false.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | return Ok(true); [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] 104 - return Ok(true); [INFO] [stdout] 104 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tty_false.rs:124:24 [INFO] [stdout] | [INFO] [stdout] 124 | let append = stats(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `guesses` [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/tty_false.rs:124:34 [INFO] [stdout] | [INFO] [stdout] 124 | let append = stats(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `results` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/tty_true.rs:28:47 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn string_color_print(guess: &str, color: &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] 28 - pub fn string_color_print(guess: &str, color: &Vec) { [INFO] [stdout] 28 + pub fn string_color_print(guess: &str, color: &[char]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `h` is used to index `keyboard` [INFO] [stdout] --> src/tty_true.rs:47:14 [INFO] [stdout] | [INFO] [stdout] 47 | for h in 0..3 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 47 - for h in 0..3 { [INFO] [stdout] 47 + for (h, ) in keyboard.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `v` is used to index `keyboard` [INFO] [stdout] --> src/tty_true.rs:48:18 [INFO] [stdout] | [INFO] [stdout] 48 | for v in 0..keyboard[h].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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 48 - for v in 0..keyboard[h].len() { [INFO] [stdout] 48 + for (v, ) in keyboard.iter().enumerate().take(keyboard[h].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/tty_true.rs:64:38 [INFO] [stdout] | [INFO] [stdout] 64 | pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut 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] 64 - pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut Vec>) { [INFO] [stdout] 64 + pub(crate) fn change_keyboard(guess: &str, color: &Vec, keyboard: &mut Vec>) { [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/tty_true.rs:64:54 [INFO] [stdout] | [INFO] [stdout] 64 | pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut 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] 64 - pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut Vec>) { [INFO] [stdout] 64 + pub(crate) fn change_keyboard(guess: &String, color: &[char], keyboard: &mut Vec>) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/tty_true.rs:64:76 [INFO] [stdout] | [INFO] [stdout] 64 | pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut 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] 64 - pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut Vec>) { [INFO] [stdout] 64 + pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut [Vec]) { [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/tty_true.rs:79:30 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn keyboardout(keyboard: &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] 79 - pub fn keyboardout(keyboard: &Vec>) { [INFO] [stdout] 79 + pub fn keyboardout(keyboard: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/tty_true.rs:133:58 [INFO] [stdout] | [INFO] [stdout] 133 | if exist(&guess, unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 134 | | invaid.push(guess.clone()); [INFO] [stdout] 135 | | println!("INVALID"); [INFO] [stdout] 136 | | } else if hard [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/tty_true.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | / { [INFO] [stdout] 140 | | invaid.push(guess.clone()); [INFO] [stdout] 141 | | println!("INVALID"); [INFO] [stdout] 142 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/tty_true.rs:133:12 [INFO] [stdout] | [INFO] [stdout] 133 | if exist(&guess, unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!exist(&guess, unsafe { &ACCEPTSET })` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `invaid` [INFO] [stdout] --> src/tty_true.rs:154:18 [INFO] [stdout] | [INFO] [stdout] 154 | for i in 0..invaid.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] 154 - for i in 0..invaid.len() { [INFO] [stdout] 154 + for in &invaid { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 37 | if !arg.word.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `arg.word.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 51 | if !arg.word.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `arg.word.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | stats_tty(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `guesses` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:35:33 [INFO] [stdout] | [INFO] [stdout] 35 | stats_tty(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `results` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:49:25 [INFO] [stdout] | [INFO] [stdout] 49 | stats_notty(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `guesses` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:49:35 [INFO] [stdout] | [INFO] [stdout] 49 | stats_notty(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `results` [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: useless use of `vec!` [INFO] [stdout] --> src/tty_true.rs:42:20 [INFO] [stdout] | [INFO] [stdout] 42 | let keyboard = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 43 | | vec!['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], [INFO] [stdout] 44 | | vec!['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], [INFO] [stdout] 45 | | vec!['Z', 'X', 'C', 'V', 'B', 'N', 'M'], [INFO] [stdout] 46 | | ]; [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] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 42 ~ let keyboard = [vec!['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], [INFO] [stdout] 43 + vec!['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], [INFO] [stdout] 44 ~ vec!['Z', 'X', 'C', 'V', 'B', 'N', 'M']]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tty_true.rs:80:23 [INFO] [stdout] | [INFO] [stdout] 80 | let stdkeyboard = vec![ [INFO] [stdout] | _______________________^ [INFO] [stdout] 81 | | vec!['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], [INFO] [stdout] 82 | | vec!['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], [INFO] [stdout] 83 | | vec!['Z', 'X', 'C', 'V', 'B', 'N', 'M'], [INFO] [stdout] 84 | | ]; [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] 80 ~ let stdkeyboard = [vec!['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], [INFO] [stdout] 81 + vec!['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], [INFO] [stdout] 82 ~ vec!['Z', 'X', 'C', 'V', 'B', 'N', 'M']]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:66:32 [INFO] [stdout] | [INFO] [stdout] 66 | let list = 0..unsafe { FINALSET.len() }; [INFO] [stdout] | ^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/common.rs:223:29 [INFO] [stdout] | [INFO] [stdout] 223 | let ans: Vec = ans.clone().to_ascii_lowercase().chars().collect(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/common.rs:224:33 [INFO] [stdout] | [INFO] [stdout] 224 | let guess: Vec = guess.clone().to_ascii_lowercase().chars().collect(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/common.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | if exist(&s, unsafe { &FINALSET }) { [INFO] [stdout] | ^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 253 | if exist(&s, unsafe { &raw const FINALSET }) { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/common.rs:611:41 [INFO] [stdout] | [INFO] [stdout] 611 | if _day.unwrap() > unsafe { FINALSET.len() } || _day.unwrap() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/tty_false.rs:59:39 [INFO] [stdout] | [INFO] [stdout] 59 | if exist(&guess[..], unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 59 | if exist(&guess[..], unsafe { &raw const ACCEPTSET }) == false { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tty_true.rs:29:33 [INFO] [stdout] | [INFO] [stdout] 29 | let guess: Vec = guess.clone().chars().collect(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/tty_true.rs:133:35 [INFO] [stdout] | [INFO] [stdout] 133 | if exist(&guess, unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 133 | if exist(&guess, unsafe { &raw const ACCEPTSET }) == false { [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/common.rs:153:27 [INFO] [stdout] | [INFO] [stdout] 153 | pub(crate) fn y_or_r(ans: &Vec, guess: &Vec, num: usize) -> bool { [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] 153 - pub(crate) fn y_or_r(ans: &Vec, guess: &Vec, num: usize) -> bool { [INFO] [stdout] 153 + pub(crate) fn y_or_r(ans: &[char], guess: &Vec, num: usize) -> bool { [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/common.rs:153:46 [INFO] [stdout] | [INFO] [stdout] 153 | pub(crate) fn y_or_r(ans: &Vec, guess: &Vec, num: usize) -> bool { [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] 153 - pub(crate) fn y_or_r(ans: &Vec, guess: &Vec, num: usize) -> bool { [INFO] [stdout] 153 + pub(crate) fn y_or_r(ans: &Vec, guess: &[char], num: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `ans` [INFO] [stdout] --> src/common.rs:156:14 [INFO] [stdout] | [INFO] [stdout] 156 | for i in 0..LENGTH { [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 [INFO] [stdout] | [INFO] [stdout] 156 - for i in 0..LENGTH { [INFO] [stdout] 156 + for in ans.iter().take(LENGTH) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/common.rs:171:5 [INFO] [stdout] | [INFO] [stdout] 171 | / if guess_order > ans_count { [INFO] [stdout] 172 | | false [INFO] [stdout] 173 | | } else { [INFO] [stdout] 174 | | true [INFO] [stdout] 175 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `guess_order <= ans_count` [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: unneeded `return` statement [INFO] [stdout] --> src/common.rs:212:5 [INFO] [stdout] | [INFO] [stdout] 212 | return judge; [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] 212 - return judge; [INFO] [stdout] 212 + judge [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/common.rs:185:66 [INFO] [stdout] | [INFO] [stdout] 185 | pub(crate) fn diffcult(word: &str, last_guess: &str, last_color: &Vec) -> bool { [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] 185 - pub(crate) fn diffcult(word: &str, last_guess: &str, last_color: &Vec) -> bool { [INFO] [stdout] 185 + pub(crate) fn diffcult(word: &str, last_guess: &str, last_color: &[char]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/common.rs:270:62 [INFO] [stdout] | [INFO] [stdout] 270 | pub fn random(day: &Option, seed: &Option, list: &mut Vec) -> usize { [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] 270 - pub fn random(day: &Option, seed: &Option, list: &mut Vec) -> usize { [INFO] [stdout] 270 + pub fn random(day: &Option, seed: &Option, list: &mut [usize]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/common.rs:356:12 [INFO] [stdout] | [INFO] [stdout] 356 | if let Err(_) = file.read_to_string(&mut text) { [INFO] [stdout] | -------^^^^^^--------------------------------- help: try: `if file.read_to_string(&mut text).is_err()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/common.rs:419:27 [INFO] [stdout] | [INFO] [stdout] 419 | if !wordcheck(&acceptvec[i]) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `acceptvec[i]` [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: the loop variable `i` is only used to index `finalvec` [INFO] [stdout] --> src/common.rs:430:18 [INFO] [stdout] | [INFO] [stdout] 430 | for i in 1..finalvec.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] 430 - for i in 1..finalvec.len() { [INFO] [stdout] 430 + for in finalvec.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `text.games` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:461:18 [INFO] [stdout] | [INFO] [stdout] 460 | if text.games.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = text.games` [INFO] [stdout] 461 | for i in text.games.unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/common.rs:499:14 [INFO] [stdout] | [INFO] [stdout] 499 | answers: &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] 499 - answers: &Vec>, [INFO] [stdout] 499 + answers: &[Option], [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/common.rs:500:14 [INFO] [stdout] | [INFO] [stdout] 500 | guesses: &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] 500 - guesses: &Vec, [INFO] [stdout] 500 + guesses: &[String], [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/common.rs:501:14 [INFO] [stdout] | [INFO] [stdout] 501 | results: &Vec, Option)>>, [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] 501 - results: &Vec, Option)>>, [INFO] [stdout] 501 + results: &[Option<(Option, Option)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `results` [INFO] [stdout] --> src/common.rs:509:18 [INFO] [stdout] | [INFO] [stdout] 509 | for j in 0..i { [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] 509 - for j in 0..i { [INFO] [stdout] 509 + for in results.iter().take(i) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/common.rs:520:9 [INFO] [stdout] | [INFO] [stdout] 520 | let answer: Option; [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 `answer` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 520 ~ [INFO] [stdout] 521 ~ let answer: Option = if answers[i].is_some() { [INFO] [stdout] 522 ~ Some(answers[i].as_ref().unwrap().clone().to_ascii_uppercase()) [INFO] [stdout] 523 | } else { [INFO] [stdout] 524 ~ None [INFO] [stdout] 525 ~ }; // answer is the answer for this round [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/common.rs:546:12 [INFO] [stdout] | [INFO] [stdout] 546 | if let Err(_) = file.write_all(text.as_bytes()) { [INFO] [stdout] | -------^^^^^^---------------------------------- help: try: `if file.write_all(text.as_bytes()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `resultstr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:564:28 [INFO] [stdout] | [INFO] [stdout] 563 | if resultstr.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = resultstr` [INFO] [stdout] 564 | _result = Some(resultstr.unwrap().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `wordstr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:592:21 [INFO] [stdout] | [INFO] [stdout] 591 | if wordstr.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = wordstr` [INFO] [stdout] 592 | word = Some(wordstr.unwrap().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `seedstr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:597:12 [INFO] [stdout] | [INFO] [stdout] 596 | if seedstr.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = seedstr` [INFO] [stdout] 597 | if seedstr.unwrap().parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `seedstr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:598:26 [INFO] [stdout] | [INFO] [stdout] 596 | if seedstr.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = seedstr` [INFO] [stdout] 597 | if seedstr.unwrap().parse::().is_ok() { [INFO] [stdout] 598 | _seed = Some(seedstr.unwrap().parse::().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `daystr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:609:12 [INFO] [stdout] | [INFO] [stdout] 608 | if daystr.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = daystr` [INFO] [stdout] 609 | if daystr.unwrap().parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `daystr` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:610:25 [INFO] [stdout] | [INFO] [stdout] 608 | if daystr.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = daystr` [INFO] [stdout] 609 | if daystr.unwrap().parse::().is_ok() { [INFO] [stdout] 610 | _day = Some(daystr.unwrap().parse::().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/tty_false.rs:27:41 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn keyboard_out(guess: &str, color: &Vec, keyboard: &mut [char; 26]) { [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] 27 - pub fn keyboard_out(guess: &str, color: &Vec, keyboard: &mut [char; 26]) { [INFO] [stdout] 27 + pub fn keyboard_out(guess: &str, color: &[char], keyboard: &mut [char; 26]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `keyboard` [INFO] [stdout] --> src/tty_false.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | for i in 0..26 { [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] 36 - for i in 0..26 { [INFO] [stdout] 36 + for in keyboard.iter().take(26) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/tty_false.rs:59:62 [INFO] [stdout] | [INFO] [stdout] 59 | if exist(&guess[..], unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 60 | | println!("INVALID"); [INFO] [stdout] 61 | | } else if hard [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/tty_false.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | / { [INFO] [stdout] 69 | | println!("INVALID"); [INFO] [stdout] 70 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/tty_false.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | if exist(&guess[..], unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!exist(&guess[..], unsafe { &ACCEPTSET })` [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: unneeded `return` statement [INFO] [stdout] --> src/tty_false.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | return Ok(true); [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] 104 - return Ok(true); [INFO] [stdout] 104 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tty_false.rs:124:24 [INFO] [stdout] | [INFO] [stdout] 124 | let append = stats(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `guesses` [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/tty_false.rs:124:34 [INFO] [stdout] | [INFO] [stdout] 124 | let append = stats(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `results` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/tty_true.rs:28:47 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn string_color_print(guess: &str, color: &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] 28 - pub fn string_color_print(guess: &str, color: &Vec) { [INFO] [stdout] 28 + pub fn string_color_print(guess: &str, color: &[char]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `h` is used to index `keyboard` [INFO] [stdout] --> src/tty_true.rs:47:14 [INFO] [stdout] | [INFO] [stdout] 47 | for h in 0..3 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 47 - for h in 0..3 { [INFO] [stdout] 47 + for (h, ) in keyboard.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `v` is used to index `keyboard` [INFO] [stdout] --> src/tty_true.rs:48:18 [INFO] [stdout] | [INFO] [stdout] 48 | for v in 0..keyboard[h].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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 48 - for v in 0..keyboard[h].len() { [INFO] [stdout] 48 + for (v, ) in keyboard.iter().enumerate().take(keyboard[h].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/tty_true.rs:64:38 [INFO] [stdout] | [INFO] [stdout] 64 | pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut 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] 64 - pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut Vec>) { [INFO] [stdout] 64 + pub(crate) fn change_keyboard(guess: &str, color: &Vec, keyboard: &mut Vec>) { [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/tty_true.rs:64:54 [INFO] [stdout] | [INFO] [stdout] 64 | pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut 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] 64 - pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut Vec>) { [INFO] [stdout] 64 + pub(crate) fn change_keyboard(guess: &String, color: &[char], keyboard: &mut Vec>) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/tty_true.rs:64:76 [INFO] [stdout] | [INFO] [stdout] 64 | pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut 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] 64 - pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut Vec>) { [INFO] [stdout] 64 + pub(crate) fn change_keyboard(guess: &String, color: &Vec, keyboard: &mut [Vec]) { [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/tty_true.rs:79:30 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn keyboardout(keyboard: &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] 79 - pub fn keyboardout(keyboard: &Vec>) { [INFO] [stdout] 79 + pub fn keyboardout(keyboard: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/tty_true.rs:133:58 [INFO] [stdout] | [INFO] [stdout] 133 | if exist(&guess, unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 134 | | invaid.push(guess.clone()); [INFO] [stdout] 135 | | println!("INVALID"); [INFO] [stdout] 136 | | } else if hard [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/tty_true.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | / { [INFO] [stdout] 140 | | invaid.push(guess.clone()); [INFO] [stdout] 141 | | println!("INVALID"); [INFO] [stdout] 142 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/tty_true.rs:133:12 [INFO] [stdout] | [INFO] [stdout] 133 | if exist(&guess, unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!exist(&guess, unsafe { &ACCEPTSET })` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `invaid` [INFO] [stdout] --> src/tty_true.rs:154:18 [INFO] [stdout] | [INFO] [stdout] 154 | for i in 0..invaid.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] 154 - for i in 0..invaid.len() { [INFO] [stdout] 154 + for in &invaid { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 37 | if !arg.word.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `arg.word.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 51 | if !arg.word.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `arg.word.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | stats_tty(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `guesses` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:35:33 [INFO] [stdout] | [INFO] [stdout] 35 | stats_tty(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `results` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:49:25 [INFO] [stdout] | [INFO] [stdout] 49 | stats_notty(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `guesses` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:49:35 [INFO] [stdout] | [INFO] [stdout] 49 | stats_notty(&guesses, &results); [INFO] [stdout] | ^^^^^^^^ help: change this to: `results` [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: useless use of `vec!` [INFO] [stdout] --> src/tty_true.rs:42:20 [INFO] [stdout] | [INFO] [stdout] 42 | let keyboard = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 43 | | vec!['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], [INFO] [stdout] 44 | | vec!['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], [INFO] [stdout] 45 | | vec!['Z', 'X', 'C', 'V', 'B', 'N', 'M'], [INFO] [stdout] 46 | | ]; [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] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 42 ~ let keyboard = [vec!['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], [INFO] [stdout] 43 + vec!['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], [INFO] [stdout] 44 ~ vec!['Z', 'X', 'C', 'V', 'B', 'N', 'M']]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tty_true.rs:80:23 [INFO] [stdout] | [INFO] [stdout] 80 | let stdkeyboard = vec![ [INFO] [stdout] | _______________________^ [INFO] [stdout] 81 | | vec!['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], [INFO] [stdout] 82 | | vec!['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], [INFO] [stdout] 83 | | vec!['Z', 'X', 'C', 'V', 'B', 'N', 'M'], [INFO] [stdout] 84 | | ]; [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] 80 ~ let stdkeyboard = [vec!['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], [INFO] [stdout] 81 + vec!['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], [INFO] [stdout] 82 ~ vec!['Z', 'X', 'C', 'V', 'B', 'N', 'M']]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:66:32 [INFO] [stdout] | [INFO] [stdout] 66 | let list = 0..unsafe { FINALSET.len() }; [INFO] [stdout] | ^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/common.rs:223:29 [INFO] [stdout] | [INFO] [stdout] 223 | let ans: Vec = ans.clone().to_ascii_lowercase().chars().collect(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/common.rs:224:33 [INFO] [stdout] | [INFO] [stdout] 224 | let guess: Vec = guess.clone().to_ascii_lowercase().chars().collect(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/common.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | if exist(&s, unsafe { &FINALSET }) { [INFO] [stdout] | ^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 253 | if exist(&s, unsafe { &raw const FINALSET }) { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/common.rs:611:41 [INFO] [stdout] | [INFO] [stdout] 611 | if _day.unwrap() > unsafe { FINALSET.len() } || _day.unwrap() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/tty_false.rs:59:39 [INFO] [stdout] | [INFO] [stdout] 59 | if exist(&guess[..], unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 59 | if exist(&guess[..], unsafe { &raw const ACCEPTSET }) == false { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/tty_true.rs:29:33 [INFO] [stdout] | [INFO] [stdout] 29 | let guess: Vec = guess.clone().chars().collect(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/tty_true.rs:133:35 [INFO] [stdout] | [INFO] [stdout] 133 | if exist(&guess, unsafe { &ACCEPTSET }) == false { [INFO] [stdout] | ^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 133 | if exist(&guess, unsafe { &raw const ACCEPTSET }) == false { [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 20.12s [INFO] running `Command { std: "docker" "inspect" "374b5e1b0a75509f606ebec83807a782a15027b08e9a360f1bb438a50997fbca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "374b5e1b0a75509f606ebec83807a782a15027b08e9a360f1bb438a50997fbca", kill_on_drop: false }` [INFO] [stdout] 374b5e1b0a75509f606ebec83807a782a15027b08e9a360f1bb438a50997fbca