[INFO] cloning repository https://github.com/ah-aydin/menuvroom [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ah-aydin/menuvroom" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fah-aydin%2Fmenuvroom", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fah-aydin%2Fmenuvroom'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e767c621c6e8a15bb9f03c5380b036746da8c79d [INFO] linting ah-aydin/menuvroom against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fah-aydin%2Fmenuvroom" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ah-aydin/menuvroom [INFO] finished tweaking git repo https://github.com/ah-aydin/menuvroom [INFO] tweaked toml for git repo https://github.com/ah-aydin/menuvroom written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ah-aydin/menuvroom 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/ah-aydin/menuvroom already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded wayland-cursor v0.31.6 [INFO] [stderr] Downloaded cc v1.1.22 [INFO] [stderr] Downloaded wayland-protocols-plasma v0.3.4 [INFO] [stderr] Downloaded redox_syscall v0.5.6 [INFO] [stderr] Downloaded font-types v0.6.0 [INFO] [stderr] Downloaded bytemuck v1.18.0 [INFO] [stderr] Downloaded wayland-client v0.31.6 [INFO] [stderr] Downloaded etagere v0.2.13 [INFO] [stderr] Downloaded wayland-protocols-wlr v0.3.4 [INFO] [stderr] Downloaded wayland-protocols v0.32.4 [INFO] [stderr] Downloaded glyphon v0.6.0 [INFO] [stderr] Downloaded skrifa v0.20.0 [INFO] [stderr] Downloaded swash v0.1.18 [INFO] [stderr] Downloaded read-fonts v0.20.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 39a4251ac75a6c26ef68214ad1c67655e2e06b72b7f64c1c1c73e0e6a023331c [INFO] running `Command { std: "docker" "start" "-a" "39a4251ac75a6c26ef68214ad1c67655e2e06b72b7f64c1c1c73e0e6a023331c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "39a4251ac75a6c26ef68214ad1c67655e2e06b72b7f64c1c1c73e0e6a023331c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "39a4251ac75a6c26ef68214ad1c67655e2e06b72b7f64c1c1c73e0e6a023331c", kill_on_drop: false }` [INFO] [stdout] 39a4251ac75a6c26ef68214ad1c67655e2e06b72b7f64c1c1c73e0e6a023331c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 702b400a44d03fcdfb16200a1c99211803517ed946ec771d301d1d5d7e5db810 [INFO] running `Command { std: "docker" "start" "-a" "702b400a44d03fcdfb16200a1c99211803517ed946ec771d301d1d5d7e5db810", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.77 [INFO] [stderr] Checking libloading v0.8.5 [INFO] [stderr] Compiling rustix v0.38.37 [INFO] [stderr] Compiling cc v1.1.22 [INFO] [stderr] Compiling wayland-sys v0.31.5 [INFO] [stderr] Compiling ahash v0.8.11 [INFO] [stderr] Compiling quick-xml v0.36.2 [INFO] [stderr] Compiling wayland-client v0.31.6 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Checking memmap2 v0.9.5 [INFO] [stderr] Compiling naga v22.1.0 [INFO] [stderr] Compiling khronos-egl v6.0.0 [INFO] [stderr] Checking bit-vec v0.7.0 [INFO] [stderr] Compiling ash v0.38.0+1.3.281 [INFO] [stderr] Checking bit-set v0.6.0 [INFO] [stderr] Checking codespan-reporting v0.11.1 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Compiling wgpu-hal v22.0.0 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking spirv v0.3.0+sdk-1.3.268.0 [INFO] [stderr] Checking gpu-descriptor-types v0.2.0 [INFO] [stderr] Checking gpu-alloc-types v0.3.0 [INFO] [stderr] Checking hexf-parse v0.2.1 [INFO] [stderr] Compiling wgpu-core v22.1.0 [INFO] [stderr] Checking wgpu-types v22.0.0 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking gpu-alloc v0.6.0 [INFO] [stderr] Checking glow v0.13.1 [INFO] [stderr] Checking profiling v1.0.15 [INFO] [stderr] Checking renderdoc-sys v1.1.0 [INFO] [stderr] Checking ttf-parser v0.24.1 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking fontconfig-parser v0.5.7 [INFO] [stderr] Compiling document-features v0.2.10 [INFO] [stderr] Compiling x11-dl v2.21.0 [INFO] [stderr] Compiling wgpu v22.1.0 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking zeno v0.2.3 [INFO] [stderr] Checking unicode-ccc v0.2.0 [INFO] [stderr] Checking ttf-parser v0.20.0 [INFO] [stderr] Checking yazi v0.1.6 [INFO] [stderr] Compiling wayland-scanner v0.31.5 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Checking unicode-bidi-mirroring v0.2.0 [INFO] [stderr] Compiling serde v1.0.210 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Compiling winit v0.30.5 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking rangemap v1.5.1 [INFO] [stderr] Checking euclid v0.22.11 [INFO] [stderr] Checking unicode-bidi v0.3.17 [INFO] [stderr] Checking indexmap v2.5.0 [INFO] [stderr] Compiling wayland-backend v0.3.7 [INFO] [stderr] Checking gpu-descriptor v0.3.0 [INFO] [stderr] Checking sys-locale v0.3.1 [INFO] [stderr] Checking svg_fmt v0.4.3 [INFO] [stderr] Checking self_cell v1.0.4 [INFO] [stderr] Compiling serde_json v1.0.128 [INFO] [stderr] Checking env_filter v0.1.2 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Checking dpi v0.1.1 [INFO] [stderr] Checking etagere v0.2.13 [INFO] [stderr] Checking rustc-hash v2.0.0 [INFO] [stderr] Checking lru v0.12.4 [INFO] [stderr] Checking env_logger v0.11.5 [INFO] [stderr] Compiling bytemuck_derive v1.7.1 [INFO] [stderr] Compiling thiserror-impl v1.0.64 [INFO] [stderr] Compiling serde_derive v1.0.210 [INFO] [stderr] Checking fontdb v0.16.2 [INFO] [stderr] Checking owned_ttf_parser v0.24.0 [INFO] [stderr] Checking ab_glyph v0.2.28 [INFO] [stderr] Checking thiserror v1.0.64 [INFO] [stderr] Checking bytemuck v1.18.0 [INFO] [stderr] Checking font-types v0.6.0 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking rustybuzz v0.14.1 [INFO] [stderr] Checking read-fonts v0.20.0 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking polling v3.7.3 [INFO] [stderr] Checking x11rb v0.13.1 [INFO] [stderr] Checking calloop v0.13.0 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Checking wayland-protocols v0.32.4 [INFO] [stderr] Checking calloop-wayland-source v0.3.0 [INFO] [stderr] Checking wayland-cursor v0.31.6 [INFO] [stderr] Checking skrifa v0.20.0 [INFO] [stderr] Checking wayland-protocols-wlr v0.3.4 [INFO] [stderr] Checking wayland-protocols-plasma v0.3.4 [INFO] [stderr] Checking swash v0.1.18 [INFO] [stderr] Checking smithay-client-toolkit v0.19.2 [INFO] [stderr] Checking sctk-adwaita v0.10.1 [INFO] [stderr] Checking cosmic-text v0.12.1 [INFO] [stderr] Checking glyphon v0.6.0 [INFO] [stderr] Checking menuvroom v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:1:31 [INFO] [stdout] | [INFO] [stdout] 1 | static CONFIG_FILE_SUB_PATH: &'static str = "/.config/menuvroom/config.json"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | static DEFAULT_CACHE_SUB_PATH: &'static str = "/.cache/menuvroom"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | static DEFAULT_CONFIG: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:1:31 [INFO] [stdout] | [INFO] [stdout] 1 | static CONFIG_FILE_SUB_PATH: &'static str = "/.config/menuvroom/config.json"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | static DEFAULT_CACHE_SUB_PATH: &'static str = "/.cache/menuvroom"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | static DEFAULT_CONFIG: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/executables.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | pub static CACHE_FILE_NAME: &'static str = "/executables.txt"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/executables.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | pub static CACHE_FILE_NAME: &'static str = "/executables.txt"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `c` is used as a loop counter [INFO] [stdout] --> src/app.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | for i in &self.matching_executable_indexes { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (c, i) in self.matching_executable_indexes.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `c` is used as a loop counter [INFO] [stdout] --> src/app.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | for i in &self.matching_executable_indexes { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (c, i) in self.matching_executable_indexes.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/app.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | return format!("(Ctrl+{})", i + 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 132 - return format!("(Ctrl+{})", i + 1); [INFO] [stdout] 132 + format!("(Ctrl+{})", i + 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/app.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | return format!("(Ctrl+{})", i + 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 132 - return format!("(Ctrl+{})", i + 1); [INFO] [stdout] 132 + format!("(Ctrl+{})", i + 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/app.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | return format!("(Ctrl+0)"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 134 - return format!("(Ctrl+0)"); [INFO] [stdout] 134 + format!("(Ctrl+0)") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/app.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | return format!("(Ctrl+0)"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 134 - return format!("(Ctrl+0)"); [INFO] [stdout] 134 + format!("(Ctrl+0)") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/app.rs:136:17 [INFO] [stdout] | [INFO] [stdout] 136 | return "".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 136 - return "".to_string(); [INFO] [stdout] 136 + "".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/app.rs:134:24 [INFO] [stdout] | [INFO] [stdout] 134 | return format!("(Ctrl+0)"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"(Ctrl+0)".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:303:21 [INFO] [stdout] | [INFO] [stdout] 303 | &queue, [INFO] [stdout] | ^^^^^^ help: change this to: `queue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `index` is used as a loop counter [INFO] [stdout] --> src/app.rs:321:17 [INFO] [stdout] | [INFO] [stdout] 321 | for text_buffer in &text_buffers { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (index, text_buffer) in text_buffers.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/app.rs:322:21 [INFO] [stdout] | [INFO] [stdout] 322 | let color; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `color` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 322 ~ [INFO] [stdout] 323 ~ let color = if index - 1 == self.state.selected_index { [INFO] [stdout] 324 ~ self.state.config.font_color_highlighted [INFO] [stdout] 325 | } else { [INFO] [stdout] 326 ~ self.state.config.font_color [INFO] [stdout] 327 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:381:29 [INFO] [stdout] | [INFO] [stdout] 381 | .render(&atlas, &viewport, &mut pass) [INFO] [stdout] | ^^^^^^ help: change this to: `atlas` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/app.rs:136:17 [INFO] [stdout] | [INFO] [stdout] 136 | return "".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 136 - return "".to_string(); [INFO] [stdout] 136 + "".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:381:37 [INFO] [stdout] | [INFO] [stdout] 381 | .render(&atlas, &viewport, &mut pass) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `viewport` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/app.rs:134:24 [INFO] [stdout] | [INFO] [stdout] 134 | return format!("(Ctrl+0)"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"(Ctrl+0)".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:303:21 [INFO] [stdout] | [INFO] [stdout] 303 | &queue, [INFO] [stdout] | ^^^^^^ help: change this to: `queue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `index` is used as a loop counter [INFO] [stdout] --> src/app.rs:321:17 [INFO] [stdout] | [INFO] [stdout] 321 | for text_buffer in &text_buffers { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (index, text_buffer) in text_buffers.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/app.rs:322:21 [INFO] [stdout] | [INFO] [stdout] 322 | let color; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `color` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 322 ~ [INFO] [stdout] 323 ~ let color = if index - 1 == self.state.selected_index { [INFO] [stdout] 324 ~ self.state.config.font_color_highlighted [INFO] [stdout] 325 | } else { [INFO] [stdout] 326 ~ self.state.config.font_color [INFO] [stdout] 327 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:381:29 [INFO] [stdout] | [INFO] [stdout] 381 | .render(&atlas, &viewport, &mut pass) [INFO] [stdout] | ^^^^^^ help: change this to: `atlas` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:381:37 [INFO] [stdout] | [INFO] [stdout] 381 | .render(&atlas, &viewport, &mut pass) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `viewport` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/app.rs:472:21 [INFO] [stdout] | [INFO] [stdout] 472 | / match event.logical_key { [INFO] [stdout] 473 | | winit::keyboard::Key::Named(NamedKey::Control) => { [INFO] [stdout] 474 | | self.state.ctrl_pressed = false; [INFO] [stdout] ... | [INFO] [stdout] 477 | | }; [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 472 ~ if let winit::keyboard::Key::Named(NamedKey::Control) = event.logical_key { [INFO] [stdout] 473 + self.state.ctrl_pressed = false; [INFO] [stdout] 474 ~ }; [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/app.rs:472:21 [INFO] [stdout] | [INFO] [stdout] 472 | / match event.logical_key { [INFO] [stdout] 473 | | winit::keyboard::Key::Named(NamedKey::Control) => { [INFO] [stdout] 474 | | self.state.ctrl_pressed = false; [INFO] [stdout] ... | [INFO] [stdout] 477 | | }; [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 472 ~ if let winit::keyboard::Key::Named(NamedKey::Control) = event.logical_key { [INFO] [stdout] 473 + self.state.ctrl_pressed = false; [INFO] [stdout] 474 ~ }; [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:112:33 [INFO] [stdout] | [INFO] [stdout] 112 | Some(parent) => match fs::create_dir_all(parent) { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 113 | | Err(_) => { [INFO] [stdout] 114 | | error!("Failed to create missing parent directory for '{config_file}'"); [INFO] [stdout] 115 | | process::exit(1); [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | _ => {} [INFO] [stdout] 118 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 112 ~ Some(parent) => if let Err(_) = fs::create_dir_all(parent) { [INFO] [stdout] 113 + error!("Failed to create missing parent directory for '{config_file}'"); [INFO] [stdout] 114 + process::exit(1); [INFO] [stdout] 115 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/config.rs:126:18 [INFO] [stdout] | [INFO] [stdout] 126 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/config.rs:137:13 [INFO] [stdout] | [INFO] [stdout] 137 | / match file.write_all(DEFAULT_CONFIG.as_bytes()) { [INFO] [stdout] 138 | | Err(_) => { [INFO] [stdout] 139 | | error!("Failed to write default contents to newly created config file"); [INFO] [stdout] 140 | | process::exit(1); [INFO] [stdout] 141 | | } [INFO] [stdout] 142 | | _ => {} [INFO] [stdout] 143 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 137 ~ if let Err(_) = file.write_all(DEFAULT_CONFIG.as_bytes()) { [INFO] [stdout] 138 + error!("Failed to write default contents to newly created config file"); [INFO] [stdout] 139 + process::exit(1); [INFO] [stdout] 140 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Map>, {closure@src/config.rs:157:18: 157:21}>` [INFO] [stdout] --> src/config.rs:155:32 [INFO] [stdout] | [INFO] [stdout] 155 | let config_raw = match BufReader::new(file) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 156 | | .lines() [INFO] [stdout] 157 | | .map(|l| l.unwrap()) [INFO] [stdout] 158 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 155 ~ let config_raw = match BufReader::new(file) [INFO] [stdout] 156 + .lines() [INFO] [stdout] 157 + .map(|l| l.unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/executables.rs:35:1 [INFO] [stdout] | [INFO] [stdout] 35 | / impl PartialOrd for Executable { [INFO] [stdout] 36 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 37 | | self.get_display_text() [INFO] [stdout] 38 | | .partial_cmp(other.get_display_text()) [INFO] [stdout] 39 | | } [INFO] [stdout] 40 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 37 - self.get_display_text() [INFO] [stdout] 38 - .partial_cmp(other.get_display_text()) [INFO] [stdout] 39 - } [INFO] [stdout] 36 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/executables.rs:42:1 [INFO] [stdout] | [INFO] [stdout] 42 | / impl ToString for Executable { [INFO] [stdout] 43 | | fn to_string(&self) -> String { [INFO] [stdout] 44 | | match &self.display_name { [INFO] [stdout] 45 | | Some(display_name) => format!("D:{} - {}", display_name, self.command), [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/executables.rs:91:61 [INFO] [stdout] | [INFO] [stdout] 91 | .filter(|path| !config.ignored_directories.contains(&path)) [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/executables.rs:112:29 [INFO] [stdout] | [INFO] [stdout] 112 | Some(parent) => match fs::create_dir_all(parent) { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 113 | | Err(_) => { [INFO] [stdout] 114 | | error!("Failed to create missing parent directory for '{cache_file}'"); [INFO] [stdout] 115 | | process::exit(1); [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | _ => {} [INFO] [stdout] 118 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 112 ~ Some(parent) => if let Err(_) = fs::create_dir_all(parent) { [INFO] [stdout] 113 + error!("Failed to create missing parent directory for '{cache_file}'"); [INFO] [stdout] 114 + process::exit(1); [INFO] [stdout] 115 ~ }, [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/executables.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | / match fs::OpenOptions::new() [INFO] [stdout] 125 | | .create(true) [INFO] [stdout] 126 | | .write(true) [INFO] [stdout] 127 | | .open(&cache_file) [INFO] [stdout] ... | [INFO] [stdout] 134 | | _ => {} [INFO] [stdout] 135 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 124 ~ if let Err(err) = fs::OpenOptions::new() [INFO] [stdout] 125 + .create(true) [INFO] [stdout] 126 + .write(true) [INFO] [stdout] 127 + .open(&cache_file) { [INFO] [stdout] 128 + error!("{:?}", err); [INFO] [stdout] 129 + error!("Failed to create missing cache file '{cache_file}'"); [INFO] [stdout] 130 + process::exit(1); [INFO] [stdout] 131 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/executables.rs:125:14 [INFO] [stdout] | [INFO] [stdout] 125 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [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:112:33 [INFO] [stdout] | [INFO] [stdout] 112 | Some(parent) => match fs::create_dir_all(parent) { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 113 | | Err(_) => { [INFO] [stdout] 114 | | error!("Failed to create missing parent directory for '{config_file}'"); [INFO] [stdout] 115 | | process::exit(1); [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | _ => {} [INFO] [stdout] 118 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 112 ~ Some(parent) => if let Err(_) = fs::create_dir_all(parent) { [INFO] [stdout] 113 + error!("Failed to create missing parent directory for '{config_file}'"); [INFO] [stdout] 114 + process::exit(1); [INFO] [stdout] 115 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/executables.rs:161:32 [INFO] [stdout] | [INFO] [stdout] 161 | if should_invalidate_cache(&config, &paths) { [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/executables.rs:161:41 [INFO] [stdout] | [INFO] [stdout] 161 | if should_invalidate_cache(&config, &paths) { [INFO] [stdout] | ^^^^^^ help: change this to: `paths` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/executables.rs:172:14 [INFO] [stdout] | [INFO] [stdout] 172 | .map(|executable_result| executable_result.unwrap()) [INFO] [stdout] | ______________^ [INFO] [stdout] 173 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|executable_result| executable_result.unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter` for `Ok` followed by `unwrap` [INFO] [stdout] --> src/executables.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | .filter(|executables_result| executables_result.is_ok()) [INFO] [stdout] | ______________^ [INFO] [stdout] 172 | | .map(|executable_result| executable_result.unwrap()) [INFO] [stdout] | |________________________________________________________________^ help: consider using `flatten` instead: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_filter_map [INFO] [stdout] = note: `#[warn(clippy::result_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/config.rs:126:18 [INFO] [stdout] | [INFO] [stdout] 126 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/executables.rs:181:9 [INFO] [stdout] | [INFO] [stdout] 181 | / match file.write_all( [INFO] [stdout] 182 | | executables [INFO] [stdout] 183 | | .iter() [INFO] [stdout] 184 | | .map(|e| e.to_string()) [INFO] [stdout] ... | [INFO] [stdout] 193 | | _ => {} [INFO] [stdout] 194 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 181 ~ if let Err(_) = file.write_all( [INFO] [stdout] 182 + executables [INFO] [stdout] 183 + .iter() [INFO] [stdout] 184 + .map(|e| e.to_string()) [INFO] [stdout] 185 + .collect::>() [INFO] [stdout] 186 + .join("\n") [INFO] [stdout] 187 + .as_bytes(), [INFO] [stdout] 188 + ) { [INFO] [stdout] 189 + error!("Failed to update cache file"); [INFO] [stdout] 190 + process::exit(1); [INFO] [stdout] 191 ~ }; [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:137:13 [INFO] [stdout] | [INFO] [stdout] 137 | / match file.write_all(DEFAULT_CONFIG.as_bytes()) { [INFO] [stdout] 138 | | Err(_) => { [INFO] [stdout] 139 | | error!("Failed to write default contents to newly created config file"); [INFO] [stdout] 140 | | process::exit(1); [INFO] [stdout] 141 | | } [INFO] [stdout] 142 | | _ => {} [INFO] [stdout] 143 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 137 ~ if let Err(_) = file.write_all(DEFAULT_CONFIG.as_bytes()) { [INFO] [stdout] 138 + error!("Failed to write default contents to newly created config file"); [INFO] [stdout] 139 + process::exit(1); [INFO] [stdout] 140 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `executable_data.get(0)` [INFO] [stdout] --> src/executables.rs:218:21 [INFO] [stdout] | [INFO] [stdout] 218 | executable_data.get(0).unwrap().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `executable_data.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/executables.rs:285:33 [INFO] [stdout] | [INFO] [stdout] 285 | let regex = Regex::new(r"%\w").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/executables.rs:279:13 [INFO] [stdout] | [INFO] [stdout] 279 | for line_result in BufReader::new(file).lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Map>, {closure@src/config.rs:157:18: 157:21}>` [INFO] [stdout] --> src/config.rs:155:32 [INFO] [stdout] | [INFO] [stdout] 155 | let config_raw = match BufReader::new(file) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 156 | | .lines() [INFO] [stdout] 157 | | .map(|l| l.unwrap()) [INFO] [stdout] 158 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 155 ~ let config_raw = match BufReader::new(file) [INFO] [stdout] 156 + .lines() [INFO] [stdout] 157 + .map(|l| l.unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/executables.rs:35:1 [INFO] [stdout] | [INFO] [stdout] 35 | / impl PartialOrd for Executable { [INFO] [stdout] 36 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 37 | | self.get_display_text() [INFO] [stdout] 38 | | .partial_cmp(other.get_display_text()) [INFO] [stdout] 39 | | } [INFO] [stdout] 40 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 37 - self.get_display_text() [INFO] [stdout] 38 - .partial_cmp(other.get_display_text()) [INFO] [stdout] 39 - } [INFO] [stdout] 36 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/executables.rs:42:1 [INFO] [stdout] | [INFO] [stdout] 42 | / impl ToString for Executable { [INFO] [stdout] 43 | | fn to_string(&self) -> String { [INFO] [stdout] 44 | | match &self.display_name { [INFO] [stdout] 45 | | Some(display_name) => format!("D:{} - {}", display_name, self.command), [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/executables.rs:91:61 [INFO] [stdout] | [INFO] [stdout] 91 | .filter(|path| !config.ignored_directories.contains(&path)) [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [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/executables.rs:112:29 [INFO] [stdout] | [INFO] [stdout] 112 | Some(parent) => match fs::create_dir_all(parent) { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 113 | | Err(_) => { [INFO] [stdout] 114 | | error!("Failed to create missing parent directory for '{cache_file}'"); [INFO] [stdout] 115 | | process::exit(1); [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | _ => {} [INFO] [stdout] 118 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 112 ~ Some(parent) => if let Err(_) = fs::create_dir_all(parent) { [INFO] [stdout] 113 + error!("Failed to create missing parent directory for '{cache_file}'"); [INFO] [stdout] 114 + process::exit(1); [INFO] [stdout] 115 ~ }, [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/executables.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | / match fs::OpenOptions::new() [INFO] [stdout] 125 | | .create(true) [INFO] [stdout] 126 | | .write(true) [INFO] [stdout] 127 | | .open(&cache_file) [INFO] [stdout] ... | [INFO] [stdout] 134 | | _ => {} [INFO] [stdout] 135 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 124 ~ if let Err(err) = fs::OpenOptions::new() [INFO] [stdout] 125 + .create(true) [INFO] [stdout] 126 + .write(true) [INFO] [stdout] 127 + .open(&cache_file) { [INFO] [stdout] 128 + error!("{:?}", err); [INFO] [stdout] 129 + error!("Failed to create missing cache file '{cache_file}'"); [INFO] [stdout] 130 + process::exit(1); [INFO] [stdout] 131 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/executables.rs:125:14 [INFO] [stdout] | [INFO] [stdout] 125 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/executables.rs:161:32 [INFO] [stdout] | [INFO] [stdout] 161 | if should_invalidate_cache(&config, &paths) { [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/executables.rs:161:41 [INFO] [stdout] | [INFO] [stdout] 161 | if should_invalidate_cache(&config, &paths) { [INFO] [stdout] | ^^^^^^ help: change this to: `paths` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/executables.rs:172:14 [INFO] [stdout] | [INFO] [stdout] 172 | .map(|executable_result| executable_result.unwrap()) [INFO] [stdout] | ______________^ [INFO] [stdout] 173 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|executable_result| executable_result.unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter` for `Ok` followed by `unwrap` [INFO] [stdout] --> src/executables.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | .filter(|executables_result| executables_result.is_ok()) [INFO] [stdout] | ______________^ [INFO] [stdout] 172 | | .map(|executable_result| executable_result.unwrap()) [INFO] [stdout] | |________________________________________________________________^ help: consider using `flatten` instead: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_filter_map [INFO] [stdout] = note: `#[warn(clippy::result_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/executables.rs:181:9 [INFO] [stdout] | [INFO] [stdout] 181 | / match file.write_all( [INFO] [stdout] 182 | | executables [INFO] [stdout] 183 | | .iter() [INFO] [stdout] 184 | | .map(|e| e.to_string()) [INFO] [stdout] ... | [INFO] [stdout] 193 | | _ => {} [INFO] [stdout] 194 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 181 ~ if let Err(_) = file.write_all( [INFO] [stdout] 182 + executables [INFO] [stdout] 183 + .iter() [INFO] [stdout] 184 + .map(|e| e.to_string()) [INFO] [stdout] 185 + .collect::>() [INFO] [stdout] 186 + .join("\n") [INFO] [stdout] 187 + .as_bytes(), [INFO] [stdout] 188 + ) { [INFO] [stdout] 189 + error!("Failed to update cache file"); [INFO] [stdout] 190 + process::exit(1); [INFO] [stdout] 191 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `executable_data.get(0)` [INFO] [stdout] --> src/executables.rs:218:21 [INFO] [stdout] | [INFO] [stdout] 218 | executable_data.get(0).unwrap().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `executable_data.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/executables.rs:285:33 [INFO] [stdout] | [INFO] [stdout] 285 | let regex = Regex::new(r"%\w").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/executables.rs:279:13 [INFO] [stdout] | [INFO] [stdout] 279 | for line_result in BufReader::new(file).lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 58.33s [INFO] running `Command { std: "docker" "inspect" "702b400a44d03fcdfb16200a1c99211803517ed946ec771d301d1d5d7e5db810", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "702b400a44d03fcdfb16200a1c99211803517ed946ec771d301d1d5d7e5db810", kill_on_drop: false }` [INFO] [stdout] 702b400a44d03fcdfb16200a1c99211803517ed946ec771d301d1d5d7e5db810