[INFO] cloning repository https://github.com/elBranchi/rust-toys [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/elBranchi/rust-toys" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FelBranchi%2Frust-toys", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FelBranchi%2Frust-toys'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ece978b6cf40139faf863f4b70a9c609c2463aa8 [INFO] linting elBranchi/rust-toys against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FelBranchi%2Frust-toys" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/elBranchi/rust-toys [INFO] finished tweaking git repo https://github.com/elBranchi/rust-toys [INFO] tweaked toml for git repo https://github.com/elBranchi/rust-toys written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/elBranchi/rust-toys 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/elBranchi/rust-toys 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 finl_unicode v1.3.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] f02639fd7f73d76997981dff8ffc9beb034017b944185c87b3483fa31d92e278 [INFO] running `Command { std: "docker" "start" "-a" "f02639fd7f73d76997981dff8ffc9beb034017b944185c87b3483fa31d92e278", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f02639fd7f73d76997981dff8ffc9beb034017b944185c87b3483fa31d92e278", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f02639fd7f73d76997981dff8ffc9beb034017b944185c87b3483fa31d92e278", kill_on_drop: false }` [INFO] [stdout] f02639fd7f73d76997981dff8ffc9beb034017b944185c87b3483fa31d92e278 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] fa40b2be2ab68784a7924cc55275d6810465d43b505ae1f7161662b2d22dfeba [INFO] running `Command { std: "docker" "start" "-a" "fa40b2be2ab68784a7924cc55275d6810465d43b505ae1f7161662b2d22dfeba", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.94 [INFO] [stderr] Checking log v0.4.26 [INFO] [stderr] Checking bitflags v2.9.0 [INFO] [stderr] Checking ordered-float v4.6.0 [INFO] [stderr] Checking phf_shared v0.11.3 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Compiling getrandom v0.3.2 [INFO] [stderr] Compiling ucd-trie v0.1.7 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Checking bytemuck v1.22.0 [INFO] [stderr] Compiling once_cell v1.21.1 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling terminfo v0.9.0 [INFO] [stderr] Checking signal-hook v0.3.17 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking atomic v0.6.0 [INFO] [stderr] Checking smallvec v1.14.0 [INFO] [stderr] Checking lab v0.11.0 [INFO] [stderr] Compiling anyhow v1.0.97 [INFO] [stderr] Checking bit-set v0.5.3 [INFO] [stderr] Checking sha2 v0.10.8 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking uuid v1.16.0 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking euclid v0.22.11 [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking deltae v0.3.2 [INFO] [stderr] Checking vtparse v0.6.2 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Checking rustix v0.38.44 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking termios v0.3.3 [INFO] [stderr] Checking finl_unicode v1.3.0 [INFO] [stderr] Checking zune-core v0.4.12 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking memmem v0.1.1 [INFO] [stderr] Checking fixedbitset v0.4.2 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking zune-jpeg v0.4.14 [INFO] [stderr] Checking mac_address v1.1.8 [INFO] [stderr] Compiling wezterm-dynamic-derive v0.1.1 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking fancy-regex v0.11.0 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling phf_macros v0.11.3 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Checking csscolorparser v0.6.2 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking wezterm-dynamic v0.2.1 [INFO] [stderr] Checking filedescriptor v0.8.3 [INFO] [stderr] Checking wezterm-blob-leases v0.1.1 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Checking pest v2.7.15 [INFO] [stderr] Checking wezterm-color-types v0.3.0 [INFO] [stderr] Checking wezterm-bidi v0.2.3 [INFO] [stderr] Compiling pest_meta v2.7.15 [INFO] [stderr] Compiling pest_generator v2.7.15 [INFO] [stderr] Compiling pest_derive v2.7.15 [INFO] [stderr] Checking wezterm-input-types v0.1.0 [INFO] [stderr] Checking termwiz v0.23.3 [INFO] [stderr] Checking rust-toys v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bitmap/mod.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / match self { [INFO] [stdout] 34 | | Pixel1Bit::On => true, [INFO] [stdout] 35 | | _ => false, [INFO] [stdout] 36 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 33 - match self { [INFO] [stdout] 34 - Pixel1Bit::On => true, [INFO] [stdout] 35 - _ => false, [INFO] [stdout] 36 - } [INFO] [stdout] 33 + matches!(self, Pixel1Bit::On) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bitmap/mod.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / match self { [INFO] [stdout] 34 | | Pixel1Bit::On => true, [INFO] [stdout] 35 | | _ => false, [INFO] [stdout] 36 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 33 - match self { [INFO] [stdout] 34 - Pixel1Bit::On => true, [INFO] [stdout] 35 - _ => false, [INFO] [stdout] 36 - } [INFO] [stdout] 33 + matches!(self, Pixel1Bit::On) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SimpleConsole` [INFO] [stdout] --> src/console/mod.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | / pub fn new() -> Self { [INFO] [stdout] 65 | | SimpleConsole { capabilities: None } [INFO] [stdout] 66 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 63 + impl Default for SimpleConsole { [INFO] [stdout] 64 + fn default() -> Self { [INFO] [stdout] 65 + Self::new() [INFO] [stdout] 66 + } [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SimpleConsole` [INFO] [stdout] --> src/console/mod.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | / pub fn new() -> Self { [INFO] [stdout] 65 | | SimpleConsole { capabilities: None } [INFO] [stdout] 66 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 63 + impl Default for SimpleConsole { [INFO] [stdout] 64 + fn default() -> Self { [INFO] [stdout] 65 + Self::new() [INFO] [stdout] 66 + } [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/console/mod.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | if !self.capabilities.is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.capabilities.is_some()` [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/console/mod.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | if !self.capabilities.is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.capabilities.is_some()` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/console/mod.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | / match result { [INFO] [stdout] 75 | | Ok(capabilities) => { [INFO] [stdout] 76 | | self.capabilities = Some(capabilities); [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 74 ~ if let Ok(capabilities) = result { [INFO] [stdout] 75 + self.capabilities = Some(capabilities); [INFO] [stdout] 76 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/console/mod.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | / match result { [INFO] [stdout] 75 | | Ok(capabilities) => { [INFO] [stdout] 76 | | self.capabilities = Some(capabilities); [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 74 ~ if let Ok(capabilities) = result { [INFO] [stdout] 75 + self.capabilities = Some(capabilities); [INFO] [stdout] 76 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/console/mod.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | / match read()? { [INFO] [stdout] 135 | | Event::Key(KeyEvent { [INFO] [stdout] 136 | | code, [INFO] [stdout] 137 | | modifiers: _, [INFO] [stdout] ... | [INFO] [stdout] 145 | | _ => {} [INFO] [stdout] 146 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 134 ~ if let Event::Key(KeyEvent { [INFO] [stdout] 135 + code, [INFO] [stdout] 136 + modifiers: _, [INFO] [stdout] 137 + kind: KeyEventKind::Press, [INFO] [stdout] 138 + state: _, [INFO] [stdout] 139 + }) = read()? { [INFO] [stdout] 140 + println!("key {code:?}"); [INFO] [stdout] 141 + break; [INFO] [stdout] 142 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/console/mod.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | / match read()? { [INFO] [stdout] 135 | | Event::Key(KeyEvent { [INFO] [stdout] 136 | | code, [INFO] [stdout] 137 | | modifiers: _, [INFO] [stdout] ... | [INFO] [stdout] 145 | | _ => {} [INFO] [stdout] 146 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 134 ~ if let Event::Key(KeyEvent { [INFO] [stdout] 135 + code, [INFO] [stdout] 136 + modifiers: _, [INFO] [stdout] 137 + kind: KeyEventKind::Press, [INFO] [stdout] 138 + state: _, [INFO] [stdout] 139 + }) = read()? { [INFO] [stdout] 140 + println!("key {code:?}"); [INFO] [stdout] 141 + break; [INFO] [stdout] 142 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/bin/jpeg_info.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | fn show_info<'a, I>(files: I) [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/bin/jpeg_info.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | fn show_info<'a, I>(files: I) [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/bin/show_image.rs:23:25 [INFO] [stdout] | [INFO] [stdout] 23 | let file_name = args.skip(1).nth(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `args.skip(1).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/show_image.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | / match file_name { [INFO] [stdout] 25 | | Some(str) => { [INFO] [stdout] 26 | | let _ = show_image(str); [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 24 ~ if let Some(str) = file_name { [INFO] [stdout] 25 + let _ = show_image(str); [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/show_image.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 55 | let image = Bitmap::new_from_rgb_bytes(width, height, &rgb_content); [INFO] [stdout] | -------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 56 | [INFO] [stdout] 57 | image [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 55 ~ [INFO] [stdout] 56 | [INFO] [stdout] 57 ~ Bitmap::new_from_rgb_bytes(width, height, &rgb_content) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `bits` [INFO] [stdout] --> src/main.rs:75:16 [INFO] [stdout] | [INFO] [stdout] 75 | for row in 0..h { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 75 - for row in 0..h { [INFO] [stdout] 75 + for (row, ) in bits.iter().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `bits` [INFO] [stdout] --> src/bin/simple_image.rs:25:16 [INFO] [stdout] | [INFO] [stdout] 25 | for row in 0..h { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 25 - for row in 0..h { [INFO] [stdout] 25 + for (row, ) in bits.iter().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/bin/show_image.rs:23:25 [INFO] [stdout] | [INFO] [stdout] 23 | let file_name = args.skip(1).nth(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `args.skip(1).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/show_image.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | / match file_name { [INFO] [stdout] 25 | | Some(str) => { [INFO] [stdout] 26 | | let _ = show_image(str); [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 24 ~ if let Some(str) = file_name { [INFO] [stdout] 25 + let _ = show_image(str); [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/simple_image.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 59 - print!("\n"); [INFO] [stdout] 59 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/show_image.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 55 | let image = Bitmap::new_from_rgb_bytes(width, height, &rgb_content); [INFO] [stdout] | -------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 56 | [INFO] [stdout] 57 | image [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 55 ~ [INFO] [stdout] 56 | [INFO] [stdout] 57 ~ Bitmap::new_from_rgb_bytes(width, height, &rgb_content) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `bits` [INFO] [stdout] --> src/bin/simple_image.rs:25:16 [INFO] [stdout] | [INFO] [stdout] 25 | for row in 0..h { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 25 - for row in 0..h { [INFO] [stdout] 25 + for (row, ) in bits.iter().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/simple_image.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 59 - print!("\n"); [INFO] [stdout] 59 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `bits` [INFO] [stdout] --> src/main.rs:75:16 [INFO] [stdout] | [INFO] [stdout] 75 | for row in 0..h { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 75 - for row in 0..h { [INFO] [stdout] 75 + for (row, ) in bits.iter().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 53.72s [INFO] running `Command { std: "docker" "inspect" "fa40b2be2ab68784a7924cc55275d6810465d43b505ae1f7161662b2d22dfeba", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fa40b2be2ab68784a7924cc55275d6810465d43b505ae1f7161662b2d22dfeba", kill_on_drop: false }` [INFO] [stdout] fa40b2be2ab68784a7924cc55275d6810465d43b505ae1f7161662b2d22dfeba