[INFO] cloning repository https://github.com/ahasasjeb/lvSHP [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ahasasjeb/lvSHP" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fahasasjeb%2FlvSHP", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fahasasjeb%2FlvSHP'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 011e0c6522233f3f959ec6c81f78290436b13662 [INFO] linting ahasasjeb/lvSHP against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fahasasjeb%2FlvSHP" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ahasasjeb/lvSHP [INFO] finished tweaking git repo https://github.com/ahasasjeb/lvSHP [INFO] tweaked toml for git repo https://github.com/ahasasjeb/lvSHP written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ahasasjeb/lvSHP 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/ahasasjeb/lvSHP already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded egui_extras v0.27.2 [INFO] [stderr] Downloaded apng v0.3.4 [INFO] [stderr] Downloaded zune-jpeg v0.4.20 [INFO] [stderr] Downloaded async-process v2.4.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1d4b0437bdcf8e9ec5195f71cb19e70b6290c0028ebd98d36dbbd47b84dc1a20 [INFO] running `Command { std: "docker" "start" "-a" "1d4b0437bdcf8e9ec5195f71cb19e70b6290c0028ebd98d36dbbd47b84dc1a20", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1d4b0437bdcf8e9ec5195f71cb19e70b6290c0028ebd98d36dbbd47b84dc1a20", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1d4b0437bdcf8e9ec5195f71cb19e70b6290c0028ebd98d36dbbd47b84dc1a20", kill_on_drop: false }` [INFO] [stdout] 1d4b0437bdcf8e9ec5195f71cb19e70b6290c0028ebd98d36dbbd47b84dc1a20 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 94bb3f53a005244092f66b0a060bb95cb63133cf2953fddda780664889aab545 [INFO] running `Command { std: "docker" "start" "-a" "94bb3f53a005244092f66b0a060bb95cb63133cf2953fddda780664889aab545", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.175 [INFO] [stderr] Checking bitflags v2.9.3 [INFO] [stderr] Compiling rustix v1.0.8 [INFO] [stderr] Compiling memchr v2.7.5 [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Compiling hashbrown v0.15.5 [INFO] [stderr] Compiling wayland-sys v0.31.7 [INFO] [stderr] Compiling cc v1.2.34 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Compiling wayland-client v0.31.11 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking event-listener-strategy v0.5.4 [INFO] [stderr] Compiling io-lifetimes v1.0.11 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.10 [INFO] [stderr] Checking ordered-stream v0.2.0 [INFO] [stderr] Checking async-channel v2.5.0 [INFO] [stderr] Compiling memoffset v0.7.1 [INFO] [stderr] Compiling polling v2.8.0 [INFO] [stderr] Compiling rustix v0.37.28 [INFO] [stderr] Checking waker-fn v1.2.0 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Compiling regex-syntax v0.8.6 [INFO] [stderr] Checking futures-lite v1.13.0 [INFO] [stderr] Checking blocking v1.6.2 [INFO] [stderr] Compiling async-io v1.13.0 [INFO] [stderr] Compiling indexmap v2.11.0 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Compiling async-fs v1.6.0 [INFO] [stderr] Checking linux-raw-sys v0.3.8 [INFO] [stderr] Checking xcursor v0.3.10 [INFO] [stderr] Compiling xml-rs v0.8.27 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling quick-xml v0.37.5 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Compiling aho-corasick v1.1.3 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Checking async-broadcast v0.5.1 [INFO] [stderr] Compiling winnow v0.7.13 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking async-lock v3.4.1 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling toml_edit v0.19.15 [INFO] [stderr] Checking xdg-home v1.3.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking socket2 v0.4.10 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Compiling wayland-scanner v0.31.7 [INFO] [stderr] Compiling wayland-backend v0.3.11 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling regex-automata v0.4.10 [INFO] [stderr] Checking memmap2 v0.9.8 [INFO] [stderr] Checking nix v0.26.4 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking owned_ttf_parser v0.25.1 [INFO] [stderr] Checking ab_glyph v0.2.31 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Compiling phf_shared v0.11.3 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Compiling glutin_egl_sys v0.6.0 [INFO] [stderr] Compiling glutin_glx_sys v0.5.0 [INFO] [stderr] Checking getrandom v0.1.16 [INFO] [stderr] Compiling toml_edit v0.22.27 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Checking endi v1.1.0 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Compiling phf v0.11.3 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking polling v3.10.0 [INFO] [stderr] Compiling matrixmultiply v0.3.10 [INFO] [stderr] Compiling proc-macro-crate v1.3.1 [INFO] [stderr] Checking async-io v2.5.0 [INFO] [stderr] Checking async-once-cell v0.5.4 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling mime_guess2 v2.3.1 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Checking x11rb v0.13.1 [INFO] [stderr] Checking async-fs v2.1.3 [INFO] [stderr] Checking async-broadcast v0.7.2 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking ttf-parser v0.15.2 [INFO] [stderr] Checking home v0.5.11 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Compiling rust-embed-utils v8.7.2 [INFO] [stderr] Checking async-net v2.0.0 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking glow v0.13.1 [INFO] [stderr] Compiling rfd v0.14.1 [INFO] [stderr] Checking wayland-protocols v0.31.2 [INFO] [stderr] Checking wayland-cursor v0.31.11 [INFO] [stderr] Checking wayland-protocols v0.32.9 [INFO] [stderr] Checking glutin v0.31.3 [INFO] [stderr] Checking custom_derive v0.1.7 [INFO] [stderr] Checking conv v0.3.3 [INFO] [stderr] Compiling zvariant_utils v1.0.1 [INFO] [stderr] Compiling regex v1.11.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking zune-jpeg v0.4.20 [INFO] [stderr] Checking gif v0.13.3 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking pollster v0.3.0 [INFO] [stderr] Checking rand_distr v0.2.2 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zvariant_utils v2.1.0 [INFO] [stderr] Compiling proc-macro-crate v3.3.0 [INFO] [stderr] Checking owned_ttf_parser v0.15.2 [INFO] [stderr] Checking rusttype v0.9.3 [INFO] [stderr] Compiling zvariant_derive v3.15.2 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Compiling zbus_macros v3.15.2 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling bytemuck_derive v1.10.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling enumflags2_derive v0.7.12 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling tracing-attributes v0.1.30 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Compiling async-recursion v1.1.1 [INFO] [stderr] Compiling enumn v0.1.14 [INFO] [stderr] Compiling zvariant_derive v4.2.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling zbus_macros v4.4.0 [INFO] [stderr] Checking arboard v3.6.1 [INFO] [stderr] Compiling enum-map-derive v0.17.0 [INFO] [stderr] Compiling rust-embed-impl v8.7.2 [INFO] [stderr] Checking bytemuck v1.23.2 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking calloop v0.12.4 [INFO] [stderr] Checking wayland-protocols-wlr v0.2.0 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking wayland-protocols-plasma v0.2.0 [INFO] [stderr] Checking calloop v0.13.0 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking safe_arch v0.7.4 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking calloop-wayland-source v0.2.0 [INFO] [stderr] Checking rust-embed v8.7.2 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking image v0.25.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking calloop-wayland-source v0.3.0 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking wide v0.7.33 [INFO] [stderr] Checking smithay-client-toolkit v0.18.1 [INFO] [stderr] Checking zerovec v0.11.4 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking apng v0.3.4 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking sctk-adwaita v0.8.3 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking simba v0.7.3 [INFO] [stderr] Checking wayland-protocols-wlr v0.3.9 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking smithay-client-toolkit v0.19.2 [INFO] [stderr] Checking enumflags2 v0.7.12 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking accesskit v0.12.3 [INFO] [stderr] Checking emath v0.27.2 [INFO] [stderr] Checking ecolor v0.27.2 [INFO] [stderr] Checking enum-map v2.7.3 [INFO] [stderr] Checking zvariant v3.15.2 [INFO] [stderr] Checking winit v0.29.15 [INFO] [stderr] Checking zvariant v4.2.0 [INFO] [stderr] Checking webbrowser v0.8.15 [INFO] [stderr] Checking epaint v0.27.2 [INFO] [stderr] Checking smithay-clipboard v0.7.2 [INFO] [stderr] Checking accesskit_consumer v0.16.1 [INFO] [stderr] Checking zbus_names v2.6.1 [INFO] [stderr] Checking zbus v3.15.2 [INFO] [stderr] Checking egui v0.27.2 [INFO] [stderr] Checking glutin-winit v0.4.2 [INFO] [stderr] Checking zbus_names v3.0.0 [INFO] [stderr] Checking nalgebra v0.30.1 [INFO] [stderr] Checking zbus v4.4.0 [INFO] [stderr] Checking atspi-common v0.3.0 [INFO] [stderr] Checking egui_glow v0.27.2 [INFO] [stderr] Checking egui_extras v0.27.2 [INFO] [stderr] Checking ashpd v0.8.1 [INFO] [stderr] Checking imageproc v0.23.0 [INFO] [stderr] Checking atspi-proxies v0.3.0 [INFO] [stderr] Checking atspi-connection v0.3.0 [INFO] [stderr] Checking atspi v0.19.0 [INFO] [stderr] Checking accesskit_unix v0.6.2 [INFO] [stderr] Checking accesskit_winit v0.16.1 [INFO] [stderr] Checking egui-winit v0.27.2 [INFO] [stderr] Checking eframe v0.27.2 [INFO] [stderr] Checking lvjiaShpEdit v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/image_io.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use image; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/image_io.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use image; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/app.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | let (grouped, flat): (Vec<(String, Vec<(String, Palette)>)>, Vec<(String, Palette)>) = load_embedded_palettes(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/app.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | let (grouped, flat): (Vec<(String, Vec<(String, Palette)>)>, Vec<(String, Palette)>) = load_embedded_palettes(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:158:16 [INFO] [stdout] | [INFO] [stdout] 158 | if self.undo_frame_anchor.map_or(false, |a| a != fi) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 158 - if self.undo_frame_anchor.map_or(false, |a| a != fi) { [INFO] [stdout] 158 + if self.undo_frame_anchor.is_some_and(|a| a != fi) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:178:16 [INFO] [stdout] | [INFO] [stdout] 178 | if self.undo_frame_anchor.map_or(false, |a| a != fi) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 178 - if self.undo_frame_anchor.map_or(false, |a| a != fi) { [INFO] [stdout] 178 + if self.undo_frame_anchor.is_some_and(|a| a != fi) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:158:16 [INFO] [stdout] | [INFO] [stdout] 158 | if self.undo_frame_anchor.map_or(false, |a| a != fi) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 158 - if self.undo_frame_anchor.map_or(false, |a| a != fi) { [INFO] [stdout] 158 + if self.undo_frame_anchor.is_some_and(|a| a != fi) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:178:16 [INFO] [stdout] | [INFO] [stdout] 178 | if self.undo_frame_anchor.map_or(false, |a| a != fi) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 178 - if self.undo_frame_anchor.map_or(false, |a| a != fi) { [INFO] [stdout] 178 + if self.undo_frame_anchor.is_some_and(|a| a != fi) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `frames.get(0)` [INFO] [stdout] --> src/app.rs:447:41 [INFO] [stdout] | [INFO] [stdout] 447 | if let Some(rgba) = frames.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `frames.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/app.rs:476:32 [INFO] [stdout] | [INFO] [stdout] 476 | fn load_embedded_palettes() -> (Vec<(String, Vec<(String, Palette)>)>, Vec<(String, Palette)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `frames.get(0)` [INFO] [stdout] --> src/app.rs:447:41 [INFO] [stdout] | [INFO] [stdout] 447 | if let Some(rgba) = frames.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `frames.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/app.rs:476:32 [INFO] [stdout] | [INFO] [stdout] 476 | fn load_embedded_palettes() -> (Vec<(String, Vec<(String, Palette)>)>, Vec<(String, Palette)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:598:21 [INFO] [stdout] | [INFO] [stdout] 598 | / if ui.add_enabled(!prev_disabled, egui::Button::new("← 上一帧")).clicked() { [INFO] [stdout] 599 | | if self.preview.current_frame > 0 { self.preview.current_frame -= 1; } [INFO] [stdout] 600 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 598 ~ if ui.add_enabled(!prev_disabled, egui::Button::new("← 上一帧")).clicked() [INFO] [stdout] 599 ~ && self.preview.current_frame > 0 { self.preview.current_frame -= 1; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:604:21 [INFO] [stdout] | [INFO] [stdout] 604 | / if ui.add_enabled(!next_disabled, egui::Button::new("下一帧 →")).clicked() { [INFO] [stdout] 605 | | if self.preview.current_frame + 1 < count { self.preview.current_frame += 1; } [INFO] [stdout] 606 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 604 ~ if ui.add_enabled(!next_disabled, egui::Button::new("下一帧 →")).clicked() [INFO] [stdout] 605 ~ && self.preview.current_frame + 1 < count { self.preview.current_frame += 1; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:658:17 [INFO] [stdout] | [INFO] [stdout] 658 | / if let Some(pp) = pointer_pos_opt { if rect.contains(pp) { [INFO] [stdout] 659 | | let pos = response.interact_pointer_pos().unwrap_or(rect.min); [INFO] [stdout] 660 | | let local = (pos - rect.min) / self.scale; [INFO] [stdout] 661 | | let x = local.x.floor() as i32; let y = local.y.floor() as i32; [INFO] [stdout] ... | [INFO] [stdout] 698 | | }} [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 658 ~ if let Some(pp) = pointer_pos_opt && rect.contains(pp) { [INFO] [stdout] 659 | let pos = response.interact_pointer_pos().unwrap_or(rect.min); [INFO] [stdout] ... [INFO] [stdout] 697 | } [INFO] [stdout] 698 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:701:17 [INFO] [stdout] | [INFO] [stdout] 701 | / if self.drawing { if let (Some(s), Some(e)) = (self.draw_start, self.draw_end) { [INFO] [stdout] 702 | | let start = rect.min + egui::vec2(s.x * self.scale, s.y * self.scale); [INFO] [stdout] 703 | | let end = rect.min + egui::vec2(e.x * self.scale, e.y * self.scale); [INFO] [stdout] 704 | | match self.tool { [INFO] [stdout] ... | [INFO] [stdout] 710 | | }} [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 701 ~ if self.drawing && let (Some(s), Some(e)) = (self.draw_start, self.draw_end) { [INFO] [stdout] 702 | let start = rect.min + egui::vec2(s.x * self.scale, s.y * self.scale); [INFO] [stdout] ... [INFO] [stdout] 709 | } [INFO] [stdout] 710 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:598:21 [INFO] [stdout] | [INFO] [stdout] 598 | / if ui.add_enabled(!prev_disabled, egui::Button::new("← 上一帧")).clicked() { [INFO] [stdout] 599 | | if self.preview.current_frame > 0 { self.preview.current_frame -= 1; } [INFO] [stdout] 600 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 598 ~ if ui.add_enabled(!prev_disabled, egui::Button::new("← 上一帧")).clicked() [INFO] [stdout] 599 ~ && self.preview.current_frame > 0 { self.preview.current_frame -= 1; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:737:25 [INFO] [stdout] | [INFO] [stdout] 737 | / if !self.import_armed { [INFO] [stdout] 738 | | if !i.pointer.any_down() { self.import_armed = true; } [INFO] [stdout] 739 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 737 ~ if !self.import_armed [INFO] [stdout] 738 ~ && !i.pointer.any_down() { self.import_armed = true; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:604:21 [INFO] [stdout] | [INFO] [stdout] 604 | / if ui.add_enabled(!next_disabled, egui::Button::new("下一帧 →")).clicked() { [INFO] [stdout] 605 | | if self.preview.current_frame + 1 < count { self.preview.current_frame += 1; } [INFO] [stdout] 606 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 604 ~ if ui.add_enabled(!next_disabled, egui::Button::new("下一帧 →")).clicked() [INFO] [stdout] 605 ~ && self.preview.current_frame + 1 < count { self.preview.current_frame += 1; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:744:25 [INFO] [stdout] | [INFO] [stdout] 744 | / if i.pointer.primary_pressed() { [INFO] [stdout] 745 | | if let Some(pos) = i.pointer.interact_pos() { [INFO] [stdout] 746 | | if !gizmo_rect.contains(pos) { clicked_outside_pressed = true; } [INFO] [stdout] 747 | | } [INFO] [stdout] 748 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 744 ~ if i.pointer.primary_pressed() [INFO] [stdout] 745 ~ && let Some(pos) = i.pointer.interact_pos() { [INFO] [stdout] 746 | if !gizmo_rect.contains(pos) { clicked_outside_pressed = true; } [INFO] [stdout] 747 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:745:29 [INFO] [stdout] | [INFO] [stdout] 745 | / ... if let Some(pos) = i.pointer.interact_pos() { [INFO] [stdout] 746 | | ... if !gizmo_rect.contains(pos) { clicked_outside_pressed = true; } [INFO] [stdout] 747 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 745 ~ if let Some(pos) = i.pointer.interact_pos() [INFO] [stdout] 746 ~ && !gizmo_rect.contains(pos) { clicked_outside_pressed = true; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:658:17 [INFO] [stdout] | [INFO] [stdout] 658 | / if let Some(pp) = pointer_pos_opt { if rect.contains(pp) { [INFO] [stdout] 659 | | let pos = response.interact_pointer_pos().unwrap_or(rect.min); [INFO] [stdout] 660 | | let local = (pos - rect.min) / self.scale; [INFO] [stdout] 661 | | let x = local.x.floor() as i32; let y = local.y.floor() as i32; [INFO] [stdout] ... | [INFO] [stdout] 698 | | }} [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 658 ~ if let Some(pp) = pointer_pos_opt && rect.contains(pp) { [INFO] [stdout] 659 | let pos = response.interact_pointer_pos().unwrap_or(rect.min); [INFO] [stdout] ... [INFO] [stdout] 697 | } [INFO] [stdout] 698 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:790:9 [INFO] [stdout] | [INFO] [stdout] 790 | / ... if ctx.input(|i| i.key_pressed(Key::ArrowLeft)) { [INFO] [stdout] 791 | | ... if let Some(shp) = &self.shp { if self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -... [INFO] [stdout] 792 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 790 ~ if ctx.input(|i| i.key_pressed(Key::ArrowLeft)) [INFO] [stdout] 791 ~ && let Some(shp) = &self.shp { if self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:791:13 [INFO] [stdout] | [INFO] [stdout] 791 | ... if let Some(shp) = &self.shp { if self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 791 - if let Some(shp) = &self.shp { if self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } } [INFO] [stdout] 791 + if let Some(shp) = &self.shp && self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/app.rs:791:81 [INFO] [stdout] | [INFO] [stdout] 791 | ..._frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!shp.frames.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:793:9 [INFO] [stdout] | [INFO] [stdout] 793 | / ... if ctx.input(|i| i.key_pressed(Key::ArrowRight)) { [INFO] [stdout] 794 | | ... if let Some(shp) = &self.shp { if self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } } [INFO] [stdout] 795 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 793 ~ if ctx.input(|i| i.key_pressed(Key::ArrowRight)) [INFO] [stdout] 794 ~ && let Some(shp) = &self.shp { if self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:794:13 [INFO] [stdout] | [INFO] [stdout] 794 | if let Some(shp) = &self.shp { if self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 794 - if let Some(shp) = &self.shp { if self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } } [INFO] [stdout] 794 + if let Some(shp) = &self.shp && self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:701:17 [INFO] [stdout] | [INFO] [stdout] 701 | / if self.drawing { if let (Some(s), Some(e)) = (self.draw_start, self.draw_end) { [INFO] [stdout] 702 | | let start = rect.min + egui::vec2(s.x * self.scale, s.y * self.scale); [INFO] [stdout] 703 | | let end = rect.min + egui::vec2(e.x * self.scale, e.y * self.scale); [INFO] [stdout] 704 | | match self.tool { [INFO] [stdout] ... | [INFO] [stdout] 710 | | }} [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 701 ~ if self.drawing && let (Some(s), Some(e)) = (self.draw_start, self.draw_end) { [INFO] [stdout] 702 | let start = rect.min + egui::vec2(s.x * self.scale, s.y * self.scale); [INFO] [stdout] ... [INFO] [stdout] 709 | } [INFO] [stdout] 710 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:816:29 [INFO] [stdout] | [INFO] [stdout] 816 | / ... if let Some(shp) = &self.shp { [INFO] [stdout] 817 | | ... if let Some(path) = FileDialog::new().set_file_name("output.shp").save_file() { [INFO] [stdout] 818 | | ... if let Ok(bytes) = shp.save() { [INFO] [stdout] 819 | | ... let _ = std::fs::write(&path, bytes); [INFO] [stdout] ... | [INFO] [stdout] 823 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 816 ~ if let Some(shp) = &self.shp [INFO] [stdout] 817 ~ && let Some(path) = FileDialog::new().set_file_name("output.shp").save_file() { [INFO] [stdout] 818 | if let Ok(bytes) = shp.save() { [INFO] [stdout] ... [INFO] [stdout] 821 | } [INFO] [stdout] 822 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:817:33 [INFO] [stdout] | [INFO] [stdout] 817 | / ... if let Some(path) = FileDialog::new().set_file_name("output.shp").save_file() { [INFO] [stdout] 818 | | ... if let Ok(bytes) = shp.save() { [INFO] [stdout] 819 | | ... let _ = std::fs::write(&path, bytes); [INFO] [stdout] 820 | | ... self.dirty = false; [INFO] [stdout] 821 | | ... } [INFO] [stdout] 822 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 817 ~ if let Some(path) = FileDialog::new().set_file_name("output.shp").save_file() [INFO] [stdout] 818 ~ && let Ok(bytes) = shp.save() { [INFO] [stdout] 819 | let _ = std::fs::write(&path, bytes); [INFO] [stdout] 820 | self.dirty = false; [INFO] [stdout] 821 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:737:25 [INFO] [stdout] | [INFO] [stdout] 737 | / if !self.import_armed { [INFO] [stdout] 738 | | if !i.pointer.any_down() { self.import_armed = true; } [INFO] [stdout] 739 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 737 ~ if !self.import_armed [INFO] [stdout] 738 ~ && !i.pointer.any_down() { self.import_armed = true; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:744:25 [INFO] [stdout] | [INFO] [stdout] 744 | / if i.pointer.primary_pressed() { [INFO] [stdout] 745 | | if let Some(pos) = i.pointer.interact_pos() { [INFO] [stdout] 746 | | if !gizmo_rect.contains(pos) { clicked_outside_pressed = true; } [INFO] [stdout] 747 | | } [INFO] [stdout] 748 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 744 ~ if i.pointer.primary_pressed() [INFO] [stdout] 745 ~ && let Some(pos) = i.pointer.interact_pos() { [INFO] [stdout] 746 | if !gizmo_rect.contains(pos) { clicked_outside_pressed = true; } [INFO] [stdout] 747 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:745:29 [INFO] [stdout] | [INFO] [stdout] 745 | / ... if let Some(pos) = i.pointer.interact_pos() { [INFO] [stdout] 746 | | ... if !gizmo_rect.contains(pos) { clicked_outside_pressed = true; } [INFO] [stdout] 747 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 745 ~ if let Some(pos) = i.pointer.interact_pos() [INFO] [stdout] 746 ~ && !gizmo_rect.contains(pos) { clicked_outside_pressed = true; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:790:9 [INFO] [stdout] | [INFO] [stdout] 790 | / ... if ctx.input(|i| i.key_pressed(Key::ArrowLeft)) { [INFO] [stdout] 791 | | ... if let Some(shp) = &self.shp { if self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -... [INFO] [stdout] 792 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 790 ~ if ctx.input(|i| i.key_pressed(Key::ArrowLeft)) [INFO] [stdout] 791 ~ && let Some(shp) = &self.shp { if self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:791:13 [INFO] [stdout] | [INFO] [stdout] 791 | ... if let Some(shp) = &self.shp { if self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 791 - if let Some(shp) = &self.shp { if self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } } [INFO] [stdout] 791 + if let Some(shp) = &self.shp && self.preview.current_frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/palette.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | / if ext == "pal" { [INFO] [stdout] 56 | | if let Ok(bytes) = std::fs::read(&p) { [INFO] [stdout] 57 | | if let Ok(pal) = Self::from_bytes(&bytes) { [INFO] [stdout] 58 | | let name = p.file_stem().and_then(|s| s.to_str()).unwrap_or("PAL").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 55 ~ if ext == "pal" [INFO] [stdout] 56 ~ && let Ok(bytes) = std::fs::read(&p) { [INFO] [stdout] 57 | if let Ok(pal) = Self::from_bytes(&bytes) { [INFO] [stdout] ... [INFO] [stdout] 60 | } [INFO] [stdout] 61 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/app.rs:791:81 [INFO] [stdout] | [INFO] [stdout] 791 | ..._frame > 0 && shp.frames.len() > 0 { self.preview.current_frame -= 1; } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!shp.frames.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:793:9 [INFO] [stdout] | [INFO] [stdout] 793 | / ... if ctx.input(|i| i.key_pressed(Key::ArrowRight)) { [INFO] [stdout] 794 | | ... if let Some(shp) = &self.shp { if self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } } [INFO] [stdout] 795 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 793 ~ if ctx.input(|i| i.key_pressed(Key::ArrowRight)) [INFO] [stdout] 794 ~ && let Some(shp) = &self.shp { if self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:794:13 [INFO] [stdout] | [INFO] [stdout] 794 | if let Some(shp) = &self.shp { if self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 794 - if let Some(shp) = &self.shp { if self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } } [INFO] [stdout] 794 + if let Some(shp) = &self.shp && self.preview.current_frame + 1 < shp.frames.len() { self.preview.current_frame += 1; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:816:29 [INFO] [stdout] | [INFO] [stdout] 816 | / ... if let Some(shp) = &self.shp { [INFO] [stdout] 817 | | ... if let Some(path) = FileDialog::new().set_file_name("output.shp").save_file() { [INFO] [stdout] 818 | | ... if let Ok(bytes) = shp.save() { [INFO] [stdout] 819 | | ... let _ = std::fs::write(&path, bytes); [INFO] [stdout] ... | [INFO] [stdout] 823 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 816 ~ if let Some(shp) = &self.shp [INFO] [stdout] 817 ~ && let Some(path) = FileDialog::new().set_file_name("output.shp").save_file() { [INFO] [stdout] 818 | if let Ok(bytes) = shp.save() { [INFO] [stdout] ... [INFO] [stdout] 821 | } [INFO] [stdout] 822 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:817:33 [INFO] [stdout] | [INFO] [stdout] 817 | / ... if let Some(path) = FileDialog::new().set_file_name("output.shp").save_file() { [INFO] [stdout] 818 | | ... if let Ok(bytes) = shp.save() { [INFO] [stdout] 819 | | ... let _ = std::fs::write(&path, bytes); [INFO] [stdout] 820 | | ... self.dirty = false; [INFO] [stdout] 821 | | ... } [INFO] [stdout] 822 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 817 ~ if let Some(path) = FileDialog::new().set_file_name("output.shp").save_file() [INFO] [stdout] 818 ~ && let Ok(bytes) = shp.save() { [INFO] [stdout] 819 | let _ = std::fs::write(&path, bytes); [INFO] [stdout] 820 | self.dirty = false; [INFO] [stdout] 821 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/palette.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | / if let Ok(bytes) = std::fs::read(&p) { [INFO] [stdout] 57 | | if let Ok(pal) = Self::from_bytes(&bytes) { [INFO] [stdout] 58 | | let name = p.file_stem().and_then(|s| s.to_str()).unwrap_or("PAL").to_string(); [INFO] [stdout] 59 | | v.push((name, pal)); [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 56 ~ if let Ok(bytes) = std::fs::read(&p) [INFO] [stdout] 57 ~ && let Ok(pal) = Self::from_bytes(&bytes) { [INFO] [stdout] 58 | let name = p.file_stem().and_then(|s| s.to_str()).unwrap_or("PAL").to_string(); [INFO] [stdout] 59 | v.push((name, pal)); [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/palette.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | / if let Some(file) = EmbeddedPalettes::get(path) { [INFO] [stdout] 81 | | if let Ok(pal) = Palette::from_bytes(file.data.as_ref()) { [INFO] [stdout] 82 | | let p = std::path::Path::new(path); [INFO] [stdout] 83 | | let folder = p.parent().and_then(|s| s.to_str()).unwrap_or("").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 87 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 80 ~ if let Some(file) = EmbeddedPalettes::get(path) [INFO] [stdout] 81 ~ && let Ok(pal) = Palette::from_bytes(file.data.as_ref()) { [INFO] [stdout] 82 | let p = std::path::Path::new(path); [INFO] [stdout] ... [INFO] [stdout] 85 | groups.entry(folder).or_default().push((name, pal)); [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SHP` contains a capitalized acronym [INFO] [stdout] --> src/shp.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct SHP { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Shp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/palette.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | / if ext == "pal" { [INFO] [stdout] 56 | | if let Ok(bytes) = std::fs::read(&p) { [INFO] [stdout] 57 | | if let Ok(pal) = Self::from_bytes(&bytes) { [INFO] [stdout] 58 | | let name = p.file_stem().and_then(|s| s.to_str()).unwrap_or("PAL").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 55 ~ if ext == "pal" [INFO] [stdout] 56 ~ && let Ok(bytes) = std::fs::read(&p) { [INFO] [stdout] 57 | if let Ok(pal) = Self::from_bytes(&bytes) { [INFO] [stdout] ... [INFO] [stdout] 60 | } [INFO] [stdout] 61 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/palette.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | / if let Ok(bytes) = std::fs::read(&p) { [INFO] [stdout] 57 | | if let Ok(pal) = Self::from_bytes(&bytes) { [INFO] [stdout] 58 | | let name = p.file_stem().and_then(|s| s.to_str()).unwrap_or("PAL").to_string(); [INFO] [stdout] 59 | | v.push((name, pal)); [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 56 ~ if let Ok(bytes) = std::fs::read(&p) [INFO] [stdout] 57 ~ && let Ok(pal) = Self::from_bytes(&bytes) { [INFO] [stdout] 58 | let name = p.file_stem().and_then(|s| s.to_str()).unwrap_or("PAL").to_string(); [INFO] [stdout] 59 | v.push((name, pal)); [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/palette.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | / if let Some(file) = EmbeddedPalettes::get(path) { [INFO] [stdout] 81 | | if let Ok(pal) = Palette::from_bytes(file.data.as_ref()) { [INFO] [stdout] 82 | | let p = std::path::Path::new(path); [INFO] [stdout] 83 | | let folder = p.parent().and_then(|s| s.to_str()).unwrap_or("").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 87 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 80 ~ if let Some(file) = EmbeddedPalettes::get(path) [INFO] [stdout] 81 ~ && let Ok(pal) = Palette::from_bytes(file.data.as_ref()) { [INFO] [stdout] 82 | let p = std::path::Path::new(path); [INFO] [stdout] ... [INFO] [stdout] 85 | groups.entry(folder).or_default().push((name, pal)); [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y_abs` is used as a loop counter [INFO] [stdout] --> src/shp.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | for _ in 0..fh.h as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y_abs, _) in (fh.y as usize..).zip((0..fh.h as usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SHP` contains a capitalized acronym [INFO] [stdout] --> src/shp.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct SHP { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Shp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y_abs` is used as a loop counter [INFO] [stdout] --> src/shp.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | for _ in 0..fh.h as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y_abs, _) in (fh.y as usize..).zip((0..fh.h as usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y_abs` is used as a loop counter [INFO] [stdout] --> src/shp.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | for _ in 0..fh.h as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y_abs, _) in (fh.y as usize..).zip((0..fh.h as usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `x_abs` is used as a loop counter [INFO] [stdout] --> src/shp.rs:115:21 [INFO] [stdout] | [INFO] [stdout] 115 | for v in row { [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using: `for (x_abs, v) in (fh.x as usize..).zip(row.into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/shp.rs:142:29 [INFO] [stdout] | [INFO] [stdout] 142 | let mut block = Vec::with_capacity((self.width * self.height) as usize); [INFO] [stdout] | _____________________________^ [INFO] [stdout] 143 | | block.resize((self.width * self.height) as usize, 0); [INFO] [stdout] | |________________________________________________________________^ help: consider replacing this with: `vec![0; (self.width * self.height) as usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y_abs` is used as a loop counter [INFO] [stdout] --> src/shp.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | for _ in 0..fh.h as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y_abs, _) in (fh.y as usize..).zip((0..fh.h as usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `data_offsets` [INFO] [stdout] --> src/shp.rs:175:18 [INFO] [stdout] | [INFO] [stdout] 175 | for i in 0..n { [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 [INFO] [stdout] | [INFO] [stdout] 175 - for i in 0..n { [INFO] [stdout] 175 + for in data_offsets.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y_abs` is used as a loop counter [INFO] [stdout] --> src/shp.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | for _ in 0..fh.h as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y_abs, _) in (fh.y as usize..).zip((0..fh.h as usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y_abs` is used as a loop counter [INFO] [stdout] --> src/shp.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | for _ in 0..fh.h as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y_abs, _) in (fh.y as usize..).zip((0..fh.h as usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `x_abs` is used as a loop counter [INFO] [stdout] --> src/shp.rs:115:21 [INFO] [stdout] | [INFO] [stdout] 115 | for v in row { [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using: `for (x_abs, v) in (fh.x as usize..).zip(row.into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/shp.rs:142:29 [INFO] [stdout] | [INFO] [stdout] 142 | let mut block = Vec::with_capacity((self.width * self.height) as usize); [INFO] [stdout] | _____________________________^ [INFO] [stdout] 143 | | block.resize((self.width * self.height) as usize, 0); [INFO] [stdout] | |________________________________________________________________^ help: consider replacing this with: `vec![0; (self.width * self.height) as usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `data_offsets` [INFO] [stdout] --> src/shp.rs:175:18 [INFO] [stdout] | [INFO] [stdout] 175 | for i in 0..n { [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 [INFO] [stdout] | [INFO] [stdout] 175 - for i in 0..n { [INFO] [stdout] 175 + for in data_offsets.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/shp.rs:287:17 [INFO] [stdout] | [INFO] [stdout] 287 | let b = brightness.max(0.2).min(3.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `brightness.clamp(0.2, 3.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/shp.rs:287:17 [INFO] [stdout] | [INFO] [stdout] 287 | let b = brightness.max(0.2).min(3.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `brightness.clamp(0.2, 3.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 17s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: ashpd v0.8.1 [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" "94bb3f53a005244092f66b0a060bb95cb63133cf2953fddda780664889aab545", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "94bb3f53a005244092f66b0a060bb95cb63133cf2953fddda780664889aab545", kill_on_drop: false }` [INFO] [stdout] 94bb3f53a005244092f66b0a060bb95cb63133cf2953fddda780664889aab545