[INFO] cloning repository https://github.com/pleme-io/shashin [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/pleme-io/shashin" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpleme-io%2Fshashin", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpleme-io%2Fshashin'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0be8169492ce546b8982fa08a8577812855c038f [INFO] linting pleme-io/shashin against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpleme-io%2Fshashin" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/pleme-io/shashin [INFO] finished tweaking git repo https://github.com/pleme-io/shashin [INFO] tweaked toml for git repo https://github.com/pleme-io/shashin written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/pleme-io/shashin 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/pleme-io/shashin 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 git repository `https://github.com/pleme-io/awase` [INFO] [stderr] Updating git repository `https://github.com/pleme-io/egaku` [INFO] [stderr] Updating git repository `https://github.com/pleme-io/garasu` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Updating git repository `https://github.com/pleme-io/kaname` [INFO] [stderr] Updating git repository `https://github.com/pleme-io/madori` [INFO] [stderr] Updating git repository `https://github.com/pleme-io/shikumi` [INFO] [stderr] Updating git repository `https://github.com/pleme-io/soushi` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded wgpu-core-deps-apple v25.0.0 [INFO] [stderr] Downloaded proc-macro-crate v3.5.0 [INFO] [stderr] Downloaded wgpu-core-deps-emscripten v25.0.0 [INFO] [stderr] Downloaded wgpu-core-deps-windows-linux-android v25.0.0 [INFO] [stderr] Downloaded wayland-cursor v0.31.13 [INFO] [stderr] Downloaded toml_datetime v1.0.0+spec-1.1.0 [INFO] [stderr] Downloaded inotify v0.11.1 [INFO] [stderr] Downloaded rhai_codegen v3.1.0 [INFO] [stderr] Downloaded kamadak-exif v0.6.1 [INFO] [stderr] Downloaded toml_edit v0.25.4+spec-1.1.0 [INFO] [stderr] Downloaded wayland-backend v0.3.14 [INFO] [stderr] Downloaded wayland-client v0.31.13 [INFO] [stderr] Downloaded wayland-protocols-plasma v0.3.11 [INFO] [stderr] Downloaded wayland-sys v0.31.10 [INFO] [stderr] Downloaded thin-vec v0.2.14 [INFO] [stderr] Downloaded wayland-protocols v0.32.11 [INFO] [stderr] Downloaded wgpu v25.0.2 [INFO] [stderr] Downloaded wgpu-types v25.0.0 [INFO] [stderr] Downloaded wayland-protocols-wlr v0.3.11 [INFO] [stderr] Downloaded glyphon v0.9.0 [INFO] [stderr] Downloaded rhai v1.24.0 [INFO] [stderr] Downloaded wgpu-core v25.0.2 [INFO] [stderr] Downloaded wgpu-hal v25.0.2 [INFO] [stderr] Downloaded naga v25.0.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 20b350c447bd60085ce9e11b1ddbc57e066e5cffa06290fa99feceb690caf6a9 [INFO] running `Command { std: "docker" "start" "-a" "20b350c447bd60085ce9e11b1ddbc57e066e5cffa06290fa99feceb690caf6a9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "20b350c447bd60085ce9e11b1ddbc57e066e5cffa06290fa99feceb690caf6a9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "20b350c447bd60085ce9e11b1ddbc57e066e5cffa06290fa99feceb690caf6a9", kill_on_drop: false }` [INFO] [stdout] 20b350c447bd60085ce9e11b1ddbc57e066e5cffa06290fa99feceb690caf6a9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 27883107de455a19660307cb16891aa5f5d7bfe2c9f94792c673cb22fac7bd86 [INFO] running `Command { std: "docker" "start" "-a" "27883107de455a19660307cb16891aa5f5d7bfe2c9f94792c673cb22fac7bd86", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling unicode-ident v1.0.24 [INFO] [stderr] Compiling quote v1.0.45 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Compiling portable-atomic v1.13.1 [INFO] [stderr] Compiling libm v0.2.16 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking libloading v0.8.9 [INFO] [stderr] Compiling rustix v1.1.4 [INFO] [stderr] Checking linux-raw-sys v0.12.1 [INFO] [stderr] Compiling zerocopy v0.8.40 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling memchr v2.8.0 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Compiling find-msvc-tools v0.1.9 [INFO] [stderr] Checking pin-project-lite v0.2.17 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling cc v1.2.56 [INFO] [stderr] Compiling wayland-sys v0.31.10 [INFO] [stderr] Checking dlib v0.5.3 [INFO] [stderr] Checking downcast-rs v1.2.1 [INFO] [stderr] Checking scoped-tls v1.0.1 [INFO] [stderr] Compiling quick-xml v0.39.2 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking slab v0.4.12 [INFO] [stderr] Compiling wayland-client v0.31.13 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Compiling crunchy v0.2.4 [INFO] [stderr] Checking unicode-width v0.2.2 [INFO] [stderr] Compiling tiny-keccak v2.0.2 [INFO] [stderr] Compiling zmij v1.0.21 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Compiling naga v25.0.1 [INFO] [stderr] Checking rustc-hash v1.1.0 [INFO] [stderr] Compiling cfg-if v1.0.4 [INFO] [stderr] Checking bit-vec v0.8.0 [INFO] [stderr] Compiling wayland-backend v0.3.14 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling wayland-scanner v0.31.9 [INFO] [stderr] Compiling rayon-core v1.13.0 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Compiling ash v0.38.0+1.3.281 [INFO] [stderr] Checking bit-set v0.8.0 [INFO] [stderr] Checking gpu-descriptor-types v0.2.0 [INFO] [stderr] Checking spirv v0.3.0+sdk-1.3.268.0 [INFO] [stderr] Checking gpu-alloc-types v0.3.0 [INFO] [stderr] Checking codespan-reporting v0.12.0 [INFO] [stderr] Checking memmap2 v0.9.10 [INFO] [stderr] Compiling wgpu-hal v25.0.2 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Checking raw-window-handle v0.6.2 [INFO] [stderr] Checking gpu-alloc v0.6.0 [INFO] [stderr] Compiling getrandom v0.2.17 [INFO] [stderr] Compiling const-random-macro v0.1.16 [INFO] [stderr] Checking gpu-descriptor v0.3.2 [INFO] [stderr] Checking khronos-egl v6.0.0 [INFO] [stderr] Checking ordered-float v4.6.0 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Compiling slotmap v1.1.1 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Compiling proc-macro2-diagnostics v0.10.1 [INFO] [stderr] Compiling anyhow v1.0.102 [INFO] [stderr] Checking glow v0.16.0 [INFO] [stderr] Checking futures-core v0.3.32 [INFO] [stderr] Checking futures-sink v0.3.32 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking const-random v0.1.18 [INFO] [stderr] Compiling wgpu-core v25.0.2 [INFO] [stderr] Checking xkeysym v0.2.1 [INFO] [stderr] Checking adler2 v2.0.1 [INFO] [stderr] Compiling smithay-client-toolkit v0.19.2 [INFO] [stderr] Compiling serde_derive_internals v0.29.1 [INFO] [stderr] Checking cursor-icon v1.2.0 [INFO] [stderr] Compiling litrs v1.0.0 [INFO] [stderr] Checking xcursor v0.3.10 [INFO] [stderr] Checking strict-num v0.1.1 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking roxmltree v0.20.0 [INFO] [stderr] Compiling yansi v1.0.1 [INFO] [stderr] Checking polling v3.11.0 [INFO] [stderr] Checking stable_deref_trait v1.2.1 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Checking as-slice v0.2.1 [INFO] [stderr] Compiling document-features v0.2.12 [INFO] [stderr] Checking fontconfig-parser v0.5.8 [INFO] [stderr] Compiling darling_core v0.23.0 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking tinyvec v1.10.0 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling zerocopy-derive v0.8.40 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Compiling profiling-procmacros v1.0.17 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Checking profiling v1.0.17 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking thiserror v2.0.18 [INFO] [stderr] Compiling equator-macro v0.4.2 [INFO] [stderr] Checking equator v0.4.2 [INFO] [stderr] Checking wgpu-types v25.0.0 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking font-types v0.10.1 [INFO] [stderr] Checking wayland-protocols v0.32.11 [INFO] [stderr] Checking calloop v0.13.0 [INFO] [stderr] Checking read-fonts v0.35.0 [INFO] [stderr] Checking aligned-vec v0.6.4 [INFO] [stderr] Checking v_frame v0.3.9 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking calloop-wayland-source v0.3.0 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking wayland-cursor v0.31.13 [INFO] [stderr] Checking owned_ttf_parser v0.25.1 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking futures-channel v0.3.32 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Compiling wgpu v25.0.2 [INFO] [stderr] Compiling x11-dl v2.21.0 [INFO] [stderr] Compiling uncased v0.9.10 [INFO] [stderr] Checking zeno v0.3.3 [INFO] [stderr] Checking futures-task v0.3.32 [INFO] [stderr] Checking smol_str v0.2.2 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.10 [INFO] [stderr] Checking yazi v0.2.1 [INFO] [stderr] Checking unicode-script v0.5.8 [INFO] [stderr] Checking winnow v0.7.15 [INFO] [stderr] Compiling av-scenechange v0.14.1 [INFO] [stderr] Checking ttf-parser v0.21.1 [INFO] [stderr] Checking unicode-bidi-mirroring v0.2.0 [INFO] [stderr] Compiling ref-cast v1.0.25 [INFO] [stderr] Checking unicode-ccc v0.2.0 [INFO] [stderr] Compiling built v0.8.0 [INFO] [stderr] Checking unicode-properties v0.1.4 [INFO] [stderr] Checking futures-io v0.3.32 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Compiling rav1e v0.8.1 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking ab_glyph v0.2.32 [INFO] [stderr] Checking fontdb v0.16.2 [INFO] [stderr] Checking rustybuzz v0.14.1 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking wayland-protocols-wlr v0.3.11 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking skrifa v0.37.0 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Compiling darling_macro v0.23.0 [INFO] [stderr] Compiling arg_enum_proc_macro v0.3.4 [INFO] [stderr] Compiling ref-cast-impl v1.0.25 [INFO] [stderr] Compiling tokio-macros v2.6.1 [INFO] [stderr] Compiling pear_codegen v0.2.9 [INFO] [stderr] Checking aligned v0.4.3 [INFO] [stderr] Checking gethostname v1.1.0 [INFO] [stderr] Checking euclid v0.22.13 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Checking core2 v0.4.0 [INFO] [stderr] Checking inotify-sys v0.1.5 [INFO] [stderr] Checking socket2 v0.6.3 [INFO] [stderr] Compiling winit v0.30.13 [INFO] [stderr] Compiling smartstring v1.0.1 [INFO] [stderr] Compiling figment v0.10.19 [INFO] [stderr] Checking unicode-bidi v0.3.18 [INFO] [stderr] Checking y4m v0.8.0 [INFO] [stderr] Compiling itoa v1.0.17 [INFO] [stderr] Checking self_cell v1.2.2 [INFO] [stderr] Checking swash v0.2.6 [INFO] [stderr] Checking quick-error v2.0.1 [INFO] [stderr] Checking unicode-linebreak v0.1.5 [INFO] [stderr] Checking x11rb-protocol v0.13.2 [INFO] [stderr] Checking bytes v1.11.1 [INFO] [stderr] Checking unsafe-libyaml v0.2.11 [INFO] [stderr] Compiling pastey v0.1.1 [INFO] [stderr] Checking rangemap v1.7.1 [INFO] [stderr] Checking iana-time-zone v0.1.65 [INFO] [stderr] Checking svg_fmt v0.4.5 [INFO] [stderr] Checking ryu v1.0.23 [INFO] [stderr] Checking sys-locale v0.3.2 [INFO] [stderr] Checking inlinable_string v0.1.15 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking etagere v0.2.15 [INFO] [stderr] Checking pear v0.2.9 [INFO] [stderr] Checking chrono v0.4.44 [INFO] [stderr] Checking tokio v1.50.0 [INFO] [stderr] Checking av1-grain v0.2.5 [INFO] [stderr] Checking inotify v0.11.1 [INFO] [stderr] Checking cosmic-text v0.14.2 [INFO] [stderr] Checking bitstream-io v4.9.0 [INFO] [stderr] Checking sctk-adwaita v0.10.1 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Checking futures-executor v0.3.32 [INFO] [stderr] Compiling darling v0.23.0 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking wayland-protocols-plasma v0.3.11 [INFO] [stderr] Checking maybe-rayon v0.1.1 [INFO] [stderr] Compiling fax_derive v0.2.0 [INFO] [stderr] Compiling schemars_derive v1.2.1 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Checking notify-types v2.1.0 [INFO] [stderr] Compiling simd_helpers v0.1.0 [INFO] [stderr] Checking dpi v0.1.2 [INFO] [stderr] Checking new_debug_unreachable v1.0.6 [INFO] [stderr] Checking regex-syntax v0.8.10 [INFO] [stderr] Checking rustc-hash v2.1.1 [INFO] [stderr] Checking imgref v1.12.0 [INFO] [stderr] Checking weezl v0.1.12 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Compiling rmcp v0.15.0 [INFO] [stderr] Checking zune-core v0.4.12 [INFO] [stderr] Checking zune-jpeg v0.4.21 [INFO] [stderr] Checking schemars v1.2.1 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking loop9 v0.1.5 [INFO] [stderr] Checking notify v8.2.0 [INFO] [stderr] Checking fax v0.2.6 [INFO] [stderr] Checking wgpu-core-deps-windows-linux-android v25.0.0 [INFO] [stderr] Checking futures v0.3.32 [INFO] [stderr] Compiling rmcp-macros v0.15.0 [INFO] [stderr] Compiling schemars_derive v0.8.22 [INFO] [stderr] Compiling rhai_codegen v3.1.0 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking zune-inflate v0.2.54 [INFO] [stderr] Checking fdeflate v0.3.7 [INFO] [stderr] Checking arc-swap v1.8.2 [INFO] [stderr] Checking avif-serialize v0.8.8 [INFO] [stderr] Compiling pastey v0.2.1 [INFO] [stderr] Checking thin-vec v0.2.14 [INFO] [stderr] Checking byteorder-lite v0.1.0 [INFO] [stderr] Checking clap_lex v1.0.0 [INFO] [stderr] Checking pxfm v0.1.28 [INFO] [stderr] Checking lebe v0.5.3 [INFO] [stderr] Checking option-ext v0.2.0 [INFO] [stderr] Checking zune-core v0.5.1 [INFO] [stderr] Checking rgb v0.8.53 [INFO] [stderr] Checking pollster v0.4.0 [INFO] [stderr] Checking clap_builder v4.5.60 [INFO] [stderr] Checking gif v0.14.1 [INFO] [stderr] Checking zune-jpeg v0.5.12 [INFO] [stderr] Checking rhai v1.24.0 [INFO] [stderr] Checking exr v1.74.0 [INFO] [stderr] Checking ravif v0.12.0 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking image-webp v0.2.4 [INFO] [stderr] Checking schemars v0.8.22 [INFO] [stderr] Checking shikumi v0.1.0 (https://github.com/pleme-io/shikumi#9eaa3aa9) [INFO] [stderr] Checking x11rb v0.13.2 [INFO] [stderr] Checking png v0.18.1 [INFO] [stderr] Checking moxcms v0.7.11 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Checking tiff v0.10.3 [INFO] [stderr] Checking egaku v0.1.0 (https://github.com/pleme-io/egaku#723d7ff6) [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Compiling clap_derive v4.5.55 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking mutate_once v0.1.2 [INFO] [stderr] Checking nu-ansi-term v0.50.3 [INFO] [stderr] Checking kamadak-exif v0.6.1 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Checking glyphon v0.9.0 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking awase v0.1.0 (https://github.com/pleme-io/awase#ec6176f4) [INFO] [stderr] Checking tempfile v3.26.0 [INFO] [stderr] Checking clap v4.5.60 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking garasu v0.1.0 (https://github.com/pleme-io/garasu#817413ab) [INFO] [stderr] Checking kaname v0.1.0 (https://github.com/pleme-io/kaname#b4191107) [INFO] [stderr] Checking madori v0.1.0 (https://github.com/pleme-io/madori#f1d91bf6) [INFO] [stderr] Checking soushi v0.1.0 (https://github.com/pleme-io/soushi#a63a224c) [INFO] [stderr] Checking shashin v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: binding's name is too similar to existing binding [INFO] [stdout] --> src/input.rs:170:49 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] note: existing binding defined here [INFO] [stdout] --> src/input.rs:170:31 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names [INFO] [stdout] = note: `-W clippy::similar-names` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::similar_names)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | KeyCode::Char('h') | KeyCode::Char('H') => Action::FlipHorizontal, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] = note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnested_or_patterns)]` [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 182 - KeyCode::Char('h') | KeyCode::Char('H') => Action::FlipHorizontal, [INFO] [stdout] 182 + KeyCode::Char('h' | 'H') => Action::FlipHorizontal, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | KeyCode::Char('j') | KeyCode::Char('n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 205 - KeyCode::Char('j') | KeyCode::Char('n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] 205 + KeyCode::Char('j' | 'n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | KeyCode::Char('k') | KeyCode::Char('p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 206 - KeyCode::Char('k') | KeyCode::Char('p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] 206 + KeyCode::Char('k' | 'p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | KeyCode::Char('+') | KeyCode::Char('=') => Action::ZoomIn, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 209 - KeyCode::Char('+') | KeyCode::Char('=') => Action::ZoomIn, [INFO] [stdout] 209 + KeyCode::Char('+' | '=') => Action::ZoomIn, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binding's name is too similar to existing binding [INFO] [stdout] --> src/input.rs:170:49 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] note: existing binding defined here [INFO] [stdout] --> src/input.rs:170:31 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names [INFO] [stdout] = note: `-W clippy::similar-names` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::similar_names)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | KeyCode::Char('h') | KeyCode::Char('H') => Action::FlipHorizontal, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] = note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnested_or_patterns)]` [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 182 - KeyCode::Char('h') | KeyCode::Char('H') => Action::FlipHorizontal, [INFO] [stdout] 182 + KeyCode::Char('h' | 'H') => Action::FlipHorizontal, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | KeyCode::Char('j') | KeyCode::Char('n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 205 - KeyCode::Char('j') | KeyCode::Char('n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] 205 + KeyCode::Char('j' | 'n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | KeyCode::Char('k') | KeyCode::Char('p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 206 - KeyCode::Char('k') | KeyCode::Char('p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] 206 + KeyCode::Char('k' | 'p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | KeyCode::Char('+') | KeyCode::Char('=') => Action::ZoomIn, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 209 - KeyCode::Char('+') | KeyCode::Char('=') => Action::ZoomIn, [INFO] [stdout] 209 + KeyCode::Char('+' | '=') => Action::ZoomIn, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / impl Default for ShashinConfig { [INFO] [stdout] 22 | | fn default() -> Self { [INFO] [stdout] 23 | | Self { [INFO] [stdout] 24 | | viewer: ViewerConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 12 + #[derive(Default)] [INFO] [stdout] 13 | pub struct ShashinConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:46:1 [INFO] [stdout] | [INFO] [stdout] 46 | / impl Default for FitMode { [INFO] [stdout] 47 | | fn default() -> Self { [INFO] [stdout] 48 | | Self::Fit [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 37 + #[derive(Default)] [INFO] [stdout] 38 | pub enum FitMode { [INFO] [stdout] 39 | /// Scale image to fit entirely within the window (letterbox). [INFO] [stdout] 40 ~ #[default] [INFO] [stdout] 41 ~ Fit, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:90:1 [INFO] [stdout] | [INFO] [stdout] 90 | / impl Default for SortOrder { [INFO] [stdout] 91 | | fn default() -> Self { [INFO] [stdout] 92 | | Self::Name [INFO] [stdout] 93 | | } [INFO] [stdout] 94 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 83 + #[derive(Default)] [INFO] [stdout] 84 | pub enum SortOrder { [INFO] [stdout] 85 ~ #[default] [INFO] [stdout] 86 ~ Name, [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/config.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | / match shikumi::ConfigDiscovery::new("shashin") [INFO] [stdout] 220 | | .env_override("SHASHIN_CONFIG") [INFO] [stdout] 221 | | .discover() [INFO] [stdout] ... | [INFO] [stdout] 238 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else [INFO] [stdout] = note: `-W clippy::single-match-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::single_match_else)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 219 ~ if let Ok(path) = shikumi::ConfigDiscovery::new("shashin") [INFO] [stdout] 220 + .env_override("SHASHIN_CONFIG") [INFO] [stdout] 221 + .discover() { [INFO] [stdout] 222 + tracing::info!("loading config from {}", path.display()); [INFO] [stdout] 223 + let store = shikumi::ConfigStore::::load(&path, "SHASHIN_") [INFO] [stdout] 224 + .unwrap_or_else(|e| { [INFO] [stdout] 225 + tracing::warn!("failed to load config: {e}, using defaults"); [INFO] [stdout] 226 + let tmp = std::env::temp_dir().join("shashin-default.yaml"); [INFO] [stdout] 227 + std::fs::write(&tmp, "{}").ok(); [INFO] [stdout] 228 + shikumi::ConfigStore::load(&tmp, "SHASHIN_").unwrap() [INFO] [stdout] 229 + }); [INFO] [stdout] 230 + ShashinConfig::clone(&store.get()) [INFO] [stdout] 231 + } else { [INFO] [stdout] 232 + tracing::info!("no config file found, using defaults"); [INFO] [stdout] 233 + ShashinConfig::default() [INFO] [stdout] 234 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: assigning the result of `ToOwned::to_owned()` may be inefficient [INFO] [stdout] --> src/gallery.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | self.directory = dir.to_owned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `dir.clone_into(&mut self.directory)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones [INFO] [stdout] = note: `-W clippy::assigning-clones` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::assigning_clones)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/gallery.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | / if let Some(ext) = ext { [INFO] [stdout] 114 | | if IMAGE_EXTENSIONS.contains(&ext.as_str()) { [INFO] [stdout] 115 | | let metadata = entry.metadata().ok(); [INFO] [stdout] 116 | | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] ... | [INFO] [stdout] 136 | | } [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] 113 ~ if let Some(ext) = ext [INFO] [stdout] 114 ~ && IMAGE_EXTENSIONS.contains(&ext.as_str()) { [INFO] [stdout] 115 | let metadata = entry.metadata().ok(); [INFO] [stdout] ... [INFO] [stdout] 134 | }); [INFO] [stdout] 135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/gallery.rs:116:60 [INFO] [stdout] | [INFO] [stdout] 116 | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] = note: `-W clippy::redundant-closure-for-method-calls` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_closure_for_method_calls)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/gallery.rs:124:38 [INFO] [stdout] | [INFO] [stdout] 124 | .map_or_else(|| String::new(), |n| n.to_string_lossy().into_owned()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/gallery.rs:149:32 [INFO] [stdout] | [INFO] [stdout] 149 | SortOrder::Date => self.entries.sort_by(|a, b| a.modified.cmp(&b.modified)), [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] 149 - SortOrder::Date => self.entries.sort_by(|a, b| a.modified.cmp(&b.modified)), [INFO] [stdout] 149 + SortOrder::Date => self.entries.sort_by_key(|a| a.modified), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/gallery.rs:150:32 [INFO] [stdout] | [INFO] [stdout] 150 | SortOrder::Size => self.entries.sort_by(|a, b| a.size.cmp(&b.size)), [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] help: try [INFO] [stdout] | [INFO] [stdout] 150 - SortOrder::Size => self.entries.sort_by(|a, b| a.size.cmp(&b.size)), [INFO] [stdout] 150 + SortOrder::Size => self.entries.sort_by_key(|a| a.size), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/gallery.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | / if let Some(idx) = self.actual_index(self.selected) { [INFO] [stdout] 288 | | if let Some(entry) = self.entries.get_mut(idx) { [INFO] [stdout] 289 | | entry.marked = !entry.marked; [INFO] [stdout] 290 | | } [INFO] [stdout] 291 | | } [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] 287 ~ if let Some(idx) = self.actual_index(self.selected) [INFO] [stdout] 288 ~ && let Some(entry) = self.entries.get_mut(idx) { [INFO] [stdout] 289 | entry.marked = !entry.marked; [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual checked division [INFO] [stdout] --> src/gallery.rs:307:12 [INFO] [stdout] | [INFO] [stdout] 307 | if cell_size > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ check performed here [INFO] [stdout] 308 | self.columns = (window_width / cell_size).max(1) as usize; [INFO] [stdout] | -------------------------- division performed here [INFO] [stdout] 309 | self.visible_rows = (window_height / cell_size).max(1) as usize; [INFO] [stdout] | --------------------------- ... and here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/input.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / impl Default for Mode { [INFO] [stdout] 21 | | fn default() -> Self { [INFO] [stdout] 22 | | Self::Viewer [INFO] [stdout] 23 | | } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub enum Mode { [INFO] [stdout] 13 | /// Viewing a single image. [INFO] [stdout] 14 ~ #[default] [INFO] [stdout] 15 ~ Viewer, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:78:22 [INFO] [stdout] | [INFO] [stdout] 78 | fn to_awase_key(key: &KeyCode) -> Option { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] = note: `-W clippy::trivially-copy-pass-by-ref` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::trivially_copy_pass_by_ref)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard matches only a single variant and will also match any future added variants [INFO] [stdout] --> src/input.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | _ => Option::None, [INFO] [stdout] | ^ help: try: `KeyCode::Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants [INFO] [stdout] = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | fn to_awase_modifiers(mods: &Modifiers) -> awase::Modifiers { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | result = result | awase::Modifiers::CTRL; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::CTRL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | result = result | awase::Modifiers::ALT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::ALT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | result = result | awase::Modifiers::SHIFT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::SHIFT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | result = result | awase::Modifiers::CMD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::CMD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:178:24 [INFO] [stdout] | [INFO] [stdout] 178 | fn map_viewer_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:178:40 [INFO] [stdout] | [INFO] [stdout] 178 | fn map_viewer_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (2 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:239:32 [INFO] [stdout] | [INFO] [stdout] 239 | fn match_viewer_hotkey(hotkey: &awase::Hotkey) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider passing by value instead: `awase::Hotkey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | fn map_gallery_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:257:41 [INFO] [stdout] | [INFO] [stdout] 257 | fn map_gallery_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/input.rs:282:9 [INFO] [stdout] | [INFO] [stdout] 282 | KeyCode::Char('g') => Action::FirstImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] = note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_same_arms)]` [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 282 ~ KeyCode::Char('g') | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] 284 ~ KeyCode::End => Action::LastImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/input.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 285 | KeyCode::End => Action::LastImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 283 ~ KeyCode::Char('G') | KeyCode::End => Action::LastImage, [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 285 ~ // Back to viewer [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcp.rs:171:61 [INFO] [stdout] | [INFO] [stdout] 171 | ... "size_bytes": meta.as_ref().map(|m| m.len()), [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcp.rs:201:50 [INFO] [stdout] | [INFO] [stdout] 201 | "size_bytes": file_meta.as_ref().map(|m| m.len()), [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method could have a `#[must_use]` attribute [INFO] [stdout] --> src/metadata.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn from_file(path: &Path) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate [INFO] [stdout] = note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]` [INFO] [stdout] help: add the attribute [INFO] [stdout] | [INFO] [stdout] 56 ~ #[must_use] [INFO] [stdout] 57 ~ pub fn from_file(path: &Path) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/metadata.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | meta.camera_make = get_string_field(&exif, exif::Tag::Make); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `metadata::ImageMetadata { camera_make: get_string_field(&exif, exif::Tag::Make), camera_model: get_string_field(&exif, exif::Tag::Model), lens_model: get_string_field(&exif, exif::Tag::LensModel), focal_length: get_rational_field(&exif, exif::Tag::FocalLength) [INFO] [stdout] .map(|v| format!("{v:.1} mm")), aperture: get_rational_field(&exif, exif::Tag::FNumber) [INFO] [stdout] .map(|v| format!("f/{v:.1}")), shutter_speed: get_shutter_speed(&exif), iso: exif [INFO] [stdout] .get_field(exif::Tag::PhotographicSensitivity, exif::In::PRIMARY) [INFO] [stdout] .map(|f| f.display_value().to_string()), date_taken: get_string_field(&exif, exif::Tag::DateTimeOriginal), orientation: exif [INFO] [stdout] .get_field(exif::Tag::Orientation, exif::In::PRIMARY) [INFO] [stdout] .and_then(|f| match &f.value { [INFO] [stdout] exif::Value::Short(v) => v.first().map(|&x| u32::from(x)), [INFO] [stdout] _ => None, [INFO] [stdout] }), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/metadata.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let mut meta = Self::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method could have a `#[must_use]` attribute [INFO] [stdout] --> src/metadata.rs:283:12 [INFO] [stdout] | [INFO] [stdout] 283 | pub fn from_path(path: &Path, width: u32, height: u32, format: &str) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate [INFO] [stdout] help: add the attribute [INFO] [stdout] | [INFO] [stdout] 283 ~ #[must_use] [INFO] [stdout] 284 ~ pub fn from_path(path: &Path, width: u32, height: u32, format: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/metadata.rs:289:48 [INFO] [stdout] | [INFO] [stdout] 289 | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/metadata.rs:315:31 [INFO] [stdout] | [INFO] [stdout] 315 | /// Format dimensions as "WxH". [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 315 - /// Format dimensions as "WxH". [INFO] [stdout] 315 + /// Format dimensions as "`WxH`". [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:345:29 [INFO] [stdout] | [INFO] [stdout] 345 | format!("{:.1} GB", bytes as f64 / GB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] = note: `-W clippy::cast-precision-loss` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_precision_loss)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:345:44 [INFO] [stdout] | [INFO] [stdout] 345 | format!("{:.1} GB", bytes as f64 / GB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:347:29 [INFO] [stdout] | [INFO] [stdout] 347 | format!("{:.1} MB", bytes as f64 / MB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:347:44 [INFO] [stdout] | [INFO] [stdout] 347 | format!("{:.1} MB", bytes as f64 / MB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:349:29 [INFO] [stdout] | [INFO] [stdout] 349 | format!("{:.1} KB", bytes as f64 / KB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:349:44 [INFO] [stdout] | [INFO] [stdout] 349 | format!("{:.1} KB", bytes as f64 / KB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:6 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `y.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:20 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `!y.is_multiple_of(100)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:37 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `y.is_multiple_of(400)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function could have a `#[must_use]` attribute [INFO] [stdout] --> src/platform/mod.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn create_capture() -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate [INFO] [stdout] help: add the attribute [INFO] [stdout] | [INFO] [stdout] 57 + #[must_use] [INFO] [stdout] 58 | pub fn create_capture() -> Box { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:21 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [`offset_x`, offset_y, scale_x, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:31 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, `offset_y`, scale_x, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:41 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, offset_y, `scale_x`, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:50 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, offset_y, scale_x, `scale_y`] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 191 | / if let Some(ref layout) = self.bind_group_layout { [INFO] [stdout] 192 | | if let Some(ref sampler) = self.sampler { [INFO] [stdout] 193 | | let bind_group = gpu.device.create_bind_group(&wgpu::BindGroupDescriptor { [INFO] [stdout] 194 | | label: Some("shashin_image_bind_group"), [INFO] [stdout] ... | [INFO] [stdout] 209 | | } [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] 191 ~ if let Some(ref layout) = self.bind_group_layout [INFO] [stdout] 192 ~ && let Some(ref sampler) = self.sampler { [INFO] [stdout] 193 | let bind_group = gpu.device.create_bind_group(&wgpu::BindGroupDescriptor { [INFO] [stdout] ... [INFO] [stdout] 207 | self.image_bind_group = Some(bind_group); [INFO] [stdout] 208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (156/100) [INFO] [stdout] --> src/render.rs:226:5 [INFO] [stdout] | [INFO] [stdout] 226 | fn init_pipeline(&mut self, gpu: &GpuContext, format: wgpu::TextureFormat) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] = note: `-W clippy::too-many-lines` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::too_many_lines)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `PipelineCompilationOptions::default()` is more clear than this expression [INFO] [stdout] --> src/render.rs:322:46 [INFO] [stdout] | [INFO] [stdout] 322 | compilation_options: Default::default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `PipelineCompilationOptions::default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access [INFO] [stdout] = note: `-W clippy::default-trait-access` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::default_trait_access)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `PipelineCompilationOptions::default()` is more clear than this expression [INFO] [stdout] --> src/render.rs:332:46 [INFO] [stdout] | [INFO] [stdout] 332 | compilation_options: Default::default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `PipelineCompilationOptions::default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/render.rs:362:19 [INFO] [stdout] | [INFO] [stdout] 362 | size: (vertices.len() * std::mem::size_of::()) as u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(vertices)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:416:21 [INFO] [stdout] | [INFO] [stdout] 416 | let win_w = self.viewer.window_width as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:417:21 [INFO] [stdout] | [INFO] [stdout] 417 | let win_h = self.viewer.window_height as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:424:24 [INFO] [stdout] | [INFO] [stdout] 424 | let scale_x = (rw as f32 * view.zoom) / win_w; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:425:24 [INFO] [stdout] | [INFO] [stdout] 425 | let scale_y = (rh as f32 * view.zoom) / win_h; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:480:66 [INFO] [stdout] | [INFO] [stdout] 480 | buffer.set_size(&mut text.font_system, Some(350.0), Some(height as f32)); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:485:19 [INFO] [stdout] | [INFO] [stdout] 485 | left: (width as f32) - 370.0, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:489:23 [INFO] [stdout] | [INFO] [stdout] 489 | left: (width as i32) - 370, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] = note: `-W clippy::cast-possible-wrap` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_possible_wrap)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:491:24 [INFO] [stdout] | [INFO] [stdout] 491 | right: width as i32 - 10, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:492:25 [INFO] [stdout] | [INFO] [stdout] 492 | bottom: height as i32 - 10, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `height.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / impl Default for ShashinConfig { [INFO] [stdout] 22 | | fn default() -> Self { [INFO] [stdout] 23 | | Self { [INFO] [stdout] 24 | | viewer: ViewerConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 12 + #[derive(Default)] [INFO] [stdout] 13 | pub struct ShashinConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:552:18 [INFO] [stdout] | [INFO] [stdout] 552 | Some(width as f32), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:562:18 [INFO] [stdout] | [INFO] [stdout] 562 | top: bar_y as f32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:566:22 [INFO] [stdout] | [INFO] [stdout] 566 | top: bar_y as i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `bar_y.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:567:24 [INFO] [stdout] | [INFO] [stdout] 567 | right: width as i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:568:25 [INFO] [stdout] | [INFO] [stdout] 568 | bottom: height as i32, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `height.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (121/100) [INFO] [stdout] --> src/render.rs:597:5 [INFO] [stdout] | [INFO] [stdout] 597 | fn render(&mut self, ctx: &mut RenderContext<'_>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render.rs:637:9 [INFO] [stdout] | [INFO] [stdout] 637 | / if matches!(self.mode, Mode::Viewer | Mode::Slideshow) { [INFO] [stdout] 638 | | if let ( [INFO] [stdout] 639 | | Some(pipeline), [INFO] [stdout] 640 | | Some(bind_group), [INFO] [stdout] ... | [INFO] [stdout] 673 | | } [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] 637 ~ if matches!(self.mode, Mode::Viewer | Mode::Slideshow) [INFO] [stdout] 638 ~ && let ( [INFO] [stdout] 639 | Some(pipeline), [INFO] [stdout] ... [INFO] [stdout] 671 | pass.draw(0..6, 0..1); [INFO] [stdout] 672 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:46:1 [INFO] [stdout] | [INFO] [stdout] 46 | / impl Default for FitMode { [INFO] [stdout] 47 | | fn default() -> Self { [INFO] [stdout] 48 | | Self::Fit [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 37 + #[derive(Default)] [INFO] [stdout] 38 | pub enum FitMode { [INFO] [stdout] 39 | /// Scale image to fit entirely within the window (letterbox). [INFO] [stdout] 40 ~ #[default] [INFO] [stdout] 41 ~ Fit, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:808:33 [INFO] [stdout] | [INFO] [stdout] 808 | /// Parse a hex color string to wgpu::Color. [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 808 - /// Parse a hex color string to wgpu::Color. [INFO] [stdout] 808 + /// Parse a hex color string to `wgpu::Color`. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:90:1 [INFO] [stdout] | [INFO] [stdout] 90 | / impl Default for SortOrder { [INFO] [stdout] 91 | | fn default() -> Self { [INFO] [stdout] 92 | | Self::Name [INFO] [stdout] 93 | | } [INFO] [stdout] 94 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 83 + #[derive(Default)] [INFO] [stdout] 84 | pub enum SortOrder { [INFO] [stdout] 85 ~ #[default] [INFO] [stdout] 86 ~ Name, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/viewer.rs:71:1 [INFO] [stdout] | [INFO] [stdout] 71 | / impl Default for Flip { [INFO] [stdout] 72 | | fn default() -> Self { [INFO] [stdout] 73 | | Self { [INFO] [stdout] 74 | | horizontal: false, [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 66 + #[derive(Default)] [INFO] [stdout] 67 | pub struct Flip { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:129:18 [INFO] [stdout] | [INFO] [stdout] 129 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:129:33 [INFO] [stdout] | [INFO] [stdout] 129 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:130:18 [INFO] [stdout] | [INFO] [stdout] 130 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:130:33 [INFO] [stdout] | [INFO] [stdout] 130 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:140:18 [INFO] [stdout] | [INFO] [stdout] 140 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:140:33 [INFO] [stdout] | [INFO] [stdout] 140 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:141:18 [INFO] [stdout] | [INFO] [stdout] 141 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:141:33 [INFO] [stdout] | [INFO] [stdout] 141 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:206:25 [INFO] [stdout] | [INFO] [stdout] 206 | let display_w = rw as f32 * self.zoom; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:207:25 [INFO] [stdout] | [INFO] [stdout] 207 | let display_h = rh as f32 * self.zoom; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | let x = (win_w as f32 - display_w) / 2.0 + self.pan_x; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:209:18 [INFO] [stdout] | [INFO] [stdout] 209 | let y = (win_h as f32 - display_h) / 2.0 + self.pan_y; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map().unwrap_or_else()` on a `Result` value [INFO] [stdout] --> src/viewer.rs:233:18 [INFO] [stdout] | [INFO] [stdout] 233 | let format = image::ImageFormat::from_path(path) [INFO] [stdout] | __________________^ [INFO] [stdout] 234 | | .map(|f| format!("{f:?}")) [INFO] [stdout] 235 | | .unwrap_or_else(|_| "Unknown".into()); [INFO] [stdout] | |_____________________________________________^ help: try: `image::ImageFormat::from_path(path).map_or_else(|_| "Unknown".into(), |f| format!("{f:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] = note: `-W clippy::map-unwrap-or` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::map_unwrap_or)]` [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/config.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | / match shikumi::ConfigDiscovery::new("shashin") [INFO] [stdout] 220 | | .env_override("SHASHIN_CONFIG") [INFO] [stdout] 221 | | .discover() [INFO] [stdout] ... | [INFO] [stdout] 238 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else [INFO] [stdout] = note: `-W clippy::single-match-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::single_match_else)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 219 ~ if let Ok(path) = shikumi::ConfigDiscovery::new("shashin") [INFO] [stdout] 220 + .env_override("SHASHIN_CONFIG") [INFO] [stdout] 221 + .discover() { [INFO] [stdout] 222 + tracing::info!("loading config from {}", path.display()); [INFO] [stdout] 223 + let store = shikumi::ConfigStore::::load(&path, "SHASHIN_") [INFO] [stdout] 224 + .unwrap_or_else(|e| { [INFO] [stdout] 225 + tracing::warn!("failed to load config: {e}, using defaults"); [INFO] [stdout] 226 + let tmp = std::env::temp_dir().join("shashin-default.yaml"); [INFO] [stdout] 227 + std::fs::write(&tmp, "{}").ok(); [INFO] [stdout] 228 + shikumi::ConfigStore::load(&tmp, "SHASHIN_").unwrap() [INFO] [stdout] 229 + }); [INFO] [stdout] 230 + ShashinConfig::clone(&store.get()) [INFO] [stdout] 231 + } else { [INFO] [stdout] 232 + tracing::info!("no config file found, using defaults"); [INFO] [stdout] 233 + ShashinConfig::default() [INFO] [stdout] 234 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: assigning the result of `ToOwned::to_owned()` may be inefficient [INFO] [stdout] --> src/gallery.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | self.directory = dir.to_owned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `dir.clone_into(&mut self.directory)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones [INFO] [stdout] = note: `-W clippy::assigning-clones` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::assigning_clones)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/gallery.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | / if let Some(ext) = ext { [INFO] [stdout] 114 | | if IMAGE_EXTENSIONS.contains(&ext.as_str()) { [INFO] [stdout] 115 | | let metadata = entry.metadata().ok(); [INFO] [stdout] 116 | | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] ... | [INFO] [stdout] 136 | | } [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] 113 ~ if let Some(ext) = ext [INFO] [stdout] 114 ~ && IMAGE_EXTENSIONS.contains(&ext.as_str()) { [INFO] [stdout] 115 | let metadata = entry.metadata().ok(); [INFO] [stdout] ... [INFO] [stdout] 134 | }); [INFO] [stdout] 135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/gallery.rs:116:60 [INFO] [stdout] | [INFO] [stdout] 116 | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] = note: `-W clippy::redundant-closure-for-method-calls` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_closure_for_method_calls)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/gallery.rs:124:38 [INFO] [stdout] | [INFO] [stdout] 124 | .map_or_else(|| String::new(), |n| n.to_string_lossy().into_owned()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/gallery.rs:149:32 [INFO] [stdout] | [INFO] [stdout] 149 | SortOrder::Date => self.entries.sort_by(|a, b| a.modified.cmp(&b.modified)), [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] 149 - SortOrder::Date => self.entries.sort_by(|a, b| a.modified.cmp(&b.modified)), [INFO] [stdout] 149 + SortOrder::Date => self.entries.sort_by_key(|a| a.modified), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/gallery.rs:150:32 [INFO] [stdout] | [INFO] [stdout] 150 | SortOrder::Size => self.entries.sort_by(|a, b| a.size.cmp(&b.size)), [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] help: try [INFO] [stdout] | [INFO] [stdout] 150 - SortOrder::Size => self.entries.sort_by(|a, b| a.size.cmp(&b.size)), [INFO] [stdout] 150 + SortOrder::Size => self.entries.sort_by_key(|a| a.size), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/gallery.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | / if let Some(idx) = self.actual_index(self.selected) { [INFO] [stdout] 288 | | if let Some(entry) = self.entries.get_mut(idx) { [INFO] [stdout] 289 | | entry.marked = !entry.marked; [INFO] [stdout] 290 | | } [INFO] [stdout] 291 | | } [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] 287 ~ if let Some(idx) = self.actual_index(self.selected) [INFO] [stdout] 288 ~ && let Some(entry) = self.entries.get_mut(idx) { [INFO] [stdout] 289 | entry.marked = !entry.marked; [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual checked division [INFO] [stdout] --> src/gallery.rs:307:12 [INFO] [stdout] | [INFO] [stdout] 307 | if cell_size > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ check performed here [INFO] [stdout] 308 | self.columns = (window_width / cell_size).max(1) as usize; [INFO] [stdout] | -------------------------- division performed here [INFO] [stdout] 309 | self.visible_rows = (window_height / cell_size).max(1) as usize; [INFO] [stdout] | --------------------------- ... and here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/input.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / impl Default for Mode { [INFO] [stdout] 21 | | fn default() -> Self { [INFO] [stdout] 22 | | Self::Viewer [INFO] [stdout] 23 | | } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub enum Mode { [INFO] [stdout] 13 | /// Viewing a single image. [INFO] [stdout] 14 ~ #[default] [INFO] [stdout] 15 ~ Viewer, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:78:22 [INFO] [stdout] | [INFO] [stdout] 78 | fn to_awase_key(key: &KeyCode) -> Option { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] = note: `-W clippy::trivially-copy-pass-by-ref` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::trivially_copy_pass_by_ref)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard matches only a single variant and will also match any future added variants [INFO] [stdout] --> src/input.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | _ => Option::None, [INFO] [stdout] | ^ help: try: `KeyCode::Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants [INFO] [stdout] = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | fn to_awase_modifiers(mods: &Modifiers) -> awase::Modifiers { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | result = result | awase::Modifiers::CTRL; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::CTRL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | result = result | awase::Modifiers::ALT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::ALT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | result = result | awase::Modifiers::SHIFT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::SHIFT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | result = result | awase::Modifiers::CMD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::CMD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:178:24 [INFO] [stdout] | [INFO] [stdout] 178 | fn map_viewer_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:178:40 [INFO] [stdout] | [INFO] [stdout] 178 | fn map_viewer_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (2 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:239:32 [INFO] [stdout] | [INFO] [stdout] 239 | fn match_viewer_hotkey(hotkey: &awase::Hotkey) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider passing by value instead: `awase::Hotkey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | fn map_gallery_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:257:41 [INFO] [stdout] | [INFO] [stdout] 257 | fn map_gallery_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/input.rs:282:9 [INFO] [stdout] | [INFO] [stdout] 282 | KeyCode::Char('g') => Action::FirstImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] = note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_same_arms)]` [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 282 ~ KeyCode::Char('g') | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] 284 ~ KeyCode::End => Action::LastImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/input.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 285 | KeyCode::End => Action::LastImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 283 ~ KeyCode::Char('G') | KeyCode::End => Action::LastImage, [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 285 ~ // Back to viewer [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcp.rs:171:61 [INFO] [stdout] | [INFO] [stdout] 171 | ... "size_bytes": meta.as_ref().map(|m| m.len()), [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcp.rs:201:50 [INFO] [stdout] | [INFO] [stdout] 201 | "size_bytes": file_meta.as_ref().map(|m| m.len()), [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method could have a `#[must_use]` attribute [INFO] [stdout] --> src/metadata.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn from_file(path: &Path) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate [INFO] [stdout] = note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]` [INFO] [stdout] help: add the attribute [INFO] [stdout] | [INFO] [stdout] 56 ~ #[must_use] [INFO] [stdout] 57 ~ pub fn from_file(path: &Path) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/metadata.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | meta.camera_make = get_string_field(&exif, exif::Tag::Make); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `metadata::ImageMetadata { camera_make: get_string_field(&exif, exif::Tag::Make), camera_model: get_string_field(&exif, exif::Tag::Model), lens_model: get_string_field(&exif, exif::Tag::LensModel), focal_length: get_rational_field(&exif, exif::Tag::FocalLength) [INFO] [stdout] .map(|v| format!("{v:.1} mm")), aperture: get_rational_field(&exif, exif::Tag::FNumber) [INFO] [stdout] .map(|v| format!("f/{v:.1}")), shutter_speed: get_shutter_speed(&exif), iso: exif [INFO] [stdout] .get_field(exif::Tag::PhotographicSensitivity, exif::In::PRIMARY) [INFO] [stdout] .map(|f| f.display_value().to_string()), date_taken: get_string_field(&exif, exif::Tag::DateTimeOriginal), orientation: exif [INFO] [stdout] .get_field(exif::Tag::Orientation, exif::In::PRIMARY) [INFO] [stdout] .and_then(|f| match &f.value { [INFO] [stdout] exif::Value::Short(v) => v.first().map(|&x| u32::from(x)), [INFO] [stdout] _ => None, [INFO] [stdout] }), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/metadata.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let mut meta = Self::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method could have a `#[must_use]` attribute [INFO] [stdout] --> src/metadata.rs:283:12 [INFO] [stdout] | [INFO] [stdout] 283 | pub fn from_path(path: &Path, width: u32, height: u32, format: &str) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate [INFO] [stdout] help: add the attribute [INFO] [stdout] | [INFO] [stdout] 283 ~ #[must_use] [INFO] [stdout] 284 ~ pub fn from_path(path: &Path, width: u32, height: u32, format: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/metadata.rs:289:48 [INFO] [stdout] | [INFO] [stdout] 289 | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/metadata.rs:315:31 [INFO] [stdout] | [INFO] [stdout] 315 | /// Format dimensions as "WxH". [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 315 - /// Format dimensions as "WxH". [INFO] [stdout] 315 + /// Format dimensions as "`WxH`". [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:345:29 [INFO] [stdout] | [INFO] [stdout] 345 | format!("{:.1} GB", bytes as f64 / GB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] = note: `-W clippy::cast-precision-loss` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_precision_loss)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:345:44 [INFO] [stdout] | [INFO] [stdout] 345 | format!("{:.1} GB", bytes as f64 / GB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:347:29 [INFO] [stdout] | [INFO] [stdout] 347 | format!("{:.1} MB", bytes as f64 / MB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:347:44 [INFO] [stdout] | [INFO] [stdout] 347 | format!("{:.1} MB", bytes as f64 / MB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:349:29 [INFO] [stdout] | [INFO] [stdout] 349 | format!("{:.1} KB", bytes as f64 / KB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:349:44 [INFO] [stdout] | [INFO] [stdout] 349 | format!("{:.1} KB", bytes as f64 / KB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:6 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `y.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:20 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `!y.is_multiple_of(100)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:37 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `y.is_multiple_of(400)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function could have a `#[must_use]` attribute [INFO] [stdout] --> src/platform/mod.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn create_capture() -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate [INFO] [stdout] help: add the attribute [INFO] [stdout] | [INFO] [stdout] 57 + #[must_use] [INFO] [stdout] 58 | pub fn create_capture() -> Box { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:21 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [`offset_x`, offset_y, scale_x, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:31 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, `offset_y`, scale_x, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:41 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, offset_y, `scale_x`, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:50 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, offset_y, scale_x, `scale_y`] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 191 | / if let Some(ref layout) = self.bind_group_layout { [INFO] [stdout] 192 | | if let Some(ref sampler) = self.sampler { [INFO] [stdout] 193 | | let bind_group = gpu.device.create_bind_group(&wgpu::BindGroupDescriptor { [INFO] [stdout] 194 | | label: Some("shashin_image_bind_group"), [INFO] [stdout] ... | [INFO] [stdout] 209 | | } [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] 191 ~ if let Some(ref layout) = self.bind_group_layout [INFO] [stdout] 192 ~ && let Some(ref sampler) = self.sampler { [INFO] [stdout] 193 | let bind_group = gpu.device.create_bind_group(&wgpu::BindGroupDescriptor { [INFO] [stdout] ... [INFO] [stdout] 207 | self.image_bind_group = Some(bind_group); [INFO] [stdout] 208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (156/100) [INFO] [stdout] --> src/render.rs:226:5 [INFO] [stdout] | [INFO] [stdout] 226 | fn init_pipeline(&mut self, gpu: &GpuContext, format: wgpu::TextureFormat) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] = note: `-W clippy::too-many-lines` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::too_many_lines)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `PipelineCompilationOptions::default()` is more clear than this expression [INFO] [stdout] --> src/render.rs:322:46 [INFO] [stdout] | [INFO] [stdout] 322 | compilation_options: Default::default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `PipelineCompilationOptions::default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access [INFO] [stdout] = note: `-W clippy::default-trait-access` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::default_trait_access)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `PipelineCompilationOptions::default()` is more clear than this expression [INFO] [stdout] --> src/render.rs:332:46 [INFO] [stdout] | [INFO] [stdout] 332 | compilation_options: Default::default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `PipelineCompilationOptions::default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/render.rs:362:19 [INFO] [stdout] | [INFO] [stdout] 362 | size: (vertices.len() * std::mem::size_of::()) as u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(vertices)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:416:21 [INFO] [stdout] | [INFO] [stdout] 416 | let win_w = self.viewer.window_width as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:417:21 [INFO] [stdout] | [INFO] [stdout] 417 | let win_h = self.viewer.window_height as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:424:24 [INFO] [stdout] | [INFO] [stdout] 424 | let scale_x = (rw as f32 * view.zoom) / win_w; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:425:24 [INFO] [stdout] | [INFO] [stdout] 425 | let scale_y = (rh as f32 * view.zoom) / win_h; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:480:66 [INFO] [stdout] | [INFO] [stdout] 480 | buffer.set_size(&mut text.font_system, Some(350.0), Some(height as f32)); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:485:19 [INFO] [stdout] | [INFO] [stdout] 485 | left: (width as f32) - 370.0, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:489:23 [INFO] [stdout] | [INFO] [stdout] 489 | left: (width as i32) - 370, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] = note: `-W clippy::cast-possible-wrap` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_possible_wrap)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:491:24 [INFO] [stdout] | [INFO] [stdout] 491 | right: width as i32 - 10, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:492:25 [INFO] [stdout] | [INFO] [stdout] 492 | bottom: height as i32 - 10, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `height.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:552:18 [INFO] [stdout] | [INFO] [stdout] 552 | Some(width as f32), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:562:18 [INFO] [stdout] | [INFO] [stdout] 562 | top: bar_y as f32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:566:22 [INFO] [stdout] | [INFO] [stdout] 566 | top: bar_y as i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `bar_y.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:567:24 [INFO] [stdout] | [INFO] [stdout] 567 | right: width as i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:568:25 [INFO] [stdout] | [INFO] [stdout] 568 | bottom: height as i32, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `height.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (121/100) [INFO] [stdout] --> src/render.rs:597:5 [INFO] [stdout] | [INFO] [stdout] 597 | fn render(&mut self, ctx: &mut RenderContext<'_>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render.rs:637:9 [INFO] [stdout] | [INFO] [stdout] 637 | / if matches!(self.mode, Mode::Viewer | Mode::Slideshow) { [INFO] [stdout] 638 | | if let ( [INFO] [stdout] 639 | | Some(pipeline), [INFO] [stdout] 640 | | Some(bind_group), [INFO] [stdout] ... | [INFO] [stdout] 673 | | } [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] 637 ~ if matches!(self.mode, Mode::Viewer | Mode::Slideshow) [INFO] [stdout] 638 ~ && let ( [INFO] [stdout] 639 | Some(pipeline), [INFO] [stdout] ... [INFO] [stdout] 671 | pass.draw(0..6, 0..1); [INFO] [stdout] 672 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:808:33 [INFO] [stdout] | [INFO] [stdout] 808 | /// Parse a hex color string to wgpu::Color. [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 808 - /// Parse a hex color string to wgpu::Color. [INFO] [stdout] 808 + /// Parse a hex color string to `wgpu::Color`. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/viewer.rs:71:1 [INFO] [stdout] | [INFO] [stdout] 71 | / impl Default for Flip { [INFO] [stdout] 72 | | fn default() -> Self { [INFO] [stdout] 73 | | Self { [INFO] [stdout] 74 | | horizontal: false, [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 66 + #[derive(Default)] [INFO] [stdout] 67 | pub struct Flip { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:129:18 [INFO] [stdout] | [INFO] [stdout] 129 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:129:33 [INFO] [stdout] | [INFO] [stdout] 129 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:130:18 [INFO] [stdout] | [INFO] [stdout] 130 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:130:33 [INFO] [stdout] | [INFO] [stdout] 130 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:140:18 [INFO] [stdout] | [INFO] [stdout] 140 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:140:33 [INFO] [stdout] | [INFO] [stdout] 140 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:141:18 [INFO] [stdout] | [INFO] [stdout] 141 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:141:33 [INFO] [stdout] | [INFO] [stdout] 141 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:206:25 [INFO] [stdout] | [INFO] [stdout] 206 | let display_w = rw as f32 * self.zoom; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:207:25 [INFO] [stdout] | [INFO] [stdout] 207 | let display_h = rh as f32 * self.zoom; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | let x = (win_w as f32 - display_w) / 2.0 + self.pan_x; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:209:18 [INFO] [stdout] | [INFO] [stdout] 209 | let y = (win_h as f32 - display_h) / 2.0 + self.pan_y; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map().unwrap_or_else()` on a `Result` value [INFO] [stdout] --> src/viewer.rs:233:18 [INFO] [stdout] | [INFO] [stdout] 233 | let format = image::ImageFormat::from_path(path) [INFO] [stdout] | __________________^ [INFO] [stdout] 234 | | .map(|f| format!("{f:?}")) [INFO] [stdout] 235 | | .unwrap_or_else(|_| "Unknown".into()); [INFO] [stdout] | |_____________________________________________^ help: try: `image::ImageFormat::from_path(path).map_or_else(|_| "Unknown".into(), |f| format!("{f:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] = note: `-W clippy::map-unwrap-or` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::map_unwrap_or)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binding's name is too similar to existing binding [INFO] [stdout] --> src/input.rs:170:49 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] note: existing binding defined here [INFO] [stdout] --> src/input.rs:170:31 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names [INFO] [stdout] = note: `-W clippy::similar-names` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::similar_names)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | KeyCode::Char('h') | KeyCode::Char('H') => Action::FlipHorizontal, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] = note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnested_or_patterns)]` [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 182 - KeyCode::Char('h') | KeyCode::Char('H') => Action::FlipHorizontal, [INFO] [stdout] 182 + KeyCode::Char('h' | 'H') => Action::FlipHorizontal, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | KeyCode::Char('j') | KeyCode::Char('n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 205 - KeyCode::Char('j') | KeyCode::Char('n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] 205 + KeyCode::Char('j' | 'n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | KeyCode::Char('k') | KeyCode::Char('p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 206 - KeyCode::Char('k') | KeyCode::Char('p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] 206 + KeyCode::Char('k' | 'p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | KeyCode::Char('+') | KeyCode::Char('=') => Action::ZoomIn, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 209 - KeyCode::Char('+') | KeyCode::Char('=') => Action::ZoomIn, [INFO] [stdout] 209 + KeyCode::Char('+' | '=') => Action::ZoomIn, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binding's name is too similar to existing binding [INFO] [stdout] --> src/input.rs:170:49 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] note: existing binding defined here [INFO] [stdout] --> src/input.rs:170:31 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names [INFO] [stdout] = note: `-W clippy::similar-names` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::similar_names)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | KeyCode::Char('h') | KeyCode::Char('H') => Action::FlipHorizontal, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] = note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnested_or_patterns)]` [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 182 - KeyCode::Char('h') | KeyCode::Char('H') => Action::FlipHorizontal, [INFO] [stdout] 182 + KeyCode::Char('h' | 'H') => Action::FlipHorizontal, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | KeyCode::Char('j') | KeyCode::Char('n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 205 - KeyCode::Char('j') | KeyCode::Char('n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] 205 + KeyCode::Char('j' | 'n') | KeyCode::Right => Action::NextImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | KeyCode::Char('k') | KeyCode::Char('p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 206 - KeyCode::Char('k') | KeyCode::Char('p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] 206 + KeyCode::Char('k' | 'p') | KeyCode::Left => Action::PrevImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> src/input.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | KeyCode::Char('+') | KeyCode::Char('=') => Action::ZoomIn, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 209 - KeyCode::Char('+') | KeyCode::Char('=') => Action::ZoomIn, [INFO] [stdout] 209 + KeyCode::Char('+' | '=') => Action::ZoomIn, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `thumbnail_ready` and `thumbnail_data` are never read [INFO] [stdout] --> src/gallery.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct GalleryEntry { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | pub thumbnail_ready: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | /// Decoded thumbnail RGBA data (if loaded). [INFO] [stdout] 28 | pub thumbnail_data: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GalleryEntry` has derived impls for the traits `Clone` and `Debug`, but these are 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: fields `width`, `height`, and `data` are never read [INFO] [stdout] --> src/gallery.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct ThumbnailData { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 36 | pub width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 37 | pub height: u32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 38 | pub data: Vec, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ThumbnailData` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/gallery.rs:176:12 [INFO] [stdout] | [INFO] [stdout] 68 | impl Gallery { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 176 | pub fn toggle_sort_reverse(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 336 | pub fn columns(&self) -> usize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 342 | pub fn scroll_offset(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 348 | pub fn visible_rows(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 372 | pub fn entries(&self) -> &[GalleryEntry] { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 378 | pub fn visible_entries(&self) -> Vec<(usize, &GalleryEntry)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 405 | pub fn thumbnail_size(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 422 | pub fn set_thumbnail(&mut self, path: &Path, data: ThumbnailData) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_thumbnail` is never used [INFO] [stdout] --> src/gallery.rs:433:8 [INFO] [stdout] | [INFO] [stdout] 433 | pub fn generate_thumbnail(path: &Path, max_size: u32) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Slideshow` is never constructed [INFO] [stdout] --> src/input.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub enum Mode { [INFO] [stdout] | ---- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 17 | Slideshow, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Mode` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CapturedImage` is never constructed [INFO] [stdout] --> src/platform/mod.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct CapturedImage { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DisplayInfo` is never constructed [INFO] [stdout] --> src/platform/mod.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct DisplayInfo { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ScreenCapture` is never used [INFO] [stdout] --> src/platform/mod.rs:36:11 [INFO] [stdout] | [INFO] [stdout] 36 | pub trait ScreenCapture: Send + Sync { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_capture` is never used [INFO] [stdout] --> src/platform/mod.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn create_capture() -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `thumbnail_ready` and `thumbnail_data` are never read [INFO] [stdout] --> src/gallery.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct GalleryEntry { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | pub thumbnail_ready: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | /// Decoded thumbnail RGBA data (if loaded). [INFO] [stdout] 28 | pub thumbnail_data: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GalleryEntry` has derived impls for the traits `Clone` and `Debug`, but these are 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: fields `width`, `height`, and `data` are never read [INFO] [stdout] --> src/gallery.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct ThumbnailData { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 36 | pub width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 37 | pub height: u32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 38 | pub data: Vec, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ThumbnailData` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/gallery.rs:176:12 [INFO] [stdout] | [INFO] [stdout] 68 | impl Gallery { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 176 | pub fn toggle_sort_reverse(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 182 | pub fn set_filter(&mut self, query: &str) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 200 | pub fn clear_filter(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 330 | pub fn selected_index(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 336 | pub fn columns(&self) -> usize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 342 | pub fn scroll_offset(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 348 | pub fn visible_rows(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 372 | pub fn entries(&self) -> &[GalleryEntry] { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 378 | pub fn visible_entries(&self) -> Vec<(usize, &GalleryEntry)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 405 | pub fn thumbnail_size(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 422 | pub fn set_thumbnail(&mut self, path: &Path, data: ThumbnailData) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_thumbnail` is never used [INFO] [stdout] --> src/gallery.rs:433:8 [INFO] [stdout] | [INFO] [stdout] 433 | pub fn generate_thumbnail(path: &Path, max_size: u32) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Slideshow` is never constructed [INFO] [stdout] --> src/input.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub enum Mode { [INFO] [stdout] | ---- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 17 | Slideshow, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Mode` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CapturedImage` is never constructed [INFO] [stdout] --> src/platform/mod.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct CapturedImage { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DisplayInfo` is never constructed [INFO] [stdout] --> src/platform/mod.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct DisplayInfo { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ScreenCapture` is never used [INFO] [stdout] --> src/platform/mod.rs:36:11 [INFO] [stdout] | [INFO] [stdout] 36 | pub trait ScreenCapture: Send + Sync { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_capture` is never used [INFO] [stdout] --> src/platform/mod.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn create_capture() -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `dest_rect` is never used [INFO] [stdout] --> src/viewer.rs:204:12 [INFO] [stdout] | [INFO] [stdout] 98 | impl ViewState { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 204 | pub fn dest_rect(&self, img_w: u32, img_h: u32, win_w: u32, win_h: u32) -> (f32, f32, f32, f32) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / impl Default for ShashinConfig { [INFO] [stdout] 22 | | fn default() -> Self { [INFO] [stdout] 23 | | Self { [INFO] [stdout] 24 | | viewer: ViewerConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 12 + #[derive(Default)] [INFO] [stdout] 13 | pub struct ShashinConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:46:1 [INFO] [stdout] | [INFO] [stdout] 46 | / impl Default for FitMode { [INFO] [stdout] 47 | | fn default() -> Self { [INFO] [stdout] 48 | | Self::Fit [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 37 + #[derive(Default)] [INFO] [stdout] 38 | pub enum FitMode { [INFO] [stdout] 39 | /// Scale image to fit entirely within the window (letterbox). [INFO] [stdout] 40 ~ #[default] [INFO] [stdout] 41 ~ Fit, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / impl Default for ShashinConfig { [INFO] [stdout] 22 | | fn default() -> Self { [INFO] [stdout] 23 | | Self { [INFO] [stdout] 24 | | viewer: ViewerConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 12 + #[derive(Default)] [INFO] [stdout] 13 | pub struct ShashinConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:90:1 [INFO] [stdout] | [INFO] [stdout] 90 | / impl Default for SortOrder { [INFO] [stdout] 91 | | fn default() -> Self { [INFO] [stdout] 92 | | Self::Name [INFO] [stdout] 93 | | } [INFO] [stdout] 94 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 83 + #[derive(Default)] [INFO] [stdout] 84 | pub enum SortOrder { [INFO] [stdout] 85 ~ #[default] [INFO] [stdout] 86 ~ Name, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:46:1 [INFO] [stdout] | [INFO] [stdout] 46 | / impl Default for FitMode { [INFO] [stdout] 47 | | fn default() -> Self { [INFO] [stdout] 48 | | Self::Fit [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 37 + #[derive(Default)] [INFO] [stdout] 38 | pub enum FitMode { [INFO] [stdout] 39 | /// Scale image to fit entirely within the window (letterbox). [INFO] [stdout] 40 ~ #[default] [INFO] [stdout] 41 ~ Fit, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:90:1 [INFO] [stdout] | [INFO] [stdout] 90 | / impl Default for SortOrder { [INFO] [stdout] 91 | | fn default() -> Self { [INFO] [stdout] 92 | | Self::Name [INFO] [stdout] 93 | | } [INFO] [stdout] 94 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 83 + #[derive(Default)] [INFO] [stdout] 84 | pub enum SortOrder { [INFO] [stdout] 85 ~ #[default] [INFO] [stdout] 86 ~ Name, [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/config.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | / match shikumi::ConfigDiscovery::new("shashin") [INFO] [stdout] 220 | | .env_override("SHASHIN_CONFIG") [INFO] [stdout] 221 | | .discover() [INFO] [stdout] ... | [INFO] [stdout] 238 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else [INFO] [stdout] = note: `-W clippy::single-match-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::single_match_else)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 219 ~ if let Ok(path) = shikumi::ConfigDiscovery::new("shashin") [INFO] [stdout] 220 + .env_override("SHASHIN_CONFIG") [INFO] [stdout] 221 + .discover() { [INFO] [stdout] 222 + tracing::info!("loading config from {}", path.display()); [INFO] [stdout] 223 + let store = shikumi::ConfigStore::::load(&path, "SHASHIN_") [INFO] [stdout] 224 + .unwrap_or_else(|e| { [INFO] [stdout] 225 + tracing::warn!("failed to load config: {e}, using defaults"); [INFO] [stdout] 226 + let tmp = std::env::temp_dir().join("shashin-default.yaml"); [INFO] [stdout] 227 + std::fs::write(&tmp, "{}").ok(); [INFO] [stdout] 228 + shikumi::ConfigStore::load(&tmp, "SHASHIN_").unwrap() [INFO] [stdout] 229 + }); [INFO] [stdout] 230 + ShashinConfig::clone(&store.get()) [INFO] [stdout] 231 + } else { [INFO] [stdout] 232 + tracing::info!("no config file found, using defaults"); [INFO] [stdout] 233 + ShashinConfig::default() [INFO] [stdout] 234 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: assigning the result of `ToOwned::to_owned()` may be inefficient [INFO] [stdout] --> src/gallery.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | self.directory = dir.to_owned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `dir.clone_into(&mut self.directory)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones [INFO] [stdout] = note: `-W clippy::assigning-clones` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::assigning_clones)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/gallery.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | / if let Some(ext) = ext { [INFO] [stdout] 114 | | if IMAGE_EXTENSIONS.contains(&ext.as_str()) { [INFO] [stdout] 115 | | let metadata = entry.metadata().ok(); [INFO] [stdout] 116 | | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] ... | [INFO] [stdout] 136 | | } [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] 113 ~ if let Some(ext) = ext [INFO] [stdout] 114 ~ && IMAGE_EXTENSIONS.contains(&ext.as_str()) { [INFO] [stdout] 115 | let metadata = entry.metadata().ok(); [INFO] [stdout] ... [INFO] [stdout] 134 | }); [INFO] [stdout] 135 ~ } [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/config.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | / match shikumi::ConfigDiscovery::new("shashin") [INFO] [stdout] 220 | | .env_override("SHASHIN_CONFIG") [INFO] [stdout] 221 | | .discover() [INFO] [stdout] ... | [INFO] [stdout] 238 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else [INFO] [stdout] = note: `-W clippy::single-match-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::single_match_else)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 219 ~ if let Ok(path) = shikumi::ConfigDiscovery::new("shashin") [INFO] [stdout] 220 + .env_override("SHASHIN_CONFIG") [INFO] [stdout] 221 + .discover() { [INFO] [stdout] 222 + tracing::info!("loading config from {}", path.display()); [INFO] [stdout] 223 + let store = shikumi::ConfigStore::::load(&path, "SHASHIN_") [INFO] [stdout] 224 + .unwrap_or_else(|e| { [INFO] [stdout] 225 + tracing::warn!("failed to load config: {e}, using defaults"); [INFO] [stdout] 226 + let tmp = std::env::temp_dir().join("shashin-default.yaml"); [INFO] [stdout] 227 + std::fs::write(&tmp, "{}").ok(); [INFO] [stdout] 228 + shikumi::ConfigStore::load(&tmp, "SHASHIN_").unwrap() [INFO] [stdout] 229 + }); [INFO] [stdout] 230 + ShashinConfig::clone(&store.get()) [INFO] [stdout] 231 + } else { [INFO] [stdout] 232 + tracing::info!("no config file found, using defaults"); [INFO] [stdout] 233 + ShashinConfig::default() [INFO] [stdout] 234 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: assigning the result of `ToOwned::to_owned()` may be inefficient [INFO] [stdout] --> src/gallery.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | self.directory = dir.to_owned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `dir.clone_into(&mut self.directory)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones [INFO] [stdout] = note: `-W clippy::assigning-clones` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::assigning_clones)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/gallery.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | / if let Some(ext) = ext { [INFO] [stdout] 114 | | if IMAGE_EXTENSIONS.contains(&ext.as_str()) { [INFO] [stdout] 115 | | let metadata = entry.metadata().ok(); [INFO] [stdout] 116 | | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] ... | [INFO] [stdout] 136 | | } [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] 113 ~ if let Some(ext) = ext [INFO] [stdout] 114 ~ && IMAGE_EXTENSIONS.contains(&ext.as_str()) { [INFO] [stdout] 115 | let metadata = entry.metadata().ok(); [INFO] [stdout] ... [INFO] [stdout] 134 | }); [INFO] [stdout] 135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/gallery.rs:116:60 [INFO] [stdout] | [INFO] [stdout] 116 | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] = note: `-W clippy::redundant-closure-for-method-calls` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_closure_for_method_calls)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/gallery.rs:124:38 [INFO] [stdout] | [INFO] [stdout] 124 | .map_or_else(|| String::new(), |n| n.to_string_lossy().into_owned()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/gallery.rs:149:32 [INFO] [stdout] | [INFO] [stdout] 149 | SortOrder::Date => self.entries.sort_by(|a, b| a.modified.cmp(&b.modified)), [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] 149 - SortOrder::Date => self.entries.sort_by(|a, b| a.modified.cmp(&b.modified)), [INFO] [stdout] 149 + SortOrder::Date => self.entries.sort_by_key(|a| a.modified), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/gallery.rs:150:32 [INFO] [stdout] | [INFO] [stdout] 150 | SortOrder::Size => self.entries.sort_by(|a, b| a.size.cmp(&b.size)), [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] help: try [INFO] [stdout] | [INFO] [stdout] 150 - SortOrder::Size => self.entries.sort_by(|a, b| a.size.cmp(&b.size)), [INFO] [stdout] 150 + SortOrder::Size => self.entries.sort_by_key(|a| a.size), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/gallery.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | / if let Some(idx) = self.actual_index(self.selected) { [INFO] [stdout] 288 | | if let Some(entry) = self.entries.get_mut(idx) { [INFO] [stdout] 289 | | entry.marked = !entry.marked; [INFO] [stdout] 290 | | } [INFO] [stdout] 291 | | } [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] 287 ~ if let Some(idx) = self.actual_index(self.selected) [INFO] [stdout] 288 ~ && let Some(entry) = self.entries.get_mut(idx) { [INFO] [stdout] 289 | entry.marked = !entry.marked; [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual checked division [INFO] [stdout] --> src/gallery.rs:307:12 [INFO] [stdout] | [INFO] [stdout] 307 | if cell_size > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ check performed here [INFO] [stdout] 308 | self.columns = (window_width / cell_size).max(1) as usize; [INFO] [stdout] | -------------------------- division performed here [INFO] [stdout] 309 | self.visible_rows = (window_height / cell_size).max(1) as usize; [INFO] [stdout] | --------------------------- ... and here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/gallery.rs:116:60 [INFO] [stdout] | [INFO] [stdout] 116 | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] = note: `-W clippy::redundant-closure-for-method-calls` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_closure_for_method_calls)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/gallery.rs:124:38 [INFO] [stdout] | [INFO] [stdout] 124 | .map_or_else(|| String::new(), |n| n.to_string_lossy().into_owned()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/gallery.rs:149:32 [INFO] [stdout] | [INFO] [stdout] 149 | SortOrder::Date => self.entries.sort_by(|a, b| a.modified.cmp(&b.modified)), [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] 149 - SortOrder::Date => self.entries.sort_by(|a, b| a.modified.cmp(&b.modified)), [INFO] [stdout] 149 + SortOrder::Date => self.entries.sort_by_key(|a| a.modified), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/gallery.rs:150:32 [INFO] [stdout] | [INFO] [stdout] 150 | SortOrder::Size => self.entries.sort_by(|a, b| a.size.cmp(&b.size)), [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] help: try [INFO] [stdout] | [INFO] [stdout] 150 - SortOrder::Size => self.entries.sort_by(|a, b| a.size.cmp(&b.size)), [INFO] [stdout] 150 + SortOrder::Size => self.entries.sort_by_key(|a| a.size), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/gallery.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | / if let Some(idx) = self.actual_index(self.selected) { [INFO] [stdout] 288 | | if let Some(entry) = self.entries.get_mut(idx) { [INFO] [stdout] 289 | | entry.marked = !entry.marked; [INFO] [stdout] 290 | | } [INFO] [stdout] 291 | | } [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] 287 ~ if let Some(idx) = self.actual_index(self.selected) [INFO] [stdout] 288 ~ && let Some(entry) = self.entries.get_mut(idx) { [INFO] [stdout] 289 | entry.marked = !entry.marked; [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual checked division [INFO] [stdout] --> src/gallery.rs:307:12 [INFO] [stdout] | [INFO] [stdout] 307 | if cell_size > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ check performed here [INFO] [stdout] 308 | self.columns = (window_width / cell_size).max(1) as usize; [INFO] [stdout] | -------------------------- division performed here [INFO] [stdout] 309 | self.visible_rows = (window_height / cell_size).max(1) as usize; [INFO] [stdout] | --------------------------- ... and here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/input.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / impl Default for Mode { [INFO] [stdout] 21 | | fn default() -> Self { [INFO] [stdout] 22 | | Self::Viewer [INFO] [stdout] 23 | | } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub enum Mode { [INFO] [stdout] 13 | /// Viewing a single image. [INFO] [stdout] 14 ~ #[default] [INFO] [stdout] 15 ~ Viewer, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/input.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / impl Default for Mode { [INFO] [stdout] 21 | | fn default() -> Self { [INFO] [stdout] 22 | | Self::Viewer [INFO] [stdout] 23 | | } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub enum Mode { [INFO] [stdout] 13 | /// Viewing a single image. [INFO] [stdout] 14 ~ #[default] [INFO] [stdout] 15 ~ Viewer, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:78:22 [INFO] [stdout] | [INFO] [stdout] 78 | fn to_awase_key(key: &KeyCode) -> Option { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] = note: `-W clippy::trivially-copy-pass-by-ref` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::trivially_copy_pass_by_ref)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard matches only a single variant and will also match any future added variants [INFO] [stdout] --> src/input.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | _ => Option::None, [INFO] [stdout] | ^ help: try: `KeyCode::Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants [INFO] [stdout] = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:78:22 [INFO] [stdout] | [INFO] [stdout] 78 | fn to_awase_key(key: &KeyCode) -> Option { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] = note: `-W clippy::trivially-copy-pass-by-ref` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::trivially_copy_pass_by_ref)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard matches only a single variant and will also match any future added variants [INFO] [stdout] --> src/input.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | _ => Option::None, [INFO] [stdout] | ^ help: try: `KeyCode::Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants [INFO] [stdout] = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | fn to_awase_modifiers(mods: &Modifiers) -> awase::Modifiers { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | fn to_awase_modifiers(mods: &Modifiers) -> awase::Modifiers { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | result = result | awase::Modifiers::CTRL; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::CTRL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | result = result | awase::Modifiers::ALT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::ALT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | result = result | awase::Modifiers::SHIFT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::SHIFT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | result = result | awase::Modifiers::CMD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::CMD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:170:21 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:170:37 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:178:24 [INFO] [stdout] | [INFO] [stdout] 178 | fn map_viewer_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:178:40 [INFO] [stdout] | [INFO] [stdout] 178 | fn map_viewer_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | result = result | awase::Modifiers::CTRL; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::CTRL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | result = result | awase::Modifiers::ALT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::ALT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | result = result | awase::Modifiers::SHIFT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::SHIFT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (2 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:239:32 [INFO] [stdout] | [INFO] [stdout] 239 | fn match_viewer_hotkey(hotkey: &awase::Hotkey) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider passing by value instead: `awase::Hotkey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/input.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | result = result | awase::Modifiers::CMD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result |= awase::Modifiers::CMD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:170:21 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | fn map_gallery_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:170:37 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn map_key(key: &KeyCode, mods: &Modifiers, mode: Mode) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:257:41 [INFO] [stdout] | [INFO] [stdout] 257 | fn map_gallery_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:178:24 [INFO] [stdout] | [INFO] [stdout] 178 | fn map_viewer_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:178:40 [INFO] [stdout] | [INFO] [stdout] 178 | fn map_viewer_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/input.rs:282:9 [INFO] [stdout] | [INFO] [stdout] 282 | KeyCode::Char('g') => Action::FirstImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] = note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_same_arms)]` [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 282 ~ KeyCode::Char('g') | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] 284 ~ KeyCode::End => Action::LastImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/input.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 285 | KeyCode::End => Action::LastImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 283 ~ KeyCode::Char('G') | KeyCode::End => Action::LastImage, [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 285 ~ // Back to viewer [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (2 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:239:32 [INFO] [stdout] | [INFO] [stdout] 239 | fn match_viewer_hotkey(hotkey: &awase::Hotkey) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider passing by value instead: `awase::Hotkey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | fn map_gallery_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^ help: consider passing by value instead: `KeyCode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) [INFO] [stdout] --> src/input.rs:257:41 [INFO] [stdout] | [INFO] [stdout] 257 | fn map_gallery_key(key: &KeyCode, mods: &Modifiers) -> Action { [INFO] [stdout] | ^^^^^^^^^^ help: consider passing by value instead: `Modifiers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/input.rs:282:9 [INFO] [stdout] | [INFO] [stdout] 282 | KeyCode::Char('g') => Action::FirstImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] = note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_same_arms)]` [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 282 ~ KeyCode::Char('g') | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] 284 ~ KeyCode::End => Action::LastImage, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/input.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | KeyCode::Char('G') => Action::LastImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 285 | KeyCode::End => Action::LastImage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 283 ~ KeyCode::Char('G') | KeyCode::End => Action::LastImage, [INFO] [stdout] 284 | KeyCode::Home => Action::FirstImage, [INFO] [stdout] 285 ~ // Back to viewer [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcp.rs:171:61 [INFO] [stdout] | [INFO] [stdout] 171 | ... "size_bytes": meta.as_ref().map(|m| m.len()), [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcp.rs:201:50 [INFO] [stdout] | [INFO] [stdout] 201 | "size_bytes": file_meta.as_ref().map(|m| m.len()), [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcp.rs:171:61 [INFO] [stdout] | [INFO] [stdout] 171 | ... "size_bytes": meta.as_ref().map(|m| m.len()), [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mcp.rs:201:50 [INFO] [stdout] | [INFO] [stdout] 201 | "size_bytes": file_meta.as_ref().map(|m| m.len()), [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/metadata.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | meta.camera_make = get_string_field(&exif, exif::Tag::Make); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `metadata::ImageMetadata { camera_make: get_string_field(&exif, exif::Tag::Make), camera_model: get_string_field(&exif, exif::Tag::Model), lens_model: get_string_field(&exif, exif::Tag::LensModel), focal_length: get_rational_field(&exif, exif::Tag::FocalLength) [INFO] [stdout] .map(|v| format!("{v:.1} mm")), aperture: get_rational_field(&exif, exif::Tag::FNumber) [INFO] [stdout] .map(|v| format!("f/{v:.1}")), shutter_speed: get_shutter_speed(&exif), iso: exif [INFO] [stdout] .get_field(exif::Tag::PhotographicSensitivity, exif::In::PRIMARY) [INFO] [stdout] .map(|f| f.display_value().to_string()), date_taken: get_string_field(&exif, exif::Tag::DateTimeOriginal), orientation: exif [INFO] [stdout] .get_field(exif::Tag::Orientation, exif::In::PRIMARY) [INFO] [stdout] .and_then(|f| match &f.value { [INFO] [stdout] exif::Value::Short(v) => v.first().map(|&x| u32::from(x)), [INFO] [stdout] _ => None, [INFO] [stdout] }), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/metadata.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let mut meta = Self::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/metadata.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | meta.camera_make = get_string_field(&exif, exif::Tag::Make); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `metadata::ImageMetadata { camera_make: get_string_field(&exif, exif::Tag::Make), camera_model: get_string_field(&exif, exif::Tag::Model), lens_model: get_string_field(&exif, exif::Tag::LensModel), focal_length: get_rational_field(&exif, exif::Tag::FocalLength) [INFO] [stdout] .map(|v| format!("{v:.1} mm")), aperture: get_rational_field(&exif, exif::Tag::FNumber) [INFO] [stdout] .map(|v| format!("f/{v:.1}")), shutter_speed: get_shutter_speed(&exif), iso: exif [INFO] [stdout] .get_field(exif::Tag::PhotographicSensitivity, exif::In::PRIMARY) [INFO] [stdout] .map(|f| f.display_value().to_string()), date_taken: get_string_field(&exif, exif::Tag::DateTimeOriginal), orientation: exif [INFO] [stdout] .get_field(exif::Tag::Orientation, exif::In::PRIMARY) [INFO] [stdout] .and_then(|f| match &f.value { [INFO] [stdout] exif::Value::Short(v) => v.first().map(|&x| u32::from(x)), [INFO] [stdout] _ => None, [INFO] [stdout] }), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/metadata.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let mut meta = Self::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/metadata.rs:289:48 [INFO] [stdout] | [INFO] [stdout] 289 | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/metadata.rs:289:48 [INFO] [stdout] | [INFO] [stdout] 289 | let size = metadata.as_ref().map_or(0, |m| m.len()); [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the method itself: `std::fs::Metadata::len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/metadata.rs:315:31 [INFO] [stdout] | [INFO] [stdout] 315 | /// Format dimensions as "WxH". [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 315 - /// Format dimensions as "WxH". [INFO] [stdout] 315 + /// Format dimensions as "`WxH`". [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/metadata.rs:315:31 [INFO] [stdout] | [INFO] [stdout] 315 | /// Format dimensions as "WxH". [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 315 - /// Format dimensions as "WxH". [INFO] [stdout] 315 + /// Format dimensions as "`WxH`". [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:345:29 [INFO] [stdout] | [INFO] [stdout] 345 | format!("{:.1} GB", bytes as f64 / GB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] = note: `-W clippy::cast-precision-loss` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_precision_loss)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:345:44 [INFO] [stdout] | [INFO] [stdout] 345 | format!("{:.1} GB", bytes as f64 / GB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:345:29 [INFO] [stdout] | [INFO] [stdout] 345 | format!("{:.1} GB", bytes as f64 / GB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] = note: `-W clippy::cast-precision-loss` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_precision_loss)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:345:44 [INFO] [stdout] | [INFO] [stdout] 345 | format!("{:.1} GB", bytes as f64 / GB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:347:29 [INFO] [stdout] | [INFO] [stdout] 347 | format!("{:.1} MB", bytes as f64 / MB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:347:44 [INFO] [stdout] | [INFO] [stdout] 347 | format!("{:.1} MB", bytes as f64 / MB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:347:29 [INFO] [stdout] | [INFO] [stdout] 347 | format!("{:.1} MB", bytes as f64 / MB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:347:44 [INFO] [stdout] | [INFO] [stdout] 347 | format!("{:.1} MB", bytes as f64 / MB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:349:29 [INFO] [stdout] | [INFO] [stdout] 349 | format!("{:.1} KB", bytes as f64 / KB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:349:44 [INFO] [stdout] | [INFO] [stdout] 349 | format!("{:.1} KB", bytes as f64 / KB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:349:29 [INFO] [stdout] | [INFO] [stdout] 349 | format!("{:.1} KB", bytes as f64 / KB as f64) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u64` to `f64` may cause a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) [INFO] [stdout] --> src/metadata.rs:349:44 [INFO] [stdout] | [INFO] [stdout] 349 | format!("{:.1} KB", bytes as f64 / KB as f64) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:6 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `y.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:6 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `y.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:20 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `!y.is_multiple_of(100)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:20 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `!y.is_multiple_of(100)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:37 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `y.is_multiple_of(400)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/metadata.rs:406:37 [INFO] [stdout] | [INFO] [stdout] 406 | (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `y.is_multiple_of(400)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:21 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [`offset_x`, offset_y, scale_x, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:31 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, `offset_y`, scale_x, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:41 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, offset_y, `scale_x`, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:50 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, offset_y, scale_x, `scale_y`] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 191 | / if let Some(ref layout) = self.bind_group_layout { [INFO] [stdout] 192 | | if let Some(ref sampler) = self.sampler { [INFO] [stdout] 193 | | let bind_group = gpu.device.create_bind_group(&wgpu::BindGroupDescriptor { [INFO] [stdout] 194 | | label: Some("shashin_image_bind_group"), [INFO] [stdout] ... | [INFO] [stdout] 209 | | } [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] 191 ~ if let Some(ref layout) = self.bind_group_layout [INFO] [stdout] 192 ~ && let Some(ref sampler) = self.sampler { [INFO] [stdout] 193 | let bind_group = gpu.device.create_bind_group(&wgpu::BindGroupDescriptor { [INFO] [stdout] ... [INFO] [stdout] 207 | self.image_bind_group = Some(bind_group); [INFO] [stdout] 208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:21 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [`offset_x`, offset_y, scale_x, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:31 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, `offset_y`, scale_x, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:41 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, offset_y, `scale_x`, scale_y] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:105:50 [INFO] [stdout] | [INFO] [stdout] 105 | /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 105 - /// Transform: [offset_x, offset_y, scale_x, scale_y] [INFO] [stdout] 105 + /// Transform: [offset_x, offset_y, scale_x, `scale_y`] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (156/100) [INFO] [stdout] --> src/render.rs:226:5 [INFO] [stdout] | [INFO] [stdout] 226 | fn init_pipeline(&mut self, gpu: &GpuContext, format: wgpu::TextureFormat) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] = note: `-W clippy::too-many-lines` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::too_many_lines)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `PipelineCompilationOptions::default()` is more clear than this expression [INFO] [stdout] --> src/render.rs:322:46 [INFO] [stdout] | [INFO] [stdout] 322 | compilation_options: Default::default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `PipelineCompilationOptions::default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access [INFO] [stdout] = note: `-W clippy::default-trait-access` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::default_trait_access)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `PipelineCompilationOptions::default()` is more clear than this expression [INFO] [stdout] --> src/render.rs:332:46 [INFO] [stdout] | [INFO] [stdout] 332 | compilation_options: Default::default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `PipelineCompilationOptions::default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/render.rs:362:19 [INFO] [stdout] | [INFO] [stdout] 362 | size: (vertices.len() * std::mem::size_of::()) as u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(vertices)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 191 | / if let Some(ref layout) = self.bind_group_layout { [INFO] [stdout] 192 | | if let Some(ref sampler) = self.sampler { [INFO] [stdout] 193 | | let bind_group = gpu.device.create_bind_group(&wgpu::BindGroupDescriptor { [INFO] [stdout] 194 | | label: Some("shashin_image_bind_group"), [INFO] [stdout] ... | [INFO] [stdout] 209 | | } [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] 191 ~ if let Some(ref layout) = self.bind_group_layout [INFO] [stdout] 192 ~ && let Some(ref sampler) = self.sampler { [INFO] [stdout] 193 | let bind_group = gpu.device.create_bind_group(&wgpu::BindGroupDescriptor { [INFO] [stdout] ... [INFO] [stdout] 207 | self.image_bind_group = Some(bind_group); [INFO] [stdout] 208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:416:21 [INFO] [stdout] | [INFO] [stdout] 416 | let win_w = self.viewer.window_width as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:417:21 [INFO] [stdout] | [INFO] [stdout] 417 | let win_h = self.viewer.window_height as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (156/100) [INFO] [stdout] --> src/render.rs:226:5 [INFO] [stdout] | [INFO] [stdout] 226 | fn init_pipeline(&mut self, gpu: &GpuContext, format: wgpu::TextureFormat) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] = note: `-W clippy::too-many-lines` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::too_many_lines)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:424:24 [INFO] [stdout] | [INFO] [stdout] 424 | let scale_x = (rw as f32 * view.zoom) / win_w; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:425:24 [INFO] [stdout] | [INFO] [stdout] 425 | let scale_y = (rh as f32 * view.zoom) / win_h; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `PipelineCompilationOptions::default()` is more clear than this expression [INFO] [stdout] --> src/render.rs:322:46 [INFO] [stdout] | [INFO] [stdout] 322 | compilation_options: Default::default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `PipelineCompilationOptions::default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access [INFO] [stdout] = note: `-W clippy::default-trait-access` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::default_trait_access)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `PipelineCompilationOptions::default()` is more clear than this expression [INFO] [stdout] --> src/render.rs:332:46 [INFO] [stdout] | [INFO] [stdout] 332 | compilation_options: Default::default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `PipelineCompilationOptions::default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/render.rs:362:19 [INFO] [stdout] | [INFO] [stdout] 362 | size: (vertices.len() * std::mem::size_of::()) as u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(vertices)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:480:66 [INFO] [stdout] | [INFO] [stdout] 480 | buffer.set_size(&mut text.font_system, Some(350.0), Some(height as f32)); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:485:19 [INFO] [stdout] | [INFO] [stdout] 485 | left: (width as f32) - 370.0, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:489:23 [INFO] [stdout] | [INFO] [stdout] 489 | left: (width as i32) - 370, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] = note: `-W clippy::cast-possible-wrap` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_possible_wrap)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:491:24 [INFO] [stdout] | [INFO] [stdout] 491 | right: width as i32 - 10, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:492:25 [INFO] [stdout] | [INFO] [stdout] 492 | bottom: height as i32 - 10, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `height.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:416:21 [INFO] [stdout] | [INFO] [stdout] 416 | let win_w = self.viewer.window_width as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:417:21 [INFO] [stdout] | [INFO] [stdout] 417 | let win_h = self.viewer.window_height as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:424:24 [INFO] [stdout] | [INFO] [stdout] 424 | let scale_x = (rw as f32 * view.zoom) / win_w; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:425:24 [INFO] [stdout] | [INFO] [stdout] 425 | let scale_y = (rh as f32 * view.zoom) / win_h; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:552:18 [INFO] [stdout] | [INFO] [stdout] 552 | Some(width as f32), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:562:18 [INFO] [stdout] | [INFO] [stdout] 562 | top: bar_y as f32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:566:22 [INFO] [stdout] | [INFO] [stdout] 566 | top: bar_y as i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `bar_y.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:480:66 [INFO] [stdout] | [INFO] [stdout] 480 | buffer.set_size(&mut text.font_system, Some(350.0), Some(height as f32)); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:567:24 [INFO] [stdout] | [INFO] [stdout] 567 | right: width as i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:568:25 [INFO] [stdout] | [INFO] [stdout] 568 | bottom: height as i32, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `height.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:485:19 [INFO] [stdout] | [INFO] [stdout] 485 | left: (width as f32) - 370.0, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:489:23 [INFO] [stdout] | [INFO] [stdout] 489 | left: (width as i32) - 370, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] = note: `-W clippy::cast-possible-wrap` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_possible_wrap)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:491:24 [INFO] [stdout] | [INFO] [stdout] 491 | right: width as i32 - 10, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:492:25 [INFO] [stdout] | [INFO] [stdout] 492 | bottom: height as i32 - 10, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `height.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (121/100) [INFO] [stdout] --> src/render.rs:597:5 [INFO] [stdout] | [INFO] [stdout] 597 | fn render(&mut self, ctx: &mut RenderContext<'_>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render.rs:637:9 [INFO] [stdout] | [INFO] [stdout] 637 | / if matches!(self.mode, Mode::Viewer | Mode::Slideshow) { [INFO] [stdout] 638 | | if let ( [INFO] [stdout] 639 | | Some(pipeline), [INFO] [stdout] 640 | | Some(bind_group), [INFO] [stdout] ... | [INFO] [stdout] 673 | | } [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] 637 ~ if matches!(self.mode, Mode::Viewer | Mode::Slideshow) [INFO] [stdout] 638 ~ && let ( [INFO] [stdout] 639 | Some(pipeline), [INFO] [stdout] ... [INFO] [stdout] 671 | pass.draw(0..6, 0..1); [INFO] [stdout] 672 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:552:18 [INFO] [stdout] | [INFO] [stdout] 552 | Some(width as f32), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/render.rs:562:18 [INFO] [stdout] | [INFO] [stdout] 562 | top: bar_y as f32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:566:22 [INFO] [stdout] | [INFO] [stdout] 566 | top: bar_y as i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `bar_y.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:567:24 [INFO] [stdout] | [INFO] [stdout] 567 | right: width as i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `width.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `i32` may wrap around the value [INFO] [stdout] --> src/render.rs:568:25 [INFO] [stdout] | [INFO] [stdout] 568 | bottom: height as i32, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `height.cast_signed()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (121/100) [INFO] [stdout] --> src/render.rs:597:5 [INFO] [stdout] | [INFO] [stdout] 597 | fn render(&mut self, ctx: &mut RenderContext<'_>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:808:33 [INFO] [stdout] | [INFO] [stdout] 808 | /// Parse a hex color string to wgpu::Color. [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 808 - /// Parse a hex color string to wgpu::Color. [INFO] [stdout] 808 + /// Parse a hex color string to `wgpu::Color`. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render.rs:637:9 [INFO] [stdout] | [INFO] [stdout] 637 | / if matches!(self.mode, Mode::Viewer | Mode::Slideshow) { [INFO] [stdout] 638 | | if let ( [INFO] [stdout] 639 | | Some(pipeline), [INFO] [stdout] 640 | | Some(bind_group), [INFO] [stdout] ... | [INFO] [stdout] 673 | | } [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] 637 ~ if matches!(self.mode, Mode::Viewer | Mode::Slideshow) [INFO] [stdout] 638 ~ && let ( [INFO] [stdout] 639 | Some(pipeline), [INFO] [stdout] ... [INFO] [stdout] 671 | pass.draw(0..6, 0..1); [INFO] [stdout] 672 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/viewer.rs:71:1 [INFO] [stdout] | [INFO] [stdout] 71 | / impl Default for Flip { [INFO] [stdout] 72 | | fn default() -> Self { [INFO] [stdout] 73 | | Self { [INFO] [stdout] 74 | | horizontal: false, [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 66 + #[derive(Default)] [INFO] [stdout] 67 | pub struct Flip { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/render.rs:808:33 [INFO] [stdout] | [INFO] [stdout] 808 | /// Parse a hex color string to wgpu::Color. [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 808 - /// Parse a hex color string to wgpu::Color. [INFO] [stdout] 808 + /// Parse a hex color string to `wgpu::Color`. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:129:18 [INFO] [stdout] | [INFO] [stdout] 129 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:129:33 [INFO] [stdout] | [INFO] [stdout] 129 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:130:18 [INFO] [stdout] | [INFO] [stdout] 130 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:130:33 [INFO] [stdout] | [INFO] [stdout] 130 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:140:18 [INFO] [stdout] | [INFO] [stdout] 140 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:140:33 [INFO] [stdout] | [INFO] [stdout] 140 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:141:18 [INFO] [stdout] | [INFO] [stdout] 141 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:141:33 [INFO] [stdout] | [INFO] [stdout] 141 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:206:25 [INFO] [stdout] | [INFO] [stdout] 206 | let display_w = rw as f32 * self.zoom; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:207:25 [INFO] [stdout] | [INFO] [stdout] 207 | let display_h = rh as f32 * self.zoom; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | let x = (win_w as f32 - display_w) / 2.0 + self.pan_x; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:209:18 [INFO] [stdout] | [INFO] [stdout] 209 | let y = (win_h as f32 - display_h) / 2.0 + self.pan_y; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map().unwrap_or_else()` on a `Result` value [INFO] [stdout] --> src/viewer.rs:233:18 [INFO] [stdout] | [INFO] [stdout] 233 | let format = image::ImageFormat::from_path(path) [INFO] [stdout] | __________________^ [INFO] [stdout] 234 | | .map(|f| format!("{f:?}")) [INFO] [stdout] 235 | | .unwrap_or_else(|_| "Unknown".into()); [INFO] [stdout] | |_____________________________________________^ help: try: `image::ImageFormat::from_path(path).map_or_else(|_| "Unknown".into(), |f| format!("{f:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] = note: `-W clippy::map-unwrap-or` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::map_unwrap_or)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/viewer.rs:71:1 [INFO] [stdout] | [INFO] [stdout] 71 | / impl Default for Flip { [INFO] [stdout] 72 | | fn default() -> Self { [INFO] [stdout] 73 | | Self { [INFO] [stdout] 74 | | horizontal: false, [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 66 + #[derive(Default)] [INFO] [stdout] 67 | pub struct Flip { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:129:18 [INFO] [stdout] | [INFO] [stdout] 129 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:129:33 [INFO] [stdout] | [INFO] [stdout] 129 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:130:18 [INFO] [stdout] | [INFO] [stdout] 130 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:130:33 [INFO] [stdout] | [INFO] [stdout] 130 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:140:18 [INFO] [stdout] | [INFO] [stdout] 140 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:140:33 [INFO] [stdout] | [INFO] [stdout] 140 | let sx = win_w as f32 / img_w as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:141:18 [INFO] [stdout] | [INFO] [stdout] 141 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:141:33 [INFO] [stdout] | [INFO] [stdout] 141 | let sy = win_h as f32 / img_h as f32; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:206:25 [INFO] [stdout] | [INFO] [stdout] 206 | let display_w = rw as f32 * self.zoom; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:207:25 [INFO] [stdout] | [INFO] [stdout] 207 | let display_h = rh as f32 * self.zoom; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | let x = (win_w as f32 - display_w) / 2.0 + self.pan_x; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `u32` to `f32` may cause a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) [INFO] [stdout] --> src/viewer.rs:209:18 [INFO] [stdout] | [INFO] [stdout] 209 | let y = (win_h as f32 - display_h) / 2.0 + self.pan_y; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map().unwrap_or_else()` on a `Result` value [INFO] [stdout] --> src/viewer.rs:233:18 [INFO] [stdout] | [INFO] [stdout] 233 | let format = image::ImageFormat::from_path(path) [INFO] [stdout] | __________________^ [INFO] [stdout] 234 | | .map(|f| format!("{f:?}")) [INFO] [stdout] 235 | | .unwrap_or_else(|_| "Unknown".into()); [INFO] [stdout] | |_____________________________________________^ help: try: `image::ImageFormat::from_path(path).map_or_else(|_| "Unknown".into(), |f| format!("{f:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] = note: `-W clippy::map-unwrap-or` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::map_unwrap_or)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (175/100) [INFO] [stdout] --> src/main.rs:228:1 [INFO] [stdout] | [INFO] [stdout] 228 | fn handle_action(action: Action, renderer: &mut ShashinRenderer) -> EventResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument is passed by value, but not consumed in the function body [INFO] [stdout] --> src/main.rs:228:26 [INFO] [stdout] | [INFO] [stdout] 228 | fn handle_action(action: Action, renderer: &mut ShashinRenderer) -> EventResponse { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: or consider marking this type as `Copy` [INFO] [stdout] --> src/input.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub enum Action { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value [INFO] [stdout] = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]` [INFO] [stdout] help: consider taking a reference instead [INFO] [stdout] | [INFO] [stdout] 228 | fn handle_action(action: &Action, renderer: &mut ShashinRenderer) -> EventResponse { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:249:21 [INFO] [stdout] | [INFO] [stdout] 249 | / if !renderer.viewer.image_list.is_empty() { [INFO] [stdout] 250 | | if let Err(e) = renderer.viewer.open_index(0) { [INFO] [stdout] 251 | | tracing::warn!("first image failed: {e}"); [INFO] [stdout] 252 | | } [INFO] [stdout] 253 | | } [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] 249 ~ if !renderer.viewer.image_list.is_empty() [INFO] [stdout] 250 ~ && let Err(e) = renderer.viewer.open_index(0) { [INFO] [stdout] 251 | tracing::warn!("first image failed: {e}"); [INFO] [stdout] 252 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:259:13 [INFO] [stdout] | [INFO] [stdout] 259 | / match renderer.mode { [INFO] [stdout] 260 | | Mode::Gallery => renderer.gallery.select_last(), [INFO] [stdout] 261 | | _ => { [INFO] [stdout] 262 | | let last = renderer.viewer.image_list.len().saturating_sub(1); [INFO] [stdout] ... | [INFO] [stdout] 267 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 259 ~ if renderer.mode == Mode::Gallery { renderer.gallery.select_last() } else { [INFO] [stdout] 260 + let last = renderer.viewer.image_list.len().saturating_sub(1); [INFO] [stdout] 261 + if let Err(e) = renderer.viewer.open_index(last) { [INFO] [stdout] 262 + tracing::warn!("last image failed: {e}"); [INFO] [stdout] 263 + } [INFO] [stdout] 264 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:349:13 [INFO] [stdout] | [INFO] [stdout] 349 | / if renderer.gallery.is_empty() { [INFO] [stdout] 350 | | if let Some(path) = renderer.viewer.current_path() { [INFO] [stdout] 351 | | if let Some(dir) = path.parent() { [INFO] [stdout] 352 | | if let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] ... | [INFO] [stdout] 357 | | } [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] 349 ~ if renderer.gallery.is_empty() [INFO] [stdout] 350 ~ && let Some(path) = renderer.viewer.current_path() { [INFO] [stdout] 351 | if let Some(dir) = path.parent() { [INFO] [stdout] ... [INFO] [stdout] 355 | } [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:350:17 [INFO] [stdout] | [INFO] [stdout] 350 | / if let Some(path) = renderer.viewer.current_path() { [INFO] [stdout] 351 | | if let Some(dir) = path.parent() { [INFO] [stdout] 352 | | if let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] 353 | | tracing::warn!("gallery scan failed: {e}"); [INFO] [stdout] ... | [INFO] [stdout] 356 | | } [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] 350 ~ if let Some(path) = renderer.viewer.current_path() [INFO] [stdout] 351 ~ && let Some(dir) = path.parent() { [INFO] [stdout] 352 | if let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] 353 | tracing::warn!("gallery scan failed: {e}"); [INFO] [stdout] 354 | } [INFO] [stdout] 355 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:351:21 [INFO] [stdout] | [INFO] [stdout] 351 | / if let Some(dir) = path.parent() { [INFO] [stdout] 352 | | if let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] 353 | | tracing::warn!("gallery scan failed: {e}"); [INFO] [stdout] 354 | | } [INFO] [stdout] 355 | | } [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] 351 ~ if let Some(dir) = path.parent() [INFO] [stdout] 352 ~ && let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] 353 | tracing::warn!("gallery scan failed: {e}"); [INFO] [stdout] 354 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (175/100) [INFO] [stdout] --> src/main.rs:228:1 [INFO] [stdout] | [INFO] [stdout] 228 | fn handle_action(action: Action, renderer: &mut ShashinRenderer) -> EventResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument is passed by value, but not consumed in the function body [INFO] [stdout] --> src/main.rs:228:26 [INFO] [stdout] | [INFO] [stdout] 228 | fn handle_action(action: Action, renderer: &mut ShashinRenderer) -> EventResponse { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: or consider marking this type as `Copy` [INFO] [stdout] --> src/input.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | pub enum Action { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value [INFO] [stdout] = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]` [INFO] [stdout] help: consider taking a reference instead [INFO] [stdout] | [INFO] [stdout] 228 | fn handle_action(action: &Action, renderer: &mut ShashinRenderer) -> EventResponse { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:249:21 [INFO] [stdout] | [INFO] [stdout] 249 | / if !renderer.viewer.image_list.is_empty() { [INFO] [stdout] 250 | | if let Err(e) = renderer.viewer.open_index(0) { [INFO] [stdout] 251 | | tracing::warn!("first image failed: {e}"); [INFO] [stdout] 252 | | } [INFO] [stdout] 253 | | } [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] 249 ~ if !renderer.viewer.image_list.is_empty() [INFO] [stdout] 250 ~ && let Err(e) = renderer.viewer.open_index(0) { [INFO] [stdout] 251 | tracing::warn!("first image failed: {e}"); [INFO] [stdout] 252 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:259:13 [INFO] [stdout] | [INFO] [stdout] 259 | / match renderer.mode { [INFO] [stdout] 260 | | Mode::Gallery => renderer.gallery.select_last(), [INFO] [stdout] 261 | | _ => { [INFO] [stdout] 262 | | let last = renderer.viewer.image_list.len().saturating_sub(1); [INFO] [stdout] ... | [INFO] [stdout] 267 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 259 ~ if renderer.mode == Mode::Gallery { renderer.gallery.select_last() } else { [INFO] [stdout] 260 + let last = renderer.viewer.image_list.len().saturating_sub(1); [INFO] [stdout] 261 + if let Err(e) = renderer.viewer.open_index(last) { [INFO] [stdout] 262 + tracing::warn!("last image failed: {e}"); [INFO] [stdout] 263 + } [INFO] [stdout] 264 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:349:13 [INFO] [stdout] | [INFO] [stdout] 349 | / if renderer.gallery.is_empty() { [INFO] [stdout] 350 | | if let Some(path) = renderer.viewer.current_path() { [INFO] [stdout] 351 | | if let Some(dir) = path.parent() { [INFO] [stdout] 352 | | if let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] ... | [INFO] [stdout] 357 | | } [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] 349 ~ if renderer.gallery.is_empty() [INFO] [stdout] 350 ~ && let Some(path) = renderer.viewer.current_path() { [INFO] [stdout] 351 | if let Some(dir) = path.parent() { [INFO] [stdout] ... [INFO] [stdout] 355 | } [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:350:17 [INFO] [stdout] | [INFO] [stdout] 350 | / if let Some(path) = renderer.viewer.current_path() { [INFO] [stdout] 351 | | if let Some(dir) = path.parent() { [INFO] [stdout] 352 | | if let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] 353 | | tracing::warn!("gallery scan failed: {e}"); [INFO] [stdout] ... | [INFO] [stdout] 356 | | } [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] 350 ~ if let Some(path) = renderer.viewer.current_path() [INFO] [stdout] 351 ~ && let Some(dir) = path.parent() { [INFO] [stdout] 352 | if let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] 353 | tracing::warn!("gallery scan failed: {e}"); [INFO] [stdout] 354 | } [INFO] [stdout] 355 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:351:21 [INFO] [stdout] | [INFO] [stdout] 351 | / if let Some(dir) = path.parent() { [INFO] [stdout] 352 | | if let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] 353 | | tracing::warn!("gallery scan failed: {e}"); [INFO] [stdout] 354 | | } [INFO] [stdout] 355 | | } [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] 351 ~ if let Some(dir) = path.parent() [INFO] [stdout] 352 ~ && let Err(e) = renderer.gallery.scan_directory(dir) { [INFO] [stdout] 353 | tracing::warn!("gallery scan failed: {e}"); [INFO] [stdout] 354 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3m 51s [INFO] running `Command { std: "docker" "inspect" "27883107de455a19660307cb16891aa5f5d7bfe2c9f94792c673cb22fac7bd86", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "27883107de455a19660307cb16891aa5f5d7bfe2c9f94792c673cb22fac7bd86", kill_on_drop: false }` [INFO] [stdout] 27883107de455a19660307cb16891aa5f5d7bfe2c9f94792c673cb22fac7bd86