[INFO] cloning repository https://github.com/polygon/allcolors-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/polygon/allcolors-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpolygon%2Fallcolors-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpolygon%2Fallcolors-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6ae40304b8936283bbd74dcfd932869fb3a8d888 [INFO] linting polygon/allcolors-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpolygon%2Fallcolors-rs" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/polygon/allcolors-rs [INFO] finished tweaking git repo https://github.com/polygon/allcolors-rs [INFO] tweaked toml for git repo https://github.com/polygon/allcolors-rs written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/polygon/allcolors-rs 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/polygon/allcolors-rs 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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded either v1.4.0 [INFO] [stderr] Downloaded jpeg-decoder v0.1.13 [INFO] [stderr] Downloaded rayon-core v1.3.0 [INFO] [stderr] Downloaded scoped_threadpool v0.1.8 [INFO] [stderr] Downloaded num-traits v0.2.0 [INFO] [stderr] Downloaded shared_library v0.1.8 [INFO] [stderr] Downloaded libloading v0.4.3 [INFO] [stderr] Downloaded token_store v0.1.2 [INFO] [stderr] Downloaded gleam v0.4.20 [INFO] [stderr] Downloaded core-graphics v0.12.4 [INFO] [stderr] Downloaded backtrace v0.3.5 [INFO] [stderr] Downloaded cc v1.0.4 [INFO] [stderr] Downloaded x11-dl v2.17.2 [INFO] [stderr] Downloaded glutin v0.12.0 [INFO] [stderr] Downloaded wayland-protocols v0.12.5 [INFO] [stderr] Downloaded deflate v0.7.17 [INFO] [stderr] Downloaded winit v0.10.0 [INFO] [stderr] Downloaded cocoa v0.13.0 [INFO] [stderr] Downloaded wayland-kbd v0.13.1 [INFO] [stderr] Downloaded wayland-client v0.12.5 [INFO] [stderr] Downloaded gl_generator v0.8.0 [INFO] [stderr] Downloaded smallvec v0.6.0 [INFO] [stderr] Downloaded objc v0.2.2 [INFO] [stderr] Downloaded wayland-scanner v0.12.5 [INFO] [stderr] Downloaded khronos_api v2.1.0 [INFO] [stderr] Downloaded libc v0.2.36 [INFO] [stderr] Downloaded wayland-window v0.13.2 [INFO] [stderr] Downloaded cgl v0.2.1 [INFO] [stderr] Downloaded dlib v0.4.0 [INFO] [stderr] Downloaded coco v0.1.1 [INFO] [stderr] Downloaded wayland-sys v0.12.5 [INFO] [stderr] Downloaded glium v0.20.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] e68463ac5dc2d0e248e357cf79608a1aeaf8fcdd780fb0202333cb1f11549710 [INFO] running `Command { std: "docker" "start" "-a" "e68463ac5dc2d0e248e357cf79608a1aeaf8fcdd780fb0202333cb1f11549710", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e68463ac5dc2d0e248e357cf79608a1aeaf8fcdd780fb0202333cb1f11549710", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e68463ac5dc2d0e248e357cf79608a1aeaf8fcdd780fb0202333cb1f11549710", kill_on_drop: false }` [INFO] [stdout] e68463ac5dc2d0e248e357cf79608a1aeaf8fcdd780fb0202333cb1f11549710 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 63854094203cf864810d758bc2a2b4db2c0b994ab4a04e3ea9d507bad4b4d046 [INFO] running `Command { std: "docker" "start" "-a" "63854094203cf864810d758bc2a2b4db2c0b994ab4a04e3ea9d507bad4b4d046", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Checking libc v0.2.36 [INFO] [stderr] Compiling bitflags v1.0.1 [INFO] [stderr] Checking lazy_static v1.0.0 [INFO] [stderr] Compiling libloading v0.4.3 [INFO] [stderr] Compiling cfg-if v0.1.2 [INFO] [stderr] Compiling khronos_api v2.1.0 [INFO] [stderr] Checking num-traits v0.2.0 [INFO] [stderr] Checking token_store v0.1.2 [INFO] [stderr] Compiling pkg-config v0.3.9 [INFO] [stderr] Compiling cc v1.0.4 [INFO] [stderr] Compiling rayon-core v1.3.0 [INFO] [stderr] Checking either v1.4.0 [INFO] [stderr] Checking scopeguard v0.3.3 [INFO] [stderr] Checking adler32 v1.0.2 [INFO] [stderr] Checking byteorder v1.2.1 [INFO] [stderr] Compiling log v0.4.1 [INFO] [stderr] Checking lazy_static v0.2.11 [INFO] [stderr] Checking inflate v0.3.4 [INFO] [stderr] Checking color_quant v1.0.0 [INFO] [stderr] Checking rustc-demangle v0.1.5 [INFO] [stderr] Checking lzw v0.10.0 [INFO] [stderr] Compiling xml-rs v0.7.0 [INFO] [stderr] Checking coco v0.1.1 [INFO] [stderr] Checking smallvec v0.6.0 [INFO] [stderr] Checking scoped_threadpool v0.1.8 [INFO] [stderr] Compiling log v0.3.9 [INFO] [stderr] Checking deflate v0.7.17 [INFO] [stderr] Compiling x11-dl v2.17.2 [INFO] [stderr] Checking gif v0.9.2 [INFO] [stderr] Checking dlib v0.4.0 [INFO] [stderr] Checking num-integer v0.1.36 [INFO] [stderr] Checking num-traits v0.1.43 [INFO] [stderr] Checking wayland-sys v0.12.5 [INFO] [stderr] Checking enum_primitive v0.1.1 [INFO] [stderr] Checking num-iter v0.1.35 [INFO] [stderr] Checking num-rational v0.1.42 [INFO] [stderr] Checking rand v0.4.2 [INFO] [stderr] Checking memmap v0.6.2 [INFO] [stderr] Checking num_cpus v1.8.0 [INFO] [stderr] Checking shared_library v0.1.8 [INFO] [stderr] Compiling wayland-scanner v0.12.5 [INFO] [stderr] Compiling gl_generator v0.7.0 [INFO] [stderr] Compiling gl_generator v0.8.0 [INFO] [stderr] Compiling backtrace-sys v0.1.16 [INFO] [stderr] Checking osmesa-sys v0.1.2 [INFO] [stderr] Checking png v0.11.0 [INFO] [stderr] Compiling wayland-client v0.12.5 [INFO] [stderr] Compiling wayland-protocols v0.12.5 [INFO] [stderr] Checking rand v0.3.22 [INFO] [stderr] Checking tempfile v2.2.0 [INFO] [stderr] Compiling glium v0.20.0 [INFO] [stderr] Compiling glutin v0.12.0 [INFO] [stderr] Checking rayon v0.8.2 [INFO] [stderr] Checking wayland-kbd v0.13.1 [INFO] [stderr] Checking jpeg-decoder v0.1.13 [INFO] [stderr] Checking image v0.18.0 [INFO] [stderr] Checking wayland-window v0.13.2 [INFO] [stderr] Checking winit v0.10.0 [INFO] [stderr] Checking backtrace v0.3.5 [INFO] [stderr] Checking allcolors-rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/colortree.rs:51:67 [INFO] [stdout] | [INFO] [stdout] 51 | cube: Cube { tl: offset, br: offset + (size - 1), size: size }, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `size` [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/allcolors.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | aspect: aspect, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `aspect` [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/allcolors.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | bits: bits, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bits` [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: unneeded unit expression [INFO] [stdout] --> src/allcolors.rs:43:18 [INFO] [stdout] | [INFO] [stdout] 43 | } else { () } [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `std::thread::sleep_ms`: replaced by `std::thread::sleep` [INFO] [stdout] --> src/display.rs:83:17 [INFO] [stdout] | [INFO] [stdout] 83 | thread::sleep_ms(10); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `std::mem::uninitialized`: use `mem::MaybeUninit` instead [INFO] [stdout] --> src/display.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | implement_vertex!(Vertex, position, tex_coords); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `implement_vertex` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/colortree.rs:51:67 [INFO] [stdout] | [INFO] [stdout] 51 | cube: Cube { tl: offset, br: offset + (size - 1), size: size }, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `size` [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/allcolors.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | aspect: aspect, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `aspect` [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/allcolors.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | bits: bits, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bits` [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: unneeded unit expression [INFO] [stdout] --> src/allcolors.rs:43:18 [INFO] [stdout] | [INFO] [stdout] 43 | } else { () } [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `std::thread::sleep_ms`: replaced by `std::thread::sleep` [INFO] [stdout] --> src/display.rs:83:17 [INFO] [stdout] | [INFO] [stdout] 83 | thread::sleep_ms(10); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `std::mem::uninitialized`: use `mem::MaybeUninit` instead [INFO] [stdout] --> src/display.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | implement_vertex!(Vertex, position, tex_coords); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `implement_vertex` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/allcolors.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | for mut x in 0..self.width { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/allcolors.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | for mut y in 0..self.height { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `aspect` is never read [INFO] [stdout] --> src/allcolors.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct AllColors { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 7 | aspect: f64, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AllColors` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/display.rs:71:37 [INFO] [stdout] | [INFO] [stdout] 71 | target.draw(&vertex_buffer, &indices, &program, &uniforms, &Default::default()).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `indices` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/display.rs:76:61 [INFO] [stdout] | [INFO] [stdout] 76 | glutin::Event::WindowEvent { event, .. } => match event { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 77 | | glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] 78 | | _ => (), [INFO] [stdout] 79 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/display.rs:76:46 [INFO] [stdout] | [INFO] [stdout] 76 | glutin::Event::WindowEvent { event, .. } => match event { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 77 | glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `event: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` 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/display.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | / match ev { [INFO] [stdout] 76 | | glutin::Event::WindowEvent { event, .. } => match event { [INFO] [stdout] 77 | | glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] 78 | | _ => (), [INFO] [stdout] 79 | | }, [INFO] [stdout] 80 | | _ => (), [INFO] [stdout] 81 | | } [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] 75 ~ if let glutin::Event::WindowEvent { event, .. } = ev { match event { [INFO] [stdout] 76 + glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] 77 + _ => (), [INFO] [stdout] 78 + } } [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/display.rs:76:61 [INFO] [stdout] | [INFO] [stdout] 76 | glutin::Event::WindowEvent { event, .. } => match event { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 77 | | glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] 78 | | _ => (), [INFO] [stdout] 79 | | }, [INFO] [stdout] | |_________________^ help: try: `if let glutin::WindowEvent::Closed = event { closed = true }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/colortree.rs:31:33 [INFO] [stdout] | [INFO] [stdout] 31 | let size = 2u32.pow(bits as u32); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/colortree.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | / let mut children = Vec::new(); [INFO] [stdout] 34 | | children.push(ColorTree::mk_subtree( [INFO] [stdout] 35 | | bits - 1, offset )); [INFO] [stdout] 36 | | children.push(ColorTree::mk_subtree( [INFO] [stdout] ... | [INFO] [stdout] 48 | | children.push(ColorTree::mk_subtree( [INFO] [stdout] 49 | | bits - 1, Point {r: offset.r + csize, g: offset.g + csize, b: offset.b + csize } )); [INFO] [stdout] | |____________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let children = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/colortree.rs:61:35 [INFO] [stdout] | [INFO] [stdout] 61 | self.nearest_radius(from, std::u32::MAX) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 61 - self.nearest_radius(from, std::u32::MAX) [INFO] [stdout] 61 + self.nearest_radius(from, u32::MAX) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/colortree.rs:81:54 [INFO] [stdout] | [INFO] [stdout] 81 | let mut distances: Vec<_> = children.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/colortree.rs:84:25 [INFO] [stdout] | [INFO] [stdout] 84 | / match dc { [INFO] [stdout] 85 | | Some(d) => Some((d, c)), [INFO] [stdout] 86 | | None => None [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________________________^ help: try: `dc.map(|d| (d, c))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/colortree.rs:90:17 [INFO] [stdout] | [INFO] [stdout] 90 | distances.sort_by(|&(di, ..), &(dj, ..)| di.cmp(&dj)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 90 - distances.sort_by(|&(di, ..), &(dj, ..)| di.cmp(&dj)); [INFO] [stdout] 90 + distances.sort_by_key(|&(di, ..)| di); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/colortree.rs:106:20 [INFO] [stdout] | [INFO] [stdout] 106 | if *active == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `*active` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/colortree.rs:121:20 [INFO] [stdout] | [INFO] [stdout] 121 | if children[idx].remove(point) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `children[idx].remove(point)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/allcolors.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | for mut x in 0..self.width { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/allcolors.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | for mut y in 0..self.height { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `aspect` is never read [INFO] [stdout] --> src/allcolors.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct AllColors { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 7 | aspect: f64, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AllColors` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/imagemap.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | / match self.get(x as i32 + i, y as i32 + j) { [INFO] [stdout] 35 | | Some(&Pixel::Free) => { [INFO] [stdout] 36 | | let px = (x as i32 + i) as usize; [INFO] [stdout] 37 | | let py = (y as i32 + j) as usize; [INFO] [stdout] ... | [INFO] [stdout] 41 | | _ => () [INFO] [stdout] 42 | | } [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] 34 ~ if let Some(&Pixel::Free) = self.get(x as i32 + i, y as i32 + j) { [INFO] [stdout] 35 + let px = (x as i32 + i) as usize; [INFO] [stdout] 36 + let py = (y as i32 + j) as usize; [INFO] [stdout] 37 + self.open.push((px, py)); [INFO] [stdout] 38 + self.data[px][py] = Pixel::Marked; [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/imagemap.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | if !((0 <= x) && (x < self.width as i32)) || [INFO] [stdout] | ____________^ [INFO] [stdout] 49 | | !((0 <= y) && (y < self.height as i32)) { [INFO] [stdout] | |__________________________________________________^ help: try: `!((0 <= x) && (x < self.width as i32) && (0 <= y) && (y < self.height as i32))` [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: the loop variable `i` is used to index `out` [INFO] [stdout] --> src/imagemap.rs:79:18 [INFO] [stdout] | [INFO] [stdout] 79 | for i in 0..self.width { [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] 79 - for i in 0..self.width { [INFO] [stdout] 79 + for (i, ) in out.iter_mut().enumerate().take(self.width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `out` [INFO] [stdout] --> src/imagemap.rs:80:22 [INFO] [stdout] | [INFO] [stdout] 80 | for j in 0..self.height { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 80 - for j in 0..self.height { [INFO] [stdout] 80 + for (j, ) in out.iter_mut().enumerate().take(self.height) { [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/imagemap.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | / match self.data[i][j] { [INFO] [stdout] 82 | | Pixel::Placed (r, g, b) => { [INFO] [stdout] 83 | | out[i][j] = (r, g, b); [INFO] [stdout] ... | [INFO] [stdout] 86 | | } [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] 81 ~ if let Pixel::Placed (r, g, b) = self.data[i][j] { [INFO] [stdout] 82 + out[i][j] = (r, g, b); [INFO] [stdout] 83 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/display.rs:71:37 [INFO] [stdout] | [INFO] [stdout] 71 | target.draw(&vertex_buffer, &indices, &program, &uniforms, &Default::default()).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `indices` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/display.rs:76:61 [INFO] [stdout] | [INFO] [stdout] 76 | glutin::Event::WindowEvent { event, .. } => match event { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 77 | | glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] 78 | | _ => (), [INFO] [stdout] 79 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/display.rs:76:46 [INFO] [stdout] | [INFO] [stdout] 76 | glutin::Event::WindowEvent { event, .. } => match event { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 77 | glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `event: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` 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/display.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | / match ev { [INFO] [stdout] 76 | | glutin::Event::WindowEvent { event, .. } => match event { [INFO] [stdout] 77 | | glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] 78 | | _ => (), [INFO] [stdout] 79 | | }, [INFO] [stdout] 80 | | _ => (), [INFO] [stdout] 81 | | } [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] 75 ~ if let glutin::Event::WindowEvent { event, .. } = ev { match event { [INFO] [stdout] 76 + glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] 77 + _ => (), [INFO] [stdout] 78 + } } [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/display.rs:76:61 [INFO] [stdout] | [INFO] [stdout] 76 | glutin::Event::WindowEvent { event, .. } => match event { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 77 | | glutin::WindowEvent::Closed => closed = true, [INFO] [stdout] 78 | | _ => (), [INFO] [stdout] 79 | | }, [INFO] [stdout] | |_________________^ help: try: `if let glutin::WindowEvent::Closed = event { closed = true }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `v` [INFO] [stdout] --> src/allcolors.rs:76:22 [INFO] [stdout] | [INFO] [stdout] 76 | for mut x in 0..self.width { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 76 - for mut x in 0..self.width { [INFO] [stdout] 76 + for in v.iter_mut().take(self.width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `v` [INFO] [stdout] --> src/allcolors.rs:77:26 [INFO] [stdout] | [INFO] [stdout] 77 | for mut y in 0..self.height { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 77 - for mut y in 0..self.height { [INFO] [stdout] 77 + for in v.iter_mut().take(self.height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/colortree.rs:31:33 [INFO] [stdout] | [INFO] [stdout] 31 | let size = 2u32.pow(bits as u32); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `v` [INFO] [stdout] --> src/main.rs:35:26 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..self.allcolors.width { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 35 - for i in 0..self.allcolors.width { [INFO] [stdout] 35 + for (i, ) in v.iter().enumerate().take(self.allcolors.width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/colortree.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | / let mut children = Vec::new(); [INFO] [stdout] 34 | | children.push(ColorTree::mk_subtree( [INFO] [stdout] 35 | | bits - 1, offset )); [INFO] [stdout] 36 | | children.push(ColorTree::mk_subtree( [INFO] [stdout] ... | [INFO] [stdout] 48 | | children.push(ColorTree::mk_subtree( [INFO] [stdout] 49 | | bits - 1, Point {r: offset.r + csize, g: offset.g + csize, b: offset.b + csize } )); [INFO] [stdout] | |____________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let children = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/colortree.rs:61:35 [INFO] [stdout] | [INFO] [stdout] 61 | self.nearest_radius(from, std::u32::MAX) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 61 - self.nearest_radius(from, std::u32::MAX) [INFO] [stdout] 61 + self.nearest_radius(from, u32::MAX) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/colortree.rs:81:54 [INFO] [stdout] | [INFO] [stdout] 81 | let mut distances: Vec<_> = children.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/colortree.rs:84:25 [INFO] [stdout] | [INFO] [stdout] 84 | / match dc { [INFO] [stdout] 85 | | Some(d) => Some((d, c)), [INFO] [stdout] 86 | | None => None [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________________________^ help: try: `dc.map(|d| (d, c))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `v` [INFO] [stdout] --> src/main.rs:36:30 [INFO] [stdout] | [INFO] [stdout] 36 | for j in 0..self.allcolors.height { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 36 - for j in 0..self.allcolors.height { [INFO] [stdout] 36 + for (j, ) in v.iter().enumerate().take(self.allcolors.height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/colortree.rs:90:17 [INFO] [stdout] | [INFO] [stdout] 90 | distances.sort_by(|&(di, ..), &(dj, ..)| di.cmp(&dj)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 90 - distances.sort_by(|&(di, ..), &(dj, ..)| di.cmp(&dj)); [INFO] [stdout] 90 + distances.sort_by_key(|&(di, ..)| di); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/colortree.rs:106:20 [INFO] [stdout] | [INFO] [stdout] 106 | if *active == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `*active` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/colortree.rs:121:20 [INFO] [stdout] | [INFO] [stdout] 121 | if children[idx].remove(point) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `children[idx].remove(point)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/imagemap.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | / match self.get(x as i32 + i, y as i32 + j) { [INFO] [stdout] 35 | | Some(&Pixel::Free) => { [INFO] [stdout] 36 | | let px = (x as i32 + i) as usize; [INFO] [stdout] 37 | | let py = (y as i32 + j) as usize; [INFO] [stdout] ... | [INFO] [stdout] 41 | | _ => () [INFO] [stdout] 42 | | } [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] 34 ~ if let Some(&Pixel::Free) = self.get(x as i32 + i, y as i32 + j) { [INFO] [stdout] 35 + let px = (x as i32 + i) as usize; [INFO] [stdout] 36 + let py = (y as i32 + j) as usize; [INFO] [stdout] 37 + self.open.push((px, py)); [INFO] [stdout] 38 + self.data[px][py] = Pixel::Marked; [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/imagemap.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | if !((0 <= x) && (x < self.width as i32)) || [INFO] [stdout] | ____________^ [INFO] [stdout] 49 | | !((0 <= y) && (y < self.height as i32)) { [INFO] [stdout] | |__________________________________________________^ help: try: `!((0 <= x) && (x < self.width as i32) && (0 <= y) && (y < self.height as i32))` [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: the loop variable `i` is used to index `out` [INFO] [stdout] --> src/imagemap.rs:79:18 [INFO] [stdout] | [INFO] [stdout] 79 | for i in 0..self.width { [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] 79 - for i in 0..self.width { [INFO] [stdout] 79 + for (i, ) in out.iter_mut().enumerate().take(self.width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `out` [INFO] [stdout] --> src/imagemap.rs:80:22 [INFO] [stdout] | [INFO] [stdout] 80 | for j in 0..self.height { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 80 - for j in 0..self.height { [INFO] [stdout] 80 + for (j, ) in out.iter_mut().enumerate().take(self.height) { [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/imagemap.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | / match self.data[i][j] { [INFO] [stdout] 82 | | Pixel::Placed (r, g, b) => { [INFO] [stdout] 83 | | out[i][j] = (r, g, b); [INFO] [stdout] ... | [INFO] [stdout] 86 | | } [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] 81 ~ if let Pixel::Placed (r, g, b) = self.data[i][j] { [INFO] [stdout] 82 + out[i][j] = (r, g, b); [INFO] [stdout] 83 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `v` [INFO] [stdout] --> src/allcolors.rs:76:22 [INFO] [stdout] | [INFO] [stdout] 76 | for mut x in 0..self.width { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 76 - for mut x in 0..self.width { [INFO] [stdout] 76 + for in v.iter_mut().take(self.width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `v` [INFO] [stdout] --> src/allcolors.rs:77:26 [INFO] [stdout] | [INFO] [stdout] 77 | for mut y in 0..self.height { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 77 - for mut y in 0..self.height { [INFO] [stdout] 77 + for in v.iter_mut().take(self.height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `v` [INFO] [stdout] --> src/main.rs:35:26 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..self.allcolors.width { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 35 - for i in 0..self.allcolors.width { [INFO] [stdout] 35 + for (i, ) in v.iter().enumerate().take(self.allcolors.width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `v` [INFO] [stdout] --> src/main.rs:36:30 [INFO] [stdout] | [INFO] [stdout] 36 | for j in 0..self.allcolors.height { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 36 - for j in 0..self.allcolors.height { [INFO] [stdout] 36 + for (j, ) in v.iter().enumerate().take(self.allcolors.height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 26.34s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: glutin v0.12.0, winit v0.10.0 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 3` [INFO] running `Command { std: "docker" "inspect" "63854094203cf864810d758bc2a2b4db2c0b994ab4a04e3ea9d507bad4b4d046", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "63854094203cf864810d758bc2a2b4db2c0b994ab4a04e3ea9d507bad4b4d046", kill_on_drop: false }` [INFO] [stdout] 63854094203cf864810d758bc2a2b4db2c0b994ab4a04e3ea9d507bad4b4d046