[INFO] fetching crate typelerate 0.1.0-alpha.1... [INFO] linting typelerate-0.1.0-alpha.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate typelerate 0.1.0-alpha.1 into /workspace/builds/worker-4-tc1/source [INFO] started tweaking crates.io crate typelerate 0.1.0-alpha.1 [INFO] finished tweaking crates.io crate typelerate 0.1.0-alpha.1 [INFO] tweaked toml for crates.io crate typelerate 0.1.0-alpha.1 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate typelerate 0.1.0-alpha.1 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 crates.io crate typelerate 0.1.0-alpha.1 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] Downloading crates ... [INFO] [stderr] Downloaded errno v0.3.2 [INFO] [stderr] Downloaded serde v1.0.183 [INFO] [stderr] Downloaded winnow v0.5.3 [INFO] [stderr] Downloaded serde_spanned v0.6.3 [INFO] [stderr] Downloaded toml_edit v0.19.14 [INFO] [stderr] Downloaded rustix v0.38.6 [INFO] [stderr] Downloaded csv v1.2.2 [INFO] [stderr] Downloaded indoc v2.0.3 [INFO] [stderr] Downloaded cc v1.0.81 [INFO] [stderr] Downloaded ratatui v0.22.0 [INFO] [stderr] Downloaded clap_builder v4.3.19 [INFO] [stderr] Downloaded anstyle v1.0.1 [INFO] [stderr] Downloaded clap_derive v4.3.12 [INFO] [stderr] Downloaded serde_derive v1.0.183 [INFO] [stderr] Downloaded clap v4.3.19 [INFO] [stderr] Downloaded toml v0.7.6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e5e24123ac5098abdbde983bce4ab9820984d1cefe81c063303c74638ba6b4d6 [INFO] running `Command { std: "docker" "start" "-a" "e5e24123ac5098abdbde983bce4ab9820984d1cefe81c063303c74638ba6b4d6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e5e24123ac5098abdbde983bce4ab9820984d1cefe81c063303c74638ba6b4d6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e5e24123ac5098abdbde983bce4ab9820984d1cefe81c063303c74638ba6b4d6", kill_on_drop: false }` [INFO] [stdout] e5e24123ac5098abdbde983bce4ab9820984d1cefe81c063303c74638ba6b4d6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ca934d8181fc79dca1fd1ae21a79dddfc5387680ac3901a89629a51aa82c05d1 [INFO] running `Command { std: "docker" "start" "-a" "ca934d8181fc79dca1fd1ae21a79dddfc5387680ac3901a89629a51aa82c05d1", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.147 [INFO] [stderr] Compiling serde v1.0.183 [INFO] [stderr] Checking bitflags v2.3.3 [INFO] [stderr] Compiling serde_derive v1.0.183 [INFO] [stderr] Compiling signal-hook v0.3.17 [INFO] [stderr] Compiling proc-macro2 v1.0.66 [INFO] [stderr] Compiling rustix v0.38.6 [INFO] [stderr] Checking log v0.4.19 [INFO] [stderr] Checking smallvec v1.11.0 [INFO] [stderr] Checking linux-raw-sys v0.4.5 [INFO] [stderr] Compiling memchr v2.5.0 [INFO] [stderr] Checking anstyle-parse v0.2.1 [INFO] [stderr] Checking hashbrown v0.14.0 [INFO] [stderr] Checking anstyle-query v1.0.0 [INFO] [stderr] Checking anstyle v1.0.1 [INFO] [stderr] Checking clap_lex v0.5.0 [INFO] [stderr] Checking winnow v0.5.3 [INFO] [stderr] Checking ryu v1.0.15 [INFO] [stderr] Checking indexmap v2.0.0 [INFO] [stderr] Checking once_cell v1.18.0 [INFO] [stderr] Compiling quote v1.0.32 [INFO] [stderr] Checking signal-hook-registry v1.4.1 [INFO] [stderr] Checking parking_lot_core v0.9.8 [INFO] [stderr] Checking mio v0.8.8 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking getrandom v0.2.10 [INFO] [stderr] Compiling syn v2.0.28 [INFO] [stderr] Checking is-terminal v0.4.9 [INFO] [stderr] Checking anstream v0.3.2 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking csv-core v0.1.10 [INFO] [stderr] Compiling indoc v2.0.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking signal-hook-mio v0.2.3 [INFO] [stderr] Checking clap_builder v4.3.19 [INFO] [stderr] Checking crossterm v0.26.1 [INFO] [stderr] Checking unicode-segmentation v1.10.1 [INFO] [stderr] Checking unicode-width v0.1.10 [INFO] [stderr] Checking crossterm v0.27.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking xdg v2.5.2 [INFO] [stderr] Checking ratatui v0.22.0 [INFO] [stderr] Checking serde_spanned v0.6.3 [INFO] [stderr] Checking toml_datetime v0.6.3 [INFO] [stderr] Checking csv v1.2.2 [INFO] [stderr] Checking toml_edit v0.19.14 [INFO] [stderr] Compiling clap_derive v4.3.12 [INFO] [stderr] Checking toml v0.7.6 [INFO] [stderr] Checking clap v4.3.19 [INFO] [stderr] Checking typelerate v0.1.0-alpha.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/config.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/context.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | config: config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/context.rs:110:28 [INFO] [stdout] | [INFO] [stdout] 110 | .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 110 - .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] 110 + .retain(|word| ((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/scores.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tui/components.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | items: items, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `items` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tui/components.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | state: state, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `centered_rect` [INFO] [stdout] --> src/tui/mod.rs:15:22 [INFO] [stdout] | [INFO] [stdout] 15 | pub use components::{centered_rect, popup, FileChooser}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/config.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/context.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | config: config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/context.rs:110:28 [INFO] [stdout] | [INFO] [stdout] 110 | .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 110 - .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] 110 + .retain(|word| ((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/scores.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tui/components.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | items: items, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `items` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tui/components.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | state: state, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `centered_rect` [INFO] [stdout] --> src/tui/mod.rs:15:22 [INFO] [stdout] | [INFO] [stdout] 15 | pub use components::{centered_rect, popup, FileChooser}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/cli.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / impl Default for Cli { [INFO] [stdout] 18 | | fn default() -> Self { [INFO] [stdout] 19 | | Cli { [INFO] [stdout] 20 | | wordfile: None, [INFO] [stdout] ... | [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 10 + #[derive(Default)] [INFO] [stdout] 11 | pub struct Cli { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/common/fileextensions.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | Err(Error::new( [INFO] [stdout] | _____________^ [INFO] [stdout] 42 | | ErrorKind::Other, [INFO] [stdout] 43 | | "Error getting first line of file.", [INFO] [stdout] 44 | | )) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 41 ~ Err(Error::other( [INFO] [stdout] 42 ~ "Error getting first line of file.", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/common/fileextensions.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | Err(Error::new( [INFO] [stdout] | _____________^ [INFO] [stdout] 56 | | ErrorKind::Other, [INFO] [stdout] 57 | | "Error getting random line of file.", [INFO] [stdout] 58 | | )) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 55 ~ Err(Error::other( [INFO] [stdout] 56 ~ "Error getting random line of file.", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/context.rs:110:28 [INFO] [stdout] | [INFO] [stdout] 110 | .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 110 - .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] 110 + .retain(|word| !((word.x > 0) && (word.x as u16) >= width)); [INFO] [stdout] | [INFO] [stdout] 110 - .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] 110 + .retain(|word| word.x <= 0 || ((word.x as u16) < width)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/scores.rs:85:1 [INFO] [stdout] | [INFO] [stdout] 85 | / impl Default for Scores { [INFO] [stdout] 86 | | fn default() -> Self { [INFO] [stdout] 87 | | Scores { scores: vec![] } [INFO] [stdout] 88 | | } [INFO] [stdout] 89 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 81 + #[derive(Default)] [INFO] [stdout] 82 | pub struct Scores { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/cli.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / impl Default for Cli { [INFO] [stdout] 18 | | fn default() -> Self { [INFO] [stdout] 19 | | Cli { [INFO] [stdout] 20 | | wordfile: None, [INFO] [stdout] ... | [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 10 + #[derive(Default)] [INFO] [stdout] 11 | pub struct Cli { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `flat_map` with an identity function [INFO] [stdout] --> src/tui/components.rs:106:22 [INFO] [stdout] | [INFO] [stdout] 106 | .flat_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#flat_map_identity [INFO] [stdout] = note: `#[warn(clippy::flat_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tui/components.rs:124:21 [INFO] [stdout] | [INFO] [stdout] 124 | if (self.items.len() == 0) || (i >= self.items.len() - 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.items.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tui/components.rs:138:20 [INFO] [stdout] | [INFO] [stdout] 138 | if self.items.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.items.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/common/fileextensions.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | Err(Error::new( [INFO] [stdout] | _____________^ [INFO] [stdout] 42 | | ErrorKind::Other, [INFO] [stdout] 43 | | "Error getting first line of file.", [INFO] [stdout] 44 | | )) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 41 ~ Err(Error::other( [INFO] [stdout] 42 ~ "Error getting first line of file.", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/common/fileextensions.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | Err(Error::new( [INFO] [stdout] | _____________^ [INFO] [stdout] 56 | | ErrorKind::Other, [INFO] [stdout] 57 | | "Error getting random line of file.", [INFO] [stdout] 58 | | )) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 55 ~ Err(Error::other( [INFO] [stdout] 56 ~ "Error getting random line of file.", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/tui/components.rs:152:9 [INFO] [stdout] | [INFO] [stdout] 152 | / match self.state.selected() { [INFO] [stdout] 153 | | Some(i) => i, [INFO] [stdout] 154 | | None => 0, [INFO] [stdout] 155 | | } [INFO] [stdout] | |_________^ help: replace it with: `self.state.selected().unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tui/events.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | / if ctx.wordfile.is_none() { [INFO] [stdout] 53 | | if !&files.items.is_empty() { [INFO] [stdout] 54 | | let pos = &files.selected(); [INFO] [stdout] 55 | | let filename = &files.items[*pos]; [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 52 ~ if ctx.wordfile.is_none() [INFO] [stdout] 53 ~ && !&files.items.is_empty() { [INFO] [stdout] 54 | let pos = &files.selected(); [INFO] [stdout] 55 | let filename = &files.items[*pos]; [INFO] [stdout] 56 | ctx.wordfile = Some(filename.into()); [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i16::abs()` to u16 [INFO] [stdout] --> src/tui/game.rs:61:63 [INFO] [stdout] | [INFO] [stdout] 61 | Paragraph::new(string.white()).scroll((0, word.x.abs() as u16)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `word.x.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i16::abs()` to u16 [INFO] [stdout] --> src/tui/game.rs:68:25 [INFO] [stdout] | [INFO] [stdout] 68 | let x = word.x.abs() as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `word.x.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tui/gamewrapper.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | return; [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] 26 - super::wordfilechooser(f, files); [INFO] [stdout] 27 - return; [INFO] [stdout] 26 + super::wordfilechooser(f, files); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/tui/wordfilechooser.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | inner_area.height = inner_area.height - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `inner_area.height -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tui/wordfilechooser.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | .map(|i| ListItem::new(i)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ListItem::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/context.rs:110:28 [INFO] [stdout] | [INFO] [stdout] 110 | .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 110 - .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] 110 + .retain(|word| !((word.x > 0) && (word.x as u16) >= width)); [INFO] [stdout] | [INFO] [stdout] 110 - .retain(|word| (((word.x > 0) && ((word.x as u16) < width)) || word.x <= 0)); [INFO] [stdout] 110 + .retain(|word| word.x <= 0 || ((word.x as u16) < width)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | terminal.draw(|f| tui(f, &mut ctx, &mut files))?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:33:27 [INFO] [stdout] | [INFO] [stdout] 33 | tui::handle_input(&mut ctx, &mut files)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `ctx` [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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:48:33 [INFO] [stdout] | [INFO] [stdout] 48 | context::State::Quit => return, [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: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 48 - context::State::Quit => return, [INFO] [stdout] 48 + context::State::Quit => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/scores.rs:85:1 [INFO] [stdout] | [INFO] [stdout] 85 | / impl Default for Scores { [INFO] [stdout] 86 | | fn default() -> Self { [INFO] [stdout] 87 | | Scores { scores: vec![] } [INFO] [stdout] 88 | | } [INFO] [stdout] 89 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 81 + #[derive(Default)] [INFO] [stdout] 82 | pub struct Scores { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `flat_map` with an identity function [INFO] [stdout] --> src/tui/components.rs:106:22 [INFO] [stdout] | [INFO] [stdout] 106 | .flat_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#flat_map_identity [INFO] [stdout] = note: `#[warn(clippy::flat_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tui/components.rs:124:21 [INFO] [stdout] | [INFO] [stdout] 124 | if (self.items.len() == 0) || (i >= self.items.len() - 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.items.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tui/components.rs:138:20 [INFO] [stdout] | [INFO] [stdout] 138 | if self.items.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.items.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/tui/components.rs:152:9 [INFO] [stdout] | [INFO] [stdout] 152 | / match self.state.selected() { [INFO] [stdout] 153 | | Some(i) => i, [INFO] [stdout] 154 | | None => 0, [INFO] [stdout] 155 | | } [INFO] [stdout] | |_________^ help: replace it with: `self.state.selected().unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tui/events.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | / if ctx.wordfile.is_none() { [INFO] [stdout] 53 | | if !&files.items.is_empty() { [INFO] [stdout] 54 | | let pos = &files.selected(); [INFO] [stdout] 55 | | let filename = &files.items[*pos]; [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 52 ~ if ctx.wordfile.is_none() [INFO] [stdout] 53 ~ && !&files.items.is_empty() { [INFO] [stdout] 54 | let pos = &files.selected(); [INFO] [stdout] 55 | let filename = &files.items[*pos]; [INFO] [stdout] 56 | ctx.wordfile = Some(filename.into()); [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i16::abs()` to u16 [INFO] [stdout] --> src/tui/game.rs:61:63 [INFO] [stdout] | [INFO] [stdout] 61 | Paragraph::new(string.white()).scroll((0, word.x.abs() as u16)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `word.x.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i16::abs()` to u16 [INFO] [stdout] --> src/tui/game.rs:68:25 [INFO] [stdout] | [INFO] [stdout] 68 | let x = word.x.abs() as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `word.x.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tui/gamewrapper.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | return; [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] 26 - super::wordfilechooser(f, files); [INFO] [stdout] 27 - return; [INFO] [stdout] 26 + super::wordfilechooser(f, files); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 24.24s [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/tui/wordfilechooser.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | inner_area.height = inner_area.height - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `inner_area.height -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tui/wordfilechooser.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | .map(|i| ListItem::new(i)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ListItem::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` 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/main.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | terminal.draw(|f| tui(f, &mut ctx, &mut files))?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `ctx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:33:27 [INFO] [stdout] | [INFO] [stdout] 33 | tui::handle_input(&mut ctx, &mut files)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `ctx` [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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:48:33 [INFO] [stdout] | [INFO] [stdout] 48 | context::State::Quit => return, [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: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 48 - context::State::Quit => return, [INFO] [stdout] 48 + context::State::Quit => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "ca934d8181fc79dca1fd1ae21a79dddfc5387680ac3901a89629a51aa82c05d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ca934d8181fc79dca1fd1ae21a79dddfc5387680ac3901a89629a51aa82c05d1", kill_on_drop: false }` [INFO] [stdout] ca934d8181fc79dca1fd1ae21a79dddfc5387680ac3901a89629a51aa82c05d1