[INFO] cloning repository https://github.com/tortoise501/typing_game [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tortoise501/typing_game" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftortoise501%2Ftyping_game", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftortoise501%2Ftyping_game'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 98afe3bb192ded6c43bb78e353132b19c74fea16 [INFO] linting tortoise501/typing_game against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftortoise501%2Ftyping_game" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/tortoise501/typing_game [INFO] finished tweaking git repo https://github.com/tortoise501/typing_game [INFO] tweaked toml for git repo https://github.com/tortoise501/typing_game written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/tortoise501/typing_game 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/tortoise501/typing_game 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 markov_strings v0.1.5 [INFO] [stderr] Downloaded compact_str v0.7.1 [INFO] [stderr] Downloaded castaway v0.2.2 [INFO] [stderr] Downloaded stability v0.2.0 [INFO] [stderr] Downloaded markov_rope v0.1.0 [INFO] [stderr] Downloaded lru v0.12.1 [INFO] [stderr] Downloaded strum_macros v0.26.2 [INFO] [stderr] Downloaded strum v0.26.2 [INFO] [stderr] Downloaded ratatui v0.26.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b39c0a51c00df58c94cf836d0ac238f654cabd61cc04a70b81db9d70d5719f8b [INFO] running `Command { std: "docker" "start" "-a" "b39c0a51c00df58c94cf836d0ac238f654cabd61cc04a70b81db9d70d5719f8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b39c0a51c00df58c94cf836d0ac238f654cabd61cc04a70b81db9d70d5719f8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b39c0a51c00df58c94cf836d0ac238f654cabd61cc04a70b81db9d70d5719f8b", kill_on_drop: false }` [INFO] [stdout] b39c0a51c00df58c94cf836d0ac238f654cabd61cc04a70b81db9d70d5719f8b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e27326223b3fbce5c221c6f82ac02e78568246c7d6a90d48a359a7c4b102afea [INFO] running `Command { std: "docker" "start" "-a" "e27326223b3fbce5c221c6f82ac02e78568246c7d6a90d48a359a7c4b102afea", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.152 [INFO] [stderr] Compiling proc-macro2 v1.0.78 [INFO] [stderr] Checking smallvec v1.13.1 [INFO] [stderr] Checking zerocopy v0.7.32 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Checking log v0.4.20 [INFO] [stderr] Compiling rustversion v1.0.14 [INFO] [stderr] Compiling ahash v0.8.7 [INFO] [stderr] Compiling signal-hook v0.3.17 [INFO] [stderr] Compiling heck v0.4.1 [INFO] [stderr] Compiling serde v1.0.196 [INFO] [stderr] Compiling num-traits v0.2.18 [INFO] [stderr] Checking bitflags v2.4.2 [INFO] [stderr] Checking itoa v1.0.11 [INFO] [stderr] Checking itertools v0.12.1 [INFO] [stderr] Checking unicode-segmentation v1.10.1 [INFO] [stderr] Compiling indoc v2.0.4 [INFO] [stderr] Checking cassowary v0.3.0 [INFO] [stderr] Checking hashbrown v0.14.3 [INFO] [stderr] Checking castaway v0.2.2 [INFO] [stderr] Checking compact_str v0.7.1 [INFO] [stderr] Checking lru v0.12.1 [INFO] [stderr] Checking getrandom v0.2.12 [INFO] [stderr] Checking signal-hook-registry v1.4.1 [INFO] [stderr] Checking parking_lot_core v0.9.9 [INFO] [stderr] Checking mio v0.8.10 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling quote v1.0.35 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking signal-hook-mio v0.2.3 [INFO] [stderr] Checking crossterm v0.27.0 [INFO] [stderr] Compiling syn v2.0.48 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking markov_rope v0.1.0 [INFO] [stderr] Compiling strum_macros v0.26.2 [INFO] [stderr] Compiling serde_derive v1.0.196 [INFO] [stderr] Compiling stability v0.2.0 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Checking strum v0.26.2 [INFO] [stderr] Checking ratatui v0.26.2 [INFO] [stderr] Checking markov_strings v0.1.5 [INFO] [stderr] Checking typing_game v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/game.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / ///Gets random text for a game [INFO] [stdout] ... | [INFO] [stdout] 167 | | [INFO] [stdout] | |_^ [INFO] [stdout] 168 | ///Writes to speed stat vector [INFO] [stdout] 169 | pub fn register_speed(&mut self) { [INFO] [stdout] | --------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `register_speed` then comment it out [INFO] [stdout] | [INFO] [stdout] 161 | // ///Gets random text for a game [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/game.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / ///Gets random text for a game [INFO] [stdout] ... | [INFO] [stdout] 167 | | [INFO] [stdout] | |_^ [INFO] [stdout] 168 | ///Writes to speed stat vector [INFO] [stdout] 169 | pub fn register_speed(&mut self) { [INFO] [stdout] | --------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `register_speed` then comment it out [INFO] [stdout] | [INFO] [stdout] 161 | // ///Gets random text for a game [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `wrong_letters` is never read [INFO] [stdout] --> src/game.rs:227:9 [INFO] [stdout] | [INFO] [stdout] 224 | pub struct GameStat { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 227 | pub wrong_letters: u32, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GameStat` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found `.or(Ok(…)).unwrap()` [INFO] [stdout] --> src/component/game_component.rs:43:22 [INFO] [stdout] | [INFO] [stdout] 43 | .or::(Ok(Duration::from_secs(0))) [INFO] [stdout] | ______________________^ [INFO] [stdout] 44 | | .unwrap() [INFO] [stdout] | |_____________________________^ help: try: `unwrap_or(Duration::from_secs(0))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] = note: `#[warn(clippy::or_then_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `f32` is unnecessary [INFO] [stdout] --> src/component/statistic_component.rs:70:15 [INFO] [stdout] | [INFO] [stdout] 70 | / 60 as f32; [INFO] [stdout] | ^^^^^^^^^ help: try: `60_f32` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/component/statistic_component.rs:131:41 [INFO] [stdout] | [INFO] [stdout] 131 | speed_stat_scaled = stats.speed_stat.iter().map(|x| -> i32 { *x }).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `stats.speed_stat.iter().copied()` [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: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/component/statistic_component.rs:146:22 [INFO] [stdout] | [INFO] [stdout] 146 | .or(Some(&1.0)) [INFO] [stdout] | ______________________^ [INFO] [stdout] 147 | | .unwrap(); [INFO] [stdout] | |_____________________________^ help: try: `unwrap_or(&1.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/component/statistic_component.rs:157:43 [INFO] [stdout] | [INFO] [stdout] 157 | height: (height / max_interval as f64) * interval as f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `max_interval` [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 to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/component/statistic_component.rs:157:66 [INFO] [stdout] | [INFO] [stdout] 157 | height: (height / max_interval as f64) * interval as f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `interval` [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 to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/component/game_conf_component.rs:133:42 [INFO] [stdout] | [INFO] [stdout] 133 | ... count += c.to_digit(10).unwrap() as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `c.to_digit(10).unwrap()` [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 `f32` is unnecessary [INFO] [stdout] --> src/component/game_conf_component.rs:213:61 [INFO] [stdout] | [INFO] [stdout] 213 | let box_top_padding = (rect.height as f32 / 2 as f32).round() as u16 - 1; [INFO] [stdout] | ^^^^^^^^ help: try: `2_f32` [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: length comparison to zero [INFO] [stdout] --> src/game.rs:48:29 [INFO] [stdout] | [INFO] [stdout] 48 | let mr = if text.len() > 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/game.rs:96:13 [INFO] [stdout] | [INFO] [stdout] 96 | return; //checking if it is the end of potential word [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] 95 - if c != ' ' { [INFO] [stdout] 96 - return; //checking if it is the end of potential word [INFO] [stdout] 95 + if c != ' ' {//checking if it is the end of potential word [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game.rs:140:16 [INFO] [stdout] | [INFO] [stdout] 140 | if !self.written_vec.last().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.written_vec.last().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: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/game.rs:154:20 [INFO] [stdout] | [INFO] [stdout] 154 | c: c.clone(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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 `u32` which implements the `Copy` trait [INFO] [stdout] --> src/game.rs:178:30 [INFO] [stdout] | [INFO] [stdout] 178 | correct_strokes: self.statistics.correct_strokes.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.statistics.correct_strokes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/game.rs:179:28 [INFO] [stdout] | [INFO] [stdout] 179 | wrong_strokes: self.statistics.wrong_strokes.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.statistics.wrong_strokes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SystemTime` which implements the `Copy` trait [INFO] [stdout] --> src/game.rs:188:27 [INFO] [stdout] | [INFO] [stdout] 188 | time_started: self.statistics.time_started.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.statistics.time_started` [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: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/config_manager.rs:10:24 [INFO] [stdout] | [INFO] [stdout] 10 | if let Err(_) = file.write(DEFAULT_TEXT.as_bytes()){ [INFO] [stdout] | -------^^^^^^-------------------------------------- help: try: `if file.write(DEFAULT_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] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/main.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / enum OutsideMessage { [INFO] [stdout] 22 | | Message(Message), [INFO] [stdout] | | ---------------- the largest variant contains at least 232 bytes [INFO] [stdout] 23 | | InputSignal(Option), [INFO] [stdout] | | -------------------------------- the second-largest variant contains at least 12 bytes [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ the entire enum is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 22 - Message(Message), [INFO] [stdout] 22 + Message(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `wrong_letters` is never read [INFO] [stdout] --> src/game.rs:227:9 [INFO] [stdout] | [INFO] [stdout] 224 | pub struct GameStat { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 227 | pub wrong_letters: u32, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GameStat` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found `.or(Ok(…)).unwrap()` [INFO] [stdout] --> src/component/game_component.rs:43:22 [INFO] [stdout] | [INFO] [stdout] 43 | .or::(Ok(Duration::from_secs(0))) [INFO] [stdout] | ______________________^ [INFO] [stdout] 44 | | .unwrap() [INFO] [stdout] | |_____________________________^ help: try: `unwrap_or(Duration::from_secs(0))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] = note: `#[warn(clippy::or_then_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `f32` is unnecessary [INFO] [stdout] --> src/component/statistic_component.rs:70:15 [INFO] [stdout] | [INFO] [stdout] 70 | / 60 as f32; [INFO] [stdout] | ^^^^^^^^^ help: try: `60_f32` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/component/statistic_component.rs:131:41 [INFO] [stdout] | [INFO] [stdout] 131 | speed_stat_scaled = stats.speed_stat.iter().map(|x| -> i32 { *x }).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `stats.speed_stat.iter().copied()` [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: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/component/statistic_component.rs:146:22 [INFO] [stdout] | [INFO] [stdout] 146 | .or(Some(&1.0)) [INFO] [stdout] | ______________________^ [INFO] [stdout] 147 | | .unwrap(); [INFO] [stdout] | |_____________________________^ help: try: `unwrap_or(&1.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/component/statistic_component.rs:157:43 [INFO] [stdout] | [INFO] [stdout] 157 | height: (height / max_interval as f64) * interval as f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `max_interval` [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 to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/component/statistic_component.rs:157:66 [INFO] [stdout] | [INFO] [stdout] 157 | height: (height / max_interval as f64) * interval as f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `interval` [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 to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/component/game_conf_component.rs:133:42 [INFO] [stdout] | [INFO] [stdout] 133 | ... count += c.to_digit(10).unwrap() as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `c.to_digit(10).unwrap()` [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 `f32` is unnecessary [INFO] [stdout] --> src/component/game_conf_component.rs:213:61 [INFO] [stdout] | [INFO] [stdout] 213 | let box_top_padding = (rect.height as f32 / 2 as f32).round() as u16 - 1; [INFO] [stdout] | ^^^^^^^^ help: try: `2_f32` [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: length comparison to zero [INFO] [stdout] --> src/game.rs:48:29 [INFO] [stdout] | [INFO] [stdout] 48 | let mr = if text.len() > 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!text.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/game.rs:96:13 [INFO] [stdout] | [INFO] [stdout] 96 | return; //checking if it is the end of potential word [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] 95 - if c != ' ' { [INFO] [stdout] 96 - return; //checking if it is the end of potential word [INFO] [stdout] 95 + if c != ' ' {//checking if it is the end of potential word [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/game.rs:140:16 [INFO] [stdout] | [INFO] [stdout] 140 | if !self.written_vec.last().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.written_vec.last().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: using `clone` on type `char` which implements the `Copy` trait [INFO] [stdout] --> src/game.rs:154:20 [INFO] [stdout] | [INFO] [stdout] 154 | c: c.clone(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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 `u32` which implements the `Copy` trait [INFO] [stdout] --> src/game.rs:178:30 [INFO] [stdout] | [INFO] [stdout] 178 | correct_strokes: self.statistics.correct_strokes.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.statistics.correct_strokes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/game.rs:179:28 [INFO] [stdout] | [INFO] [stdout] 179 | wrong_strokes: self.statistics.wrong_strokes.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.statistics.wrong_strokes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SystemTime` which implements the `Copy` trait [INFO] [stdout] --> src/game.rs:188:27 [INFO] [stdout] | [INFO] [stdout] 188 | time_started: self.statistics.time_started.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.statistics.time_started` [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: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/config_manager.rs:10:24 [INFO] [stdout] | [INFO] [stdout] 10 | if let Err(_) = file.write(DEFAULT_TEXT.as_bytes()){ [INFO] [stdout] | -------^^^^^^-------------------------------------- help: try: `if file.write(DEFAULT_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] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/main.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / enum OutsideMessage { [INFO] [stdout] 22 | | Message(Message), [INFO] [stdout] | | ---------------- the largest variant contains at least 232 bytes [INFO] [stdout] 23 | | InputSignal(Option), [INFO] [stdout] | | -------------------------------- the second-largest variant contains at least 12 bytes [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ the entire enum is at least 232 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 22 - Message(Message), [INFO] [stdout] 22 + Message(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.28s [INFO] running `Command { std: "docker" "inspect" "e27326223b3fbce5c221c6f82ac02e78568246c7d6a90d48a359a7c4b102afea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e27326223b3fbce5c221c6f82ac02e78568246c7d6a90d48a359a7c4b102afea", kill_on_drop: false }` [INFO] [stdout] e27326223b3fbce5c221c6f82ac02e78568246c7d6a90d48a359a7c4b102afea