[INFO] fetching crate png_color_converter 0.1.0... [INFO] linting png_color_converter-0.1.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate png_color_converter 0.1.0 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate png_color_converter 0.1.0 [INFO] finished tweaking crates.io crate png_color_converter 0.1.0 [INFO] tweaked toml for crates.io crate png_color_converter 0.1.0 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate png_color_converter 0.1.0 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 png_color_converter 0.1.0 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 clap v4.5.0 [INFO] [stderr] Downloaded clap_derive v4.5.0 [INFO] [stderr] Downloaded clap_builder v4.5.0 [INFO] [stderr] Downloaded png v0.17.11 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 598deb107d09f2ad235e984da96954c2010f6cee3009dfd51663efbc72a6f17e [INFO] running `Command { std: "docker" "start" "-a" "598deb107d09f2ad235e984da96954c2010f6cee3009dfd51663efbc72a6f17e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "598deb107d09f2ad235e984da96954c2010f6cee3009dfd51663efbc72a6f17e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "598deb107d09f2ad235e984da96954c2010f6cee3009dfd51663efbc72a6f17e", kill_on_drop: false }` [INFO] [stdout] 598deb107d09f2ad235e984da96954c2010f6cee3009dfd51663efbc72a6f17e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a4404dfc9560bf59889bbe4ca8ebed816dc47756315e603f8dd06d539e68bac6 [INFO] running `Command { std: "docker" "start" "-a" "a4404dfc9560bf59889bbe4ca8ebed816dc47756315e603f8dd06d539e68bac6", kill_on_drop: false }` [INFO] [stderr] Checking anstyle v1.0.6 [INFO] [stderr] Checking miniz_oxide v0.7.2 [INFO] [stderr] Checking strsim v0.11.0 [INFO] [stderr] Checking clap_lex v0.7.0 [INFO] [stderr] Checking fdeflate v0.3.4 [INFO] [stderr] Compiling clap_derive v4.5.0 [INFO] [stderr] Checking anstream v0.6.11 [INFO] [stderr] Checking clap_builder v4.5.0 [INFO] [stderr] Checking flate2 v1.0.28 [INFO] [stderr] Checking png v0.17.11 [INFO] [stderr] Checking clap v4.5.0 [INFO] [stderr] Checking png_color_converter v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/color_processing.rs:54:39 [INFO] [stdout] | [INFO] [stdout] 54 | let mut saturation = difference / ((1.0 - (2.0 * lightness - 1.0).abs())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove them: `(1.0 - (2.0 * lightness - 1.0).abs())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/color_processing.rs:54:39 [INFO] [stdout] | [INFO] [stdout] 54 | let mut saturation = difference / ((1.0 - (2.0 * lightness - 1.0).abs())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove them: `(1.0 - (2.0 * lightness - 1.0).abs())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | if 0.0 <= converted_h && converted_h <= 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:83:15 [INFO] [stdout] | [INFO] [stdout] 83 | } else if 1.0 <= converted_h && converted_h <= 2.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1.0..=2.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:85:15 [INFO] [stdout] | [INFO] [stdout] 85 | } else if 2.0 <= converted_h && converted_h <= 3.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2.0..=3.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:87:15 [INFO] [stdout] | [INFO] [stdout] 87 | } else if 3.0 <= converted_h && converted_h <= 4.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(3.0..=4.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:89:15 [INFO] [stdout] | [INFO] [stdout] 89 | } else if 4.0 <= converted_h && converted_h <= 5.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(4.0..=5.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | } else if 5.0 <= converted_h && converted_h <= 6.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(5.0..=6.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/color_processing.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | let final_a: u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `final_a` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 98 ~ [INFO] [stdout] 99 | [INFO] [stdout] 100 ~ let final_a: u8 = if final_r == 0 && final_g == 0 && final_b == 0 { [INFO] [stdout] 101 ~ 0 [INFO] [stdout] 102 | } else { [INFO] [stdout] 103 ~ 255 [INFO] [stdout] 104 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/file_processing.rs:14:80 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn process_image(input_filepath: &String, output_filepath: &String, color: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - pub fn process_image(input_filepath: &String, output_filepath: &String, color: &String) { [INFO] [stdout] 14 + pub fn process_image(input_filepath: &String, output_filepath: &String, color: &str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/file_processing.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let ref mut w = BufWriter::new(file); [INFO] [stdout] | ----^^^^^^^^^------------------------ help: try: `let w = &mut BufWriter::new(file);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] = note: `#[warn(clippy::toplevel_ref_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_processing.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 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] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !(pixel.r == 0 && pixel.g == 0) { [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if pixel.r != 0 || pixel.g != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_processing.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 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] help: try [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !!(pixel.r != 0 || pixel.g != 0) { [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !pixel.r == 0 && pixel.g == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | if 0.0 <= converted_h && converted_h <= 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:83:15 [INFO] [stdout] | [INFO] [stdout] 83 | } else if 1.0 <= converted_h && converted_h <= 2.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1.0..=2.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:85:15 [INFO] [stdout] | [INFO] [stdout] 85 | } else if 2.0 <= converted_h && converted_h <= 3.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2.0..=3.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:87:15 [INFO] [stdout] | [INFO] [stdout] 87 | } else if 3.0 <= converted_h && converted_h <= 4.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(3.0..=4.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:89:15 [INFO] [stdout] | [INFO] [stdout] 89 | } else if 4.0 <= converted_h && converted_h <= 5.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(4.0..=5.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | } else if 5.0 <= converted_h && converted_h <= 6.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(5.0..=6.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/color_processing.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | let final_a: u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `final_a` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 98 ~ [INFO] [stdout] 99 | [INFO] [stdout] 100 ~ let final_a: u8 = if final_r == 0 && final_g == 0 && final_b == 0 { [INFO] [stdout] 101 ~ 0 [INFO] [stdout] 102 | } else { [INFO] [stdout] 103 ~ 255 [INFO] [stdout] 104 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/file_processing.rs:14:80 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn process_image(input_filepath: &String, output_filepath: &String, color: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - pub fn process_image(input_filepath: &String, output_filepath: &String, color: &String) { [INFO] [stdout] 14 + pub fn process_image(input_filepath: &String, output_filepath: &String, color: &str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/file_processing.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let ref mut w = BufWriter::new(file); [INFO] [stdout] | ----^^^^^^^^^------------------------ help: try: `let w = &mut BufWriter::new(file);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] = note: `#[warn(clippy::toplevel_ref_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_processing.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 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] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !(pixel.r == 0 && pixel.g == 0) { [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if pixel.r != 0 || pixel.g != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_processing.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 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] help: try [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !!(pixel.r != 0 || pixel.g != 0) { [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !pixel.r == 0 && pixel.g == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/color_processing.rs:54:39 [INFO] [stdout] | [INFO] [stdout] 54 | let mut saturation = difference / ((1.0 - (2.0 * lightness - 1.0).abs())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove them: `(1.0 - (2.0 * lightness - 1.0).abs())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/color_processing.rs:54:39 [INFO] [stdout] | [INFO] [stdout] 54 | let mut saturation = difference / ((1.0 - (2.0 * lightness - 1.0).abs())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove them: `(1.0 - (2.0 * lightness - 1.0).abs())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | if 0.0 <= converted_h && converted_h <= 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:83:15 [INFO] [stdout] | [INFO] [stdout] 83 | } else if 1.0 <= converted_h && converted_h <= 2.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1.0..=2.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:85:15 [INFO] [stdout] | [INFO] [stdout] 85 | } else if 2.0 <= converted_h && converted_h <= 3.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2.0..=3.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:87:15 [INFO] [stdout] | [INFO] [stdout] 87 | } else if 3.0 <= converted_h && converted_h <= 4.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(3.0..=4.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:89:15 [INFO] [stdout] | [INFO] [stdout] 89 | } else if 4.0 <= converted_h && converted_h <= 5.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(4.0..=5.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | } else if 5.0 <= converted_h && converted_h <= 6.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(5.0..=6.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/color_processing.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | let final_a: u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `final_a` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 98 ~ [INFO] [stdout] 99 | [INFO] [stdout] 100 ~ let final_a: u8 = if final_r == 0 && final_g == 0 && final_b == 0 { [INFO] [stdout] 101 ~ 0 [INFO] [stdout] 102 | } else { [INFO] [stdout] 103 ~ 255 [INFO] [stdout] 104 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/file_processing.rs:14:80 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn process_image(input_filepath: &String, output_filepath: &String, color: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - pub fn process_image(input_filepath: &String, output_filepath: &String, color: &String) { [INFO] [stdout] 14 + pub fn process_image(input_filepath: &String, output_filepath: &String, color: &str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/file_processing.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let ref mut w = BufWriter::new(file); [INFO] [stdout] | ----^^^^^^^^^------------------------ help: try: `let w = &mut BufWriter::new(file);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] = note: `#[warn(clippy::toplevel_ref_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_processing.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 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] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !(pixel.r == 0 && pixel.g == 0) { [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if pixel.r != 0 || pixel.g != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_processing.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 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] help: try [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !!(pixel.r != 0 || pixel.g != 0) { [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !pixel.r == 0 && pixel.g == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | if 0.0 <= converted_h && converted_h <= 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:83:15 [INFO] [stdout] | [INFO] [stdout] 83 | } else if 1.0 <= converted_h && converted_h <= 2.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1.0..=2.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:85:15 [INFO] [stdout] | [INFO] [stdout] 85 | } else if 2.0 <= converted_h && converted_h <= 3.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2.0..=3.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:87:15 [INFO] [stdout] | [INFO] [stdout] 87 | } else if 3.0 <= converted_h && converted_h <= 4.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(3.0..=4.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:89:15 [INFO] [stdout] | [INFO] [stdout] 89 | } else if 4.0 <= converted_h && converted_h <= 5.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(4.0..=5.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/color_processing.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | } else if 5.0 <= converted_h && converted_h <= 6.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(5.0..=6.0).contains(&converted_h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/color_processing.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | let final_a: u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `final_a` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 98 ~ [INFO] [stdout] 99 | [INFO] [stdout] 100 ~ let final_a: u8 = if final_r == 0 && final_g == 0 && final_b == 0 { [INFO] [stdout] 101 ~ 0 [INFO] [stdout] 102 | } else { [INFO] [stdout] 103 ~ 255 [INFO] [stdout] 104 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/file_processing.rs:14:80 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn process_image(input_filepath: &String, output_filepath: &String, color: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - pub fn process_image(input_filepath: &String, output_filepath: &String, color: &String) { [INFO] [stdout] 14 + pub fn process_image(input_filepath: &String, output_filepath: &String, color: &str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/file_processing.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let ref mut w = BufWriter::new(file); [INFO] [stdout] | ----^^^^^^^^^------------------------ help: try: `let w = &mut BufWriter::new(file);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] = note: `#[warn(clippy::toplevel_ref_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_processing.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 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] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !(pixel.r == 0 && pixel.g == 0) { [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if pixel.r != 0 || pixel.g != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_processing.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 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] help: try [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !!(pixel.r != 0 || pixel.g != 0) { [INFO] [stdout] | [INFO] [stdout] 55 - if !(pixel.r == 0 && pixel.g == 0 && pixel.g == 0) { [INFO] [stdout] 55 + if !pixel.r == 0 && pixel.g == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.04s [INFO] running `Command { std: "docker" "inspect" "a4404dfc9560bf59889bbe4ca8ebed816dc47756315e603f8dd06d539e68bac6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a4404dfc9560bf59889bbe4ca8ebed816dc47756315e603f8dd06d539e68bac6", kill_on_drop: false }` [INFO] [stdout] a4404dfc9560bf59889bbe4ca8ebed816dc47756315e603f8dd06d539e68bac6