[INFO] cloning repository https://github.com/lizzieshinkicker/Cacoco [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lizzieshinkicker/Cacoco" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flizzieshinkicker%2FCacoco", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flizzieshinkicker%2FCacoco'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2d76945420a8eb2bf502f1c2c6e5168e2638a34a [INFO] linting lizzieshinkicker/Cacoco against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flizzieshinkicker%2FCacoco" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/lizzieshinkicker/Cacoco [INFO] finished tweaking git repo https://github.com/lizzieshinkicker/Cacoco [INFO] tweaked toml for git repo https://github.com/lizzieshinkicker/Cacoco written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lizzieshinkicker/Cacoco 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/lizzieshinkicker/Cacoco 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 libz-rs-sys v0.5.4 [INFO] [stderr] Downloaded zip v8.2.0 [INFO] [stderr] Downloaded zlib-rs v0.5.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 46da7cd4ed0eee1a5f234054e09419d3839cc0a0a9acf10fb88ce167207be8f3 [INFO] running `Command { std: "docker" "start" "-a" "46da7cd4ed0eee1a5f234054e09419d3839cc0a0a9acf10fb88ce167207be8f3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "46da7cd4ed0eee1a5f234054e09419d3839cc0a0a9acf10fb88ce167207be8f3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "46da7cd4ed0eee1a5f234054e09419d3839cc0a0a9acf10fb88ce167207be8f3", kill_on_drop: false }` [INFO] [stdout] 46da7cd4ed0eee1a5f234054e09419d3839cc0a0a9acf10fb88ce167207be8f3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 18e776463e637f9aa122edc526527a2e85959af1bfd7e1425e82de77e547fb78 [INFO] running `Command { std: "docker" "start" "-a" "18e776463e637f9aa122edc526527a2e85959af1bfd7e1425e82de77e547fb78", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.103 [INFO] [stderr] Compiling quote v1.0.42 [INFO] [stderr] Compiling libc v0.2.178 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Compiling wayland-sys v0.31.7 [INFO] [stderr] Compiling toml_parser v1.0.4 [INFO] [stderr] Compiling toml_datetime v0.7.3 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Compiling indexmap v2.12.1 [INFO] [stderr] Compiling quick-xml v0.37.5 [INFO] [stderr] Compiling wayland-client v0.31.11 [INFO] [stderr] Checking tracing-core v0.1.35 [INFO] [stderr] Compiling nix v0.30.1 [INFO] [stderr] Checking async-lock v3.4.1 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking blocking v1.6.2 [INFO] [stderr] Checking async-executor v1.13.3 [INFO] [stderr] Checking async-broadcast v0.7.2 [INFO] [stderr] Checking ordered-stream v0.2.0 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Checking xcursor v0.3.10 [INFO] [stderr] Checking xkeysym v0.2.1 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.10 [INFO] [stderr] Checking syn v2.0.111 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking zlib-rs v0.5.4 [INFO] [stderr] Checking strict-num v0.1.1 [INFO] [stderr] Compiling smithay-client-toolkit v0.19.2 [INFO] [stderr] Checking x11rb-protocol v0.13.2 [INFO] [stderr] Checking as-raw-xcb-connection v1.0.1 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Compiling winit v0.30.12 [INFO] [stderr] Checking accesskit_consumer v0.31.0 [INFO] [stderr] Compiling wayland-scanner v0.31.7 [INFO] [stderr] Compiling toml_edit v0.23.9 [INFO] [stderr] Compiling glutin_glx_sys v0.6.1 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Compiling glutin_egl_sys v0.7.1 [INFO] [stderr] Checking epaint_default_fonts v0.33.3 [INFO] [stderr] Checking profiling v1.0.17 [INFO] [stderr] Checking smol_str v0.2.2 [INFO] [stderr] Compiling cc v1.2.49 [INFO] [stderr] Compiling smithay-client-toolkit v0.20.0 [INFO] [stderr] Checking zune-core v0.5.0 [INFO] [stderr] Checking pxfm v0.1.27 [INFO] [stderr] Compiling glutin v0.32.3 [INFO] [stderr] Compiling proc-macro-crate v3.4.0 [INFO] [stderr] Checking zune-jpeg v0.5.6 [INFO] [stderr] Checking libz-rs-sys v0.5.4 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Compiling getrandom v0.4.2 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Checking byteorder-lite v0.1.0 [INFO] [stderr] Checking rand_core v0.10.0 [INFO] [stderr] Checking png v0.18.0 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Compiling glutin-winit v0.5.0 [INFO] [stderr] Checking owned_ttf_parser v0.25.1 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking signal-hook-registry v1.4.7 [INFO] [stderr] Checking ab_glyph v0.2.32 [INFO] [stderr] Checking memmap2 v0.9.9 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Compiling rfd v0.17.1 [INFO] [stderr] Checking option-ext v0.2.0 [INFO] [stderr] Checking libbz2-rs-sys v0.2.2 [INFO] [stderr] Checking cpufeatures v0.3.0 [INFO] [stderr] Checking bumpalo v3.19.0 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking chacha20 v0.10.0 [INFO] [stderr] Checking time v0.3.47 [INFO] [stderr] Checking lzma-rust2 v0.16.2 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking pbkdf2 v0.12.2 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking deflate64 v0.1.10 [INFO] [stderr] Checking ppmd-rust v1.4.0 [INFO] [stderr] Checking constant_time_eq v0.4.2 [INFO] [stderr] Checking zopfli v0.8.3 [INFO] [stderr] Checking pollster v0.4.0 [INFO] [stderr] Checking typed-path v0.12.3 [INFO] [stderr] Checking bzip2 v0.6.1 [INFO] [stderr] Checking rand v0.10.0 [INFO] [stderr] Compiling wayland-backend v0.3.11 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Checking directories v6.0.0 [INFO] [stderr] Checking shlex v1.3.0 [INFO] [stderr] Checking polling v3.11.0 [INFO] [stderr] Checking gethostname v1.1.0 [INFO] [stderr] Checking async-io v2.6.0 [INFO] [stderr] Checking async-signal v0.2.13 [INFO] [stderr] Checking async-process v2.5.0 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Checking moxcms v0.7.10 [INFO] [stderr] Checking wayland-protocols v0.32.9 [INFO] [stderr] Checking wayland-cursor v0.31.11 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling enumflags2_derive v0.7.12 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling zeroize_derive v1.4.2 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stderr] Checking bytemuck v1.24.0 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking tracing v0.1.43 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking emath v0.33.3 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking calloop v0.13.0 [INFO] [stderr] Checking zip v8.2.0 [INFO] [stderr] Checking calloop v0.14.3 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking ecolor v0.33.3 [INFO] [stderr] Checking epaint v0.33.3 [INFO] [stderr] Checking calloop-wayland-source v0.3.0 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking calloop-wayland-source v0.4.1 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking enumflags2 v0.7.12 [INFO] [stderr] Checking zvariant_utils v3.2.1 [INFO] [stderr] Checking quick-xml v0.36.2 [INFO] [stderr] Checking egui v0.33.3 [INFO] [stderr] Compiling toml v0.5.11 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Compiling zvariant_derive v5.8.0 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Compiling zvariant v5.8.0 [INFO] [stderr] Checking x11rb v0.13.2 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Compiling winres v0.1.12 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking wayland-protocols-wlr v0.3.9 [INFO] [stderr] Checking wayland-protocols-plasma v0.3.9 [INFO] [stderr] Checking wayland-protocols-experimental v20250721.0.1 [INFO] [stderr] Checking wayland-protocols-misc v0.3.9 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Compiling cacoco v0.9.3 (/opt/rustwide/workdir) [INFO] [stderr] Checking webbrowser v1.0.6 [INFO] [stderr] Checking arboard v3.6.1 [INFO] [stderr] Checking zbus_names v4.2.0 [INFO] [stderr] Checking egui_glow v0.33.3 [INFO] [stderr] Checking sctk-adwaita v0.10.1 [INFO] [stderr] Checking zbus_xml v5.0.2 [INFO] [stderr] Checking smithay-clipboard v0.7.3 [INFO] [stderr] Checking zbus-lockstep v0.5.2 [INFO] [stderr] Compiling zbus_macros v5.12.0 [INFO] [stderr] Compiling zbus-lockstep-macros v0.5.2 [INFO] [stderr] Checking zbus v5.12.0 [INFO] [stderr] Checking atspi-common v0.9.0 [INFO] [stderr] Checking atspi-proxies v0.9.0 [INFO] [stderr] Checking accesskit_atspi_common v0.14.2 [INFO] [stderr] Checking atspi-connection v0.9.0 [INFO] [stderr] Checking atspi v0.25.0 [INFO] [stderr] Checking accesskit_unix v0.17.2 [INFO] [stderr] Checking accesskit_winit v0.29.2 [INFO] [stderr] Checking egui-winit v0.33.3 [INFO] [stderr] Checking eframe v0.33.3 [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if app.config.base_wad_path.is_none() { [INFO] [stdout] 141 | | if let Some(auto_path) = crate::discovery::find_iwad() { [INFO] [stdout] 142 | | let path_str = auto_path.to_string_lossy().to_string(); [INFO] [stdout] 143 | | app.config.base_wad_path = Some(path_str.clone()); [INFO] [stdout] ... | [INFO] [stdout] 147 | | } [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] 140 ~ if app.config.base_wad_path.is_none() [INFO] [stdout] 141 ~ && let Some(auto_path) = crate::discovery::find_iwad() { [INFO] [stdout] 142 | let path_str = auto_path.to_string_lossy().to_string(); [INFO] [stdout] ... [INFO] [stdout] 145 | println!("Auto-discovered IWAD at: {}", path_str); [INFO] [stdout] 146 ~ } [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:271:17 [INFO] [stdout] | [INFO] [stdout] 271 | / match &mut data { [INFO] [stdout] 272 | | crate::models::ProjectData::StatusBar(s) => { [INFO] [stdout] 273 | | s.normalize_paths(); [INFO] [stdout] 274 | | s.target = s.determine_target(); [INFO] [stdout] ... | [INFO] [stdout] 277 | | _ => {} [INFO] [stdout] 278 | | } [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] 271 ~ if let crate::models::ProjectData::StatusBar(s) = &mut data { [INFO] [stdout] 272 + s.normalize_paths(); [INFO] [stdout] 273 + s.target = s.determine_target(); [INFO] [stdout] 274 + s.normalize_for_target(); [INFO] [stdout] 275 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:339:9 [INFO] [stdout] | [INFO] [stdout] 339 | / if let Some(path) = io::open_project_dialog() { [INFO] [stdout] 340 | | if let Some(loaded) = io::load_project_from_path(ctx, &path) { [INFO] [stdout] 341 | | self.load_project(ctx, loaded, &path); [INFO] [stdout] 342 | | } [INFO] [stdout] 343 | | } [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] 339 ~ if let Some(path) = io::open_project_dialog() [INFO] [stdout] 340 ~ && let Some(loaded) = io::load_project_from_path(ctx, &path) { [INFO] [stdout] 341 | self.load_project(ctx, loaded, &path); [INFO] [stdout] 342 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/assets.rs:55:1 [INFO] [stdout] | [INFO] [stdout] 55 | / impl Default for AssetStore { [INFO] [stdout] 56 | | fn default() -> Self { [INFO] [stdout] 57 | | Self { [INFO] [stdout] 58 | | textures: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [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] 36 + #[derive(Default)] [INFO] [stdout] 37 | pub struct AssetStore { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/assets.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | / pub fn load_rgba_with_offset( [INFO] [stdout] 169 | | &mut self, [INFO] [stdout] 170 | | ctx: &egui::Context, [INFO] [stdout] 171 | | name: &str, [INFO] [stdout] ... | [INFO] [stdout] 176 | | pixels: &[u8], [INFO] [stdout] 177 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/assets.rs:262:20 [INFO] [stdout] | [INFO] [stdout] 262 | } else if name.starts_with("RSKY") { [INFO] [stdout] | ____________________^ [INFO] [stdout] 263 | | if let Some(fallback) = name.strip_prefix('R') { [INFO] [stdout] 264 | | id = AssetId::new(fallback); [INFO] [stdout] 265 | | } [INFO] [stdout] 266 | | } [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] 262 ~ } else if name.starts_with("RSKY") [INFO] [stdout] 263 ~ && let Some(fallback) = name.strip_prefix('R') { [INFO] [stdout] 264 | id = AssetId::new(fallback); [INFO] [stdout] 265 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/assets.rs:274:9 [INFO] [stdout] | [INFO] [stdout] 274 | / if let Some(bytes) = self.raw_files.get(&id) { [INFO] [stdout] 275 | | if let Ok(img) = image::load_from_memory(bytes) { [INFO] [stdout] 276 | | let flipped = img.fliph(); [INFO] [stdout] 277 | | let mut buffer = std::io::Cursor::new(Vec::new()); [INFO] [stdout] ... | [INFO] [stdout] 293 | | } [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] 274 ~ if let Some(bytes) = self.raw_files.get(&id) [INFO] [stdout] 275 ~ && let Ok(img) = image::load_from_memory(bytes) { [INFO] [stdout] 276 | let flipped = img.fliph(); [INFO] [stdout] ... [INFO] [stdout] 291 | } [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/cheats.rs:134:1 [INFO] [stdout] | [INFO] [stdout] 134 | / impl Default for CheatEngine { [INFO] [stdout] 135 | | fn default() -> Self { [INFO] [stdout] 136 | | Self { [INFO] [stdout] 137 | | buffer: String::new(), [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [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] 130 + #[derive(Default)] [INFO] [stdout] 131 | pub struct CheatEngine { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/config.rs:28:42 [INFO] [stdout] | [INFO] [stdout] 28 | if let Some(last_part) = app_id.split('.').last() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 28 - if let Some(last_part) = app_id.split('.').last() { [INFO] [stdout] 28 + if let Some(last_part) = app_id.split('.').next_back() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/discovery.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | / if let Ok(val) = env::var("DOOMWADDIR") { [INFO] [stdout] 36 | | if let Some(found) = scan_dir_for_iwad(Path::new(&val)) { [INFO] [stdout] 37 | | return Some(found); [INFO] [stdout] 38 | | } [INFO] [stdout] 39 | | } [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] 35 ~ if let Ok(val) = env::var("DOOMWADDIR") [INFO] [stdout] 36 ~ && let Some(found) = scan_dir_for_iwad(Path::new(&val)) { [INFO] [stdout] 37 | return Some(found); [INFO] [stdout] 38 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/discovery.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | / if !candidate.exists() { [INFO] [stdout] 136 | | if let Ok(entries) = dir.read_dir() { [INFO] [stdout] 137 | | for entry in entries.flatten() { [INFO] [stdout] 138 | | if let Some(file_name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 146 | | } [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] 135 ~ if !candidate.exists() [INFO] [stdout] 136 ~ && let Ok(entries) = dir.read_dir() { [INFO] [stdout] 137 | for entry in entries.flatten() { [INFO] [stdout] ... [INFO] [stdout] 144 | } [INFO] [stdout] 145 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/discovery.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | / if let Some(file_name) = entry.file_name().to_str() { [INFO] [stdout] 139 | | if file_name.eq_ignore_ascii_case(name) { [INFO] [stdout] 140 | | candidate = entry.path(); [INFO] [stdout] 141 | | break; [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#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 138 ~ if let Some(file_name) = entry.file_name().to_str() [INFO] [stdout] 139 ~ && file_name.eq_ignore_ascii_case(name) { [INFO] [stdout] 140 | candidate = entry.path(); [INFO] [stdout] 141 | break; [INFO] [stdout] 142 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/discovery.rs:167:13 [INFO] [stdout] | [INFO] [stdout] 167 | / if path.is_dir() { [INFO] [stdout] 168 | | if let Some(found) = scan_dir_recursive(&path, depth - 1) { [INFO] [stdout] 169 | | return Some(found); [INFO] [stdout] 170 | | } [INFO] [stdout] 171 | | } [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] 167 ~ if path.is_dir() [INFO] [stdout] 168 ~ && let Some(found) = scan_dir_recursive(&path, depth - 1) { [INFO] [stdout] 169 | return Some(found); [INFO] [stdout] 170 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/document/actions.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / pub enum DocumentAction { [INFO] [stdout] 5 | | /// Forces an undo snapshot. [INFO] [stdout] 6 | | UndoSnapshot, [INFO] [stdout] 7 | | /// Actions shared by any hierarchical tree (SBARDEF elements, INTERLEVEL anims). [INFO] [stdout] 8 | | Tree(TreeAction), [INFO] [stdout] | | ---------------- the largest variant contains at least 296 bytes [INFO] [stdout] ... | [INFO] [stdout] 14 | | Umap(UmapAction), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 56 bytes [INFO] [stdout] 15 | | } [INFO] [stdout] | |_^ the entire enum is at least 296 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 8 - Tree(TreeAction), [INFO] [stdout] 8 + Tree(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/document/actions.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / pub enum TreeAction { [INFO] [stdout] 19 | | Delete(Vec>), [INFO] [stdout] 20 | | Duplicate(Vec>), [INFO] [stdout] 21 | | MoveUp(Vec), [INFO] [stdout] 22 | | MoveDown(Vec), [INFO] [stdout] 23 | | / MoveSelection { [INFO] [stdout] 24 | | | sources: Vec>, [INFO] [stdout] 25 | | | target_parent: Vec, [INFO] [stdout] 26 | | | insert_idx: usize, [INFO] [stdout] 27 | | | }, [INFO] [stdout] | | |_____- the second-largest variant contains at least 56 bytes [INFO] [stdout] ... | [INFO] [stdout] 40 | | / Add { [INFO] [stdout] 41 | | | parent_path: Vec, [INFO] [stdout] 42 | | | insert_idx: usize, [INFO] [stdout] 43 | | | element: ElementWrapper, [INFO] [stdout] 44 | | | }, [INFO] [stdout] | | |_____- the largest variant contains at least 296 bytes [INFO] [stdout] 45 | | Group(Vec>), [INFO] [stdout] 46 | | } [INFO] [stdout] | |___^ the entire enum is at least 296 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 43 - element: ElementWrapper, [INFO] [stdout] 43 + element: Box, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/tree.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / if let Some((list, idx)) = get_parent_list_and_idx(file, &path) { [INFO] [stdout] 60 | | if idx < list.len() { [INFO] [stdout] 61 | | list.remove(idx); [INFO] [stdout] 62 | | } [INFO] [stdout] 63 | | } [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] 59 ~ if let Some((list, idx)) = get_parent_list_and_idx(file, &path) [INFO] [stdout] 60 ~ && idx < list.len() { [INFO] [stdout] 61 | list.remove(idx); [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/tree.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | / if let Some((list, idx)) = get_parent_list_and_idx(file, &path) { [INFO] [stdout] 112 | | if idx > 0 { [INFO] [stdout] 113 | | list.swap(idx, idx - 1); [INFO] [stdout] 114 | | selection.clear(); [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [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] 111 ~ if let Some((list, idx)) = get_parent_list_and_idx(file, &path) [INFO] [stdout] 112 ~ && idx > 0 { [INFO] [stdout] 113 | list.swap(idx, idx - 1); [INFO] [stdout] ... [INFO] [stdout] 117 | selection.insert(new_path); [INFO] [stdout] 118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/tree.rs:123:5 [INFO] [stdout] | [INFO] [stdout] 123 | / if let Some((list, idx)) = get_parent_list_and_idx(file, &path) { [INFO] [stdout] 124 | | if idx < list.len() - 1 { [INFO] [stdout] 125 | | list.swap(idx, idx + 1); [INFO] [stdout] 126 | | selection.clear(); [INFO] [stdout] ... | [INFO] [stdout] 131 | | } [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] 123 ~ if let Some((list, idx)) = get_parent_list_and_idx(file, &path) [INFO] [stdout] 124 ~ && idx < list.len() - 1 { [INFO] [stdout] 125 | list.swap(idx, idx + 1); [INFO] [stdout] ... [INFO] [stdout] 129 | selection.insert(new_path); [INFO] [stdout] 130 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `current_pos` is used as a loop counter [INFO] [stdout] --> src/document/tree.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | for el in elements { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (current_pos, el) in (insert_idx.min(list.len())..).zip(elements.into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/tree.rs:264:9 [INFO] [stdout] | [INFO] [stdout] 264 | / if let Some((list, idx)) = get_parent_list_and_idx(file, &src) { [INFO] [stdout] 265 | | if idx < list.len() { [INFO] [stdout] 266 | | moved_elements.push(list.remove(idx)); [INFO] [stdout] 267 | | } [INFO] [stdout] 268 | | } [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] 264 ~ if let Some((list, idx)) = get_parent_list_and_idx(file, &src) [INFO] [stdout] 265 ~ && idx < list.len() { [INFO] [stdout] 266 | moved_elements.push(list.remove(idx)); [INFO] [stdout] 267 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/document/tree.rs:311:34 [INFO] [stdout] | [INFO] [stdout] 311 | fn sort_paths_for_removal(paths: &mut Vec>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 311 - fn sort_paths_for_removal(paths: &mut Vec>) { [INFO] [stdout] 311 + fn sort_paths_for_removal(paths: &mut [Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/mod.rs:89:36 [INFO] [stdout] | [INFO] [stdout] 89 | ... } else if let Some(ProjectData::UmapInfo(_)) = active_lump { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 90 | | ... if let TreeAction::Select(paths) = tree_act { [INFO] [stdout] 91 | | ... selection_ref.clear(); [INFO] [stdout] 92 | | ... for path in paths { [INFO] [stdout] ... | [INFO] [stdout] 96 | | ... } [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] 89 ~ } else if let Some(ProjectData::UmapInfo(_)) = active_lump [INFO] [stdout] 90 ~ && let TreeAction::Select(paths) = tree_act { [INFO] [stdout] 91 | selection_ref.clear(); [INFO] [stdout] ... [INFO] [stdout] 94 | } [INFO] [stdout] 95 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/history.rs:45:24 [INFO] [stdout] | [INFO] [stdout] 45 | current_lumps: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 45 ~ current_lumps: &[ProjectData], [INFO] [stdout] 46 | current_selection: &HashSet>, [INFO] [stdout] 47 | ) { [INFO] [stdout] 48 | self.undo_stack.push_back(Snapshot { [INFO] [stdout] 49 ~ lumps: current_lumps.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:162:13 [INFO] [stdout] | [INFO] [stdout] 162 | / if f.read_to_end(&mut lump_data).is_ok() { [INFO] [stdout] 163 | | if let Some(parsed) = crate::models::ProjectData::parse_lump(&name, &lump_data) { [INFO] [stdout] 164 | | lumps.push(parsed); [INFO] [stdout] 165 | | } [INFO] [stdout] 166 | | } [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] 162 ~ if f.read_to_end(&mut lump_data).is_ok() [INFO] [stdout] 163 ~ && let Some(parsed) = crate::models::ProjectData::parse_lump(&name, &lump_data) { [INFO] [stdout] 164 | lumps.push(parsed); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:309:5 [INFO] [stdout] | [INFO] [stdout] 309 | / if let Some(path) = dialog.save_file() { [INFO] [stdout] 310 | | if fs::write(&path, json_content).is_ok() { [INFO] [stdout] 311 | | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 312 | | } [INFO] [stdout] 313 | | } [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] 309 ~ if let Some(path) = dialog.save_file() [INFO] [stdout] 310 ~ && fs::write(&path, json_content).is_ok() { [INFO] [stdout] 311 | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 312 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:379:5 [INFO] [stdout] | [INFO] [stdout] 379 | / if let Some(path) = dialog.save_file() { [INFO] [stdout] 380 | | if let Ok(mut f) = fs::File::create(&path) { [INFO] [stdout] 381 | | if wad::write_wad_to_file(&mut f, lumps, assets, passthrough).is_ok() { [INFO] [stdout] 382 | | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] ... | [INFO] [stdout] 385 | | } [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] 379 ~ if let Some(path) = dialog.save_file() [INFO] [stdout] 380 ~ && let Ok(mut f) = fs::File::create(&path) { [INFO] [stdout] 381 | if wad::write_wad_to_file(&mut f, lumps, assets, passthrough).is_ok() { [INFO] [stdout] 382 | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 383 | } [INFO] [stdout] 384 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:380:9 [INFO] [stdout] | [INFO] [stdout] 380 | / if let Ok(mut f) = fs::File::create(&path) { [INFO] [stdout] 381 | | if wad::write_wad_to_file(&mut f, lumps, assets, passthrough).is_ok() { [INFO] [stdout] 382 | | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 383 | | } [INFO] [stdout] 384 | | } [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] 380 ~ if let Ok(mut f) = fs::File::create(&path) [INFO] [stdout] 381 ~ && wad::write_wad_to_file(&mut f, lumps, assets, passthrough).is_ok() { [INFO] [stdout] 382 | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 383 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:402:5 [INFO] [stdout] | [INFO] [stdout] 402 | / if let Some(path) = FileDialog::new() [INFO] [stdout] 403 | | .add_filter("Doom WAD", &["wad", "WAD"]) [INFO] [stdout] 404 | | .set_title("Select Base WAD (e.g., DOOM2.WAD)") [INFO] [stdout] 405 | | .pick_file() [INFO] [stdout] ... | [INFO] [stdout] 412 | | } [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] 405 ~ .pick_file() [INFO] [stdout] 406 ~ && let Ok(mut file) = fs::File::open(&path) { [INFO] [stdout] 407 | if wad::load_wad_into_store(ctx, &mut file, assets).is_ok() { [INFO] [stdout] 408 | return path.to_str().map(|s| s.to_string()); [INFO] [stdout] 409 | } [INFO] [stdout] 410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:407:9 [INFO] [stdout] | [INFO] [stdout] 407 | / if let Ok(mut file) = fs::File::open(&path) { [INFO] [stdout] 408 | | if wad::load_wad_into_store(ctx, &mut file, assets).is_ok() { [INFO] [stdout] 409 | | return path.to_str().map(|s| s.to_string()); [INFO] [stdout] 410 | | } [INFO] [stdout] 411 | | } [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] 407 ~ if let Ok(mut file) = fs::File::open(&path) [INFO] [stdout] 408 ~ && wad::load_wad_into_store(ctx, &mut file, assets).is_ok() { [INFO] [stdout] 409 | return path.to_str().map(|s| s.to_string()); [INFO] [stdout] 410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / if app.config.base_wad_path.is_none() { [INFO] [stdout] 141 | | if let Some(auto_path) = crate::discovery::find_iwad() { [INFO] [stdout] 142 | | let path_str = auto_path.to_string_lossy().to_string(); [INFO] [stdout] 143 | | app.config.base_wad_path = Some(path_str.clone()); [INFO] [stdout] ... | [INFO] [stdout] 147 | | } [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] 140 ~ if app.config.base_wad_path.is_none() [INFO] [stdout] 141 ~ && let Some(auto_path) = crate::discovery::find_iwad() { [INFO] [stdout] 142 | let path_str = auto_path.to_string_lossy().to_string(); [INFO] [stdout] ... [INFO] [stdout] 145 | println!("Auto-discovered IWAD at: {}", path_str); [INFO] [stdout] 146 ~ } [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:271:17 [INFO] [stdout] | [INFO] [stdout] 271 | / match &mut data { [INFO] [stdout] 272 | | crate::models::ProjectData::StatusBar(s) => { [INFO] [stdout] 273 | | s.normalize_paths(); [INFO] [stdout] 274 | | s.target = s.determine_target(); [INFO] [stdout] ... | [INFO] [stdout] 277 | | _ => {} [INFO] [stdout] 278 | | } [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] 271 ~ if let crate::models::ProjectData::StatusBar(s) = &mut data { [INFO] [stdout] 272 + s.normalize_paths(); [INFO] [stdout] 273 + s.target = s.determine_target(); [INFO] [stdout] 274 + s.normalize_for_target(); [INFO] [stdout] 275 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:339:9 [INFO] [stdout] | [INFO] [stdout] 339 | / if let Some(path) = io::open_project_dialog() { [INFO] [stdout] 340 | | if let Some(loaded) = io::load_project_from_path(ctx, &path) { [INFO] [stdout] 341 | | self.load_project(ctx, loaded, &path); [INFO] [stdout] 342 | | } [INFO] [stdout] 343 | | } [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] 339 ~ if let Some(path) = io::open_project_dialog() [INFO] [stdout] 340 ~ && let Some(loaded) = io::load_project_from_path(ctx, &path) { [INFO] [stdout] 341 | self.load_project(ctx, loaded, &path); [INFO] [stdout] 342 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/assets.rs:55:1 [INFO] [stdout] | [INFO] [stdout] 55 | / impl Default for AssetStore { [INFO] [stdout] 56 | | fn default() -> Self { [INFO] [stdout] 57 | | Self { [INFO] [stdout] 58 | | textures: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [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] 36 + #[derive(Default)] [INFO] [stdout] 37 | pub struct AssetStore { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/assets.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | / pub fn load_rgba_with_offset( [INFO] [stdout] 169 | | &mut self, [INFO] [stdout] 170 | | ctx: &egui::Context, [INFO] [stdout] 171 | | name: &str, [INFO] [stdout] ... | [INFO] [stdout] 176 | | pixels: &[u8], [INFO] [stdout] 177 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/assets.rs:262:20 [INFO] [stdout] | [INFO] [stdout] 262 | } else if name.starts_with("RSKY") { [INFO] [stdout] | ____________________^ [INFO] [stdout] 263 | | if let Some(fallback) = name.strip_prefix('R') { [INFO] [stdout] 264 | | id = AssetId::new(fallback); [INFO] [stdout] 265 | | } [INFO] [stdout] 266 | | } [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] 262 ~ } else if name.starts_with("RSKY") [INFO] [stdout] 263 ~ && let Some(fallback) = name.strip_prefix('R') { [INFO] [stdout] 264 | id = AssetId::new(fallback); [INFO] [stdout] 265 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/assets.rs:274:9 [INFO] [stdout] | [INFO] [stdout] 274 | / if let Some(bytes) = self.raw_files.get(&id) { [INFO] [stdout] 275 | | if let Ok(img) = image::load_from_memory(bytes) { [INFO] [stdout] 276 | | let flipped = img.fliph(); [INFO] [stdout] 277 | | let mut buffer = std::io::Cursor::new(Vec::new()); [INFO] [stdout] ... | [INFO] [stdout] 293 | | } [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] 274 ~ if let Some(bytes) = self.raw_files.get(&id) [INFO] [stdout] 275 ~ && let Ok(img) = image::load_from_memory(bytes) { [INFO] [stdout] 276 | let flipped = img.fliph(); [INFO] [stdout] ... [INFO] [stdout] 291 | } [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/cheats.rs:134:1 [INFO] [stdout] | [INFO] [stdout] 134 | / impl Default for CheatEngine { [INFO] [stdout] 135 | | fn default() -> Self { [INFO] [stdout] 136 | | Self { [INFO] [stdout] 137 | | buffer: String::new(), [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [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] 130 + #[derive(Default)] [INFO] [stdout] 131 | pub struct CheatEngine { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/config.rs:28:42 [INFO] [stdout] | [INFO] [stdout] 28 | if let Some(last_part) = app_id.split('.').last() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 28 - if let Some(last_part) = app_id.split('.').last() { [INFO] [stdout] 28 + if let Some(last_part) = app_id.split('.').next_back() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/discovery.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | / if let Ok(val) = env::var("DOOMWADDIR") { [INFO] [stdout] 36 | | if let Some(found) = scan_dir_for_iwad(Path::new(&val)) { [INFO] [stdout] 37 | | return Some(found); [INFO] [stdout] 38 | | } [INFO] [stdout] 39 | | } [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] 35 ~ if let Ok(val) = env::var("DOOMWADDIR") [INFO] [stdout] 36 ~ && let Some(found) = scan_dir_for_iwad(Path::new(&val)) { [INFO] [stdout] 37 | return Some(found); [INFO] [stdout] 38 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/discovery.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | / if !candidate.exists() { [INFO] [stdout] 136 | | if let Ok(entries) = dir.read_dir() { [INFO] [stdout] 137 | | for entry in entries.flatten() { [INFO] [stdout] 138 | | if let Some(file_name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 146 | | } [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] 135 ~ if !candidate.exists() [INFO] [stdout] 136 ~ && let Ok(entries) = dir.read_dir() { [INFO] [stdout] 137 | for entry in entries.flatten() { [INFO] [stdout] ... [INFO] [stdout] 144 | } [INFO] [stdout] 145 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/discovery.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | / if let Some(file_name) = entry.file_name().to_str() { [INFO] [stdout] 139 | | if file_name.eq_ignore_ascii_case(name) { [INFO] [stdout] 140 | | candidate = entry.path(); [INFO] [stdout] 141 | | break; [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#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 138 ~ if let Some(file_name) = entry.file_name().to_str() [INFO] [stdout] 139 ~ && file_name.eq_ignore_ascii_case(name) { [INFO] [stdout] 140 | candidate = entry.path(); [INFO] [stdout] 141 | break; [INFO] [stdout] 142 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/discovery.rs:167:13 [INFO] [stdout] | [INFO] [stdout] 167 | / if path.is_dir() { [INFO] [stdout] 168 | | if let Some(found) = scan_dir_recursive(&path, depth - 1) { [INFO] [stdout] 169 | | return Some(found); [INFO] [stdout] 170 | | } [INFO] [stdout] 171 | | } [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] 167 ~ if path.is_dir() [INFO] [stdout] 168 ~ && let Some(found) = scan_dir_recursive(&path, depth - 1) { [INFO] [stdout] 169 | return Some(found); [INFO] [stdout] 170 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/document/actions.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / pub enum DocumentAction { [INFO] [stdout] 5 | | /// Forces an undo snapshot. [INFO] [stdout] 6 | | UndoSnapshot, [INFO] [stdout] 7 | | /// Actions shared by any hierarchical tree (SBARDEF elements, INTERLEVEL anims). [INFO] [stdout] 8 | | Tree(TreeAction), [INFO] [stdout] | | ---------------- the largest variant contains at least 296 bytes [INFO] [stdout] ... | [INFO] [stdout] 14 | | Umap(UmapAction), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 56 bytes [INFO] [stdout] 15 | | } [INFO] [stdout] | |_^ the entire enum is at least 296 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 8 - Tree(TreeAction), [INFO] [stdout] 8 + Tree(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/document/actions.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / pub enum TreeAction { [INFO] [stdout] 19 | | Delete(Vec>), [INFO] [stdout] 20 | | Duplicate(Vec>), [INFO] [stdout] 21 | | MoveUp(Vec), [INFO] [stdout] 22 | | MoveDown(Vec), [INFO] [stdout] 23 | | / MoveSelection { [INFO] [stdout] 24 | | | sources: Vec>, [INFO] [stdout] 25 | | | target_parent: Vec, [INFO] [stdout] 26 | | | insert_idx: usize, [INFO] [stdout] 27 | | | }, [INFO] [stdout] | | |_____- the second-largest variant contains at least 56 bytes [INFO] [stdout] ... | [INFO] [stdout] 40 | | / Add { [INFO] [stdout] 41 | | | parent_path: Vec, [INFO] [stdout] 42 | | | insert_idx: usize, [INFO] [stdout] 43 | | | element: ElementWrapper, [INFO] [stdout] 44 | | | }, [INFO] [stdout] | | |_____- the largest variant contains at least 296 bytes [INFO] [stdout] 45 | | Group(Vec>), [INFO] [stdout] 46 | | } [INFO] [stdout] | |___^ the entire enum is at least 296 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 43 - element: ElementWrapper, [INFO] [stdout] 43 + element: Box, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/tree.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / if let Some((list, idx)) = get_parent_list_and_idx(file, &path) { [INFO] [stdout] 60 | | if idx < list.len() { [INFO] [stdout] 61 | | list.remove(idx); [INFO] [stdout] 62 | | } [INFO] [stdout] 63 | | } [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] 59 ~ if let Some((list, idx)) = get_parent_list_and_idx(file, &path) [INFO] [stdout] 60 ~ && idx < list.len() { [INFO] [stdout] 61 | list.remove(idx); [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/tree.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | / if let Some((list, idx)) = get_parent_list_and_idx(file, &path) { [INFO] [stdout] 112 | | if idx > 0 { [INFO] [stdout] 113 | | list.swap(idx, idx - 1); [INFO] [stdout] 114 | | selection.clear(); [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [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] 111 ~ if let Some((list, idx)) = get_parent_list_and_idx(file, &path) [INFO] [stdout] 112 ~ && idx > 0 { [INFO] [stdout] 113 | list.swap(idx, idx - 1); [INFO] [stdout] ... [INFO] [stdout] 117 | selection.insert(new_path); [INFO] [stdout] 118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/tree.rs:123:5 [INFO] [stdout] | [INFO] [stdout] 123 | / if let Some((list, idx)) = get_parent_list_and_idx(file, &path) { [INFO] [stdout] 124 | | if idx < list.len() - 1 { [INFO] [stdout] 125 | | list.swap(idx, idx + 1); [INFO] [stdout] 126 | | selection.clear(); [INFO] [stdout] ... | [INFO] [stdout] 131 | | } [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] 123 ~ if let Some((list, idx)) = get_parent_list_and_idx(file, &path) [INFO] [stdout] 124 ~ && idx < list.len() - 1 { [INFO] [stdout] 125 | list.swap(idx, idx + 1); [INFO] [stdout] ... [INFO] [stdout] 129 | selection.insert(new_path); [INFO] [stdout] 130 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `current_pos` is used as a loop counter [INFO] [stdout] --> src/document/tree.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | for el in elements { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (current_pos, el) in (insert_idx.min(list.len())..).zip(elements.into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/tree.rs:264:9 [INFO] [stdout] | [INFO] [stdout] 264 | / if let Some((list, idx)) = get_parent_list_and_idx(file, &src) { [INFO] [stdout] 265 | | if idx < list.len() { [INFO] [stdout] 266 | | moved_elements.push(list.remove(idx)); [INFO] [stdout] 267 | | } [INFO] [stdout] 268 | | } [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] 264 ~ if let Some((list, idx)) = get_parent_list_and_idx(file, &src) [INFO] [stdout] 265 ~ && idx < list.len() { [INFO] [stdout] 266 | moved_elements.push(list.remove(idx)); [INFO] [stdout] 267 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/document/tree.rs:311:34 [INFO] [stdout] | [INFO] [stdout] 311 | fn sort_paths_for_removal(paths: &mut Vec>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 311 - fn sort_paths_for_removal(paths: &mut Vec>) { [INFO] [stdout] 311 + fn sort_paths_for_removal(paths: &mut [Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/document/mod.rs:89:36 [INFO] [stdout] | [INFO] [stdout] 89 | ... } else if let Some(ProjectData::UmapInfo(_)) = active_lump { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 90 | | ... if let TreeAction::Select(paths) = tree_act { [INFO] [stdout] 91 | | ... selection_ref.clear(); [INFO] [stdout] 92 | | ... for path in paths { [INFO] [stdout] ... | [INFO] [stdout] 96 | | ... } [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] 89 ~ } else if let Some(ProjectData::UmapInfo(_)) = active_lump [INFO] [stdout] 90 ~ && let TreeAction::Select(paths) = tree_act { [INFO] [stdout] 91 | selection_ref.clear(); [INFO] [stdout] ... [INFO] [stdout] 94 | } [INFO] [stdout] 95 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/history.rs:45:24 [INFO] [stdout] | [INFO] [stdout] 45 | current_lumps: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 45 ~ current_lumps: &[ProjectData], [INFO] [stdout] 46 | current_selection: &HashSet>, [INFO] [stdout] 47 | ) { [INFO] [stdout] 48 | self.undo_stack.push_back(Snapshot { [INFO] [stdout] 49 ~ lumps: current_lumps.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/hotkeys.rs:159:9 [INFO] [stdout] | [INFO] [stdout] 159 | input.modifiers = Modifiers::COMMAND; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `eframe::egui::RawInput { modifiers: Modifiers::COMMAND, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/hotkeys.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | let mut input = RawInput::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/hotkeys.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | input.modifiers = Modifiers::COMMAND; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `eframe::egui::RawInput { modifiers: Modifiers::COMMAND, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/hotkeys.rs:181:9 [INFO] [stdout] | [INFO] [stdout] 181 | let mut input = RawInput::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] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/hotkeys.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | input.modifiers = Modifiers::COMMAND; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `eframe::egui::RawInput { modifiers: Modifiers::COMMAND, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/hotkeys.rs:204:9 [INFO] [stdout] | [INFO] [stdout] 204 | let mut input = RawInput::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] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/hotkeys.rs:221:31 [INFO] [stdout] | [INFO] [stdout] 221 | ctx.input(|i| assert!(i.key_pressed(Key::C) == false || action.is_some())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!i.key_pressed(Key::C)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MBF` contains a capitalized acronym [INFO] [stdout] --> src/models/sbardef.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | MBF = 4, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mbf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:162:13 [INFO] [stdout] | [INFO] [stdout] 162 | / if f.read_to_end(&mut lump_data).is_ok() { [INFO] [stdout] 163 | | if let Some(parsed) = crate::models::ProjectData::parse_lump(&name, &lump_data) { [INFO] [stdout] 164 | | lumps.push(parsed); [INFO] [stdout] 165 | | } [INFO] [stdout] 166 | | } [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] 162 ~ if f.read_to_end(&mut lump_data).is_ok() [INFO] [stdout] 163 ~ && let Some(parsed) = crate::models::ProjectData::parse_lump(&name, &lump_data) { [INFO] [stdout] 164 | lumps.push(parsed); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:309:5 [INFO] [stdout] | [INFO] [stdout] 309 | / if let Some(path) = dialog.save_file() { [INFO] [stdout] 310 | | if fs::write(&path, json_content).is_ok() { [INFO] [stdout] 311 | | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 312 | | } [INFO] [stdout] 313 | | } [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] 309 ~ if let Some(path) = dialog.save_file() [INFO] [stdout] 310 ~ && fs::write(&path, json_content).is_ok() { [INFO] [stdout] 311 | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 312 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:379:5 [INFO] [stdout] | [INFO] [stdout] 379 | / if let Some(path) = dialog.save_file() { [INFO] [stdout] 380 | | if let Ok(mut f) = fs::File::create(&path) { [INFO] [stdout] 381 | | if wad::write_wad_to_file(&mut f, lumps, assets, passthrough).is_ok() { [INFO] [stdout] 382 | | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] ... | [INFO] [stdout] 385 | | } [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] 379 ~ if let Some(path) = dialog.save_file() [INFO] [stdout] 380 ~ && let Ok(mut f) = fs::File::create(&path) { [INFO] [stdout] 381 | if wad::write_wad_to_file(&mut f, lumps, assets, passthrough).is_ok() { [INFO] [stdout] 382 | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 383 | } [INFO] [stdout] 384 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:380:9 [INFO] [stdout] | [INFO] [stdout] 380 | / if let Ok(mut f) = fs::File::create(&path) { [INFO] [stdout] 381 | | if wad::write_wad_to_file(&mut f, lumps, assets, passthrough).is_ok() { [INFO] [stdout] 382 | | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 383 | | } [INFO] [stdout] 384 | | } [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] 380 ~ if let Ok(mut f) = fs::File::create(&path) [INFO] [stdout] 381 ~ && wad::write_wad_to_file(&mut f, lumps, assets, passthrough).is_ok() { [INFO] [stdout] 382 | return Some(path.to_string_lossy().into_owned()); [INFO] [stdout] 383 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:402:5 [INFO] [stdout] | [INFO] [stdout] 402 | / if let Some(path) = FileDialog::new() [INFO] [stdout] 403 | | .add_filter("Doom WAD", &["wad", "WAD"]) [INFO] [stdout] 404 | | .set_title("Select Base WAD (e.g., DOOM2.WAD)") [INFO] [stdout] 405 | | .pick_file() [INFO] [stdout] ... | [INFO] [stdout] 412 | | } [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] 405 ~ .pick_file() [INFO] [stdout] 406 ~ && let Ok(mut file) = fs::File::open(&path) { [INFO] [stdout] 407 | if wad::load_wad_into_store(ctx, &mut file, assets).is_ok() { [INFO] [stdout] 408 | return path.to_str().map(|s| s.to_string()); [INFO] [stdout] 409 | } [INFO] [stdout] 410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/io.rs:407:9 [INFO] [stdout] | [INFO] [stdout] 407 | / if let Ok(mut file) = fs::File::open(&path) { [INFO] [stdout] 408 | | if wad::load_wad_into_store(ctx, &mut file, assets).is_ok() { [INFO] [stdout] 409 | | return path.to_str().map(|s| s.to_string()); [INFO] [stdout] 410 | | } [INFO] [stdout] 411 | | } [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] 407 ~ if let Ok(mut file) = fs::File::open(&path) [INFO] [stdout] 408 ~ && wad::load_wad_into_store(ctx, &mut file, assets).is_ok() { [INFO] [stdout] 409 | return path.to_str().map(|s| s.to_string()); [INFO] [stdout] 410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MBF` contains a capitalized acronym [INFO] [stdout] --> src/models/sbardef.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | MBF = 4, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mbf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/sbardef.rs:701:17 [INFO] [stdout] | [INFO] [stdout] 701 | / if s.type_ == 0 { [INFO] [stdout] 702 | | if let Some(data) = &s.data { [INFO] [stdout] 703 | | if !data.is_empty() { [INFO] [stdout] 704 | | return format!("\"{}\"", data); [INFO] [stdout] ... | [INFO] [stdout] 707 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 701 ~ if s.type_ == 0 [INFO] [stdout] 702 ~ && let Some(data) = &s.data { [INFO] [stdout] 703 | if !data.is_empty() { [INFO] [stdout] 704 | return format!("\"{}\"", data); [INFO] [stdout] 705 | } [INFO] [stdout] 706 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/sbardef.rs:702:21 [INFO] [stdout] | [INFO] [stdout] 702 | / if let Some(data) = &s.data { [INFO] [stdout] 703 | | if !data.is_empty() { [INFO] [stdout] 704 | | return format!("\"{}\"", data); [INFO] [stdout] 705 | | } [INFO] [stdout] 706 | | } [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] 702 ~ if let Some(data) = &s.data [INFO] [stdout] 703 ~ && !data.is_empty() { [INFO] [stdout] 704 | return format!("\"{}\"", data); [INFO] [stdout] 705 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/sbardef.rs:847:21 [INFO] [stdout] | [INFO] [stdout] 847 | / if (n.type_ as u8) > 7 { [INFO] [stdout] 848 | | return true; [INFO] [stdout] 849 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 846 ~ Element::Number(n) | Element::Percent(n) [INFO] [stdout] 847 ~ if (n.type_ as u8) > 7 => { [INFO] [stdout] 848 | return true; [INFO] [stdout] 849 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/models/sbardef.rs:993:42 [INFO] [stdout] | [INFO] [stdout] 993 | let is_empty_array = obj [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 994 | | .get(&k) [INFO] [stdout] 995 | | .and_then(|v| v.as_array()) [INFO] [stdout] 996 | | .map_or(false, |a| a.is_empty()); [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 996 - .map_or(false, |a| a.is_empty()); [INFO] [stdout] 996 + .is_some_and(|a| a.is_empty()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/sbardef.rs:1021:13 [INFO] [stdout] | [INFO] [stdout] 1021 | / if target == ExportTarget::Basic { [INFO] [stdout] 1022 | | if let Element::Native(def) = &el.data { [INFO] [stdout] 1023 | | el.data = Element::Canvas(def.clone()); [INFO] [stdout] 1024 | | } [INFO] [stdout] 1025 | | } [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] 1021 ~ if target == ExportTarget::Basic [INFO] [stdout] 1022 ~ && let Element::Native(def) = &el.data { [INFO] [stdout] 1023 | el.data = Element::Canvas(def.clone()); [INFO] [stdout] 1024 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/umap_graph.rs:70:21 [INFO] [stdout] | [INFO] [stdout] 70 | / if lines.len() != 1 || lines[0].to_lowercase() != "clear" { [INFO] [stdout] 71 | | data.has_text_normal = true; [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ UmapField::InterText(lines) [INFO] [stdout] 70 ~ if (lines.len() != 1 || lines[0].to_lowercase() != "clear") => { [INFO] [stdout] 71 | data.has_text_normal = true; [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/umap_graph.rs:75:21 [INFO] [stdout] | [INFO] [stdout] 75 | / if lines.len() != 1 || lines[0].to_lowercase() != "clear" { [INFO] [stdout] 76 | | data.has_text_secret = true; [INFO] [stdout] 77 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 74 ~ UmapField::InterTextSecret(lines) [INFO] [stdout] 75 ~ if (lines.len() != 1 || lines[0].to_lowercase() != "clear") => { [INFO] [stdout] 76 | data.has_text_secret = true; [INFO] [stdout] 77 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/umap_graph.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | / if patch.to_lowercase() != "clear" { [INFO] [stdout] 85 | | data.episode_fields.push((patch.clone(), name.clone())); [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 83 ~ UmapField::Episode { patch, name, .. } [INFO] [stdout] 84 ~ if patch.to_lowercase() != "clear" => { [INFO] [stdout] 85 | data.episode_fields.push((patch.clone(), name.clone())); [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/umap_graph.rs:131:25 [INFO] [stdout] | [INFO] [stdout] 131 | / if lines.len() != 1 || lines[0].to_lowercase() != "clear" { [INFO] [stdout] 132 | | has_text = true; [INFO] [stdout] 133 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 130 ~ UmapField::InterText(lines) [INFO] [stdout] 131 ~ if (lines.len() != 1 || lines[0].to_lowercase() != "clear") => { [INFO] [stdout] 132 | has_text = true; [INFO] [stdout] 133 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/umap_graph.rs:361:9 [INFO] [stdout] | [INFO] [stdout] 361 | / if let Some(pos) = metadata [INFO] [stdout] 362 | | .get("node_positions") [INFO] [stdout] 363 | | .and_then(|p| p.get(id)) [INFO] [stdout] 364 | | .and_then(|arr| arr.as_array()) [INFO] [stdout] ... | [INFO] [stdout] 371 | | } [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] 364 ~ .and_then(|arr| arr.as_array()) [INFO] [stdout] 365 ~ && pos.len() == 2 { [INFO] [stdout] 366 | if let (Some(x), Some(y)) = (pos[0].as_f64(), pos[1].as_f64()) { [INFO] [stdout] 367 | return (x as f32, y as f32); [INFO] [stdout] 368 | } [INFO] [stdout] 369 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/umap_graph.rs:366:13 [INFO] [stdout] | [INFO] [stdout] 366 | / if pos.len() == 2 { [INFO] [stdout] 367 | | if let (Some(x), Some(y)) = (pos[0].as_f64(), pos[1].as_f64()) { [INFO] [stdout] 368 | | return (x as f32, y as f32); [INFO] [stdout] 369 | | } [INFO] [stdout] 370 | | } [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] 366 ~ if pos.len() == 2 [INFO] [stdout] 367 ~ && let (Some(x), Some(y)) = (pos[0].as_f64(), pos[1].as_f64()) { [INFO] [stdout] 368 | return (x as f32, y as f32); [INFO] [stdout] 369 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/models/umapinfo.rs:176:29 [INFO] [stdout] | [INFO] [stdout] 176 | ... out.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/models/umapinfo.rs:329:55 [INFO] [stdout] | [INFO] [stdout] 329 | ... val_joined.split(',').map(|s| clean_segment(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&clean_segment` [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: redundant closure [INFO] [stdout] --> src/models/umapinfo.rs:343:51 [INFO] [stdout] | [INFO] [stdout] 343 | val_joined.split(',').map(|s| clean_segment(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `clean_segment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/mod.rs:292:12 [INFO] [stdout] | [INFO] [stdout] 292 | } else if let Some(n) = v.as_f64() { [INFO] [stdout] | ____________^ [INFO] [stdout] 293 | | if n.fract() == 0.0 { [INFO] [stdout] 294 | | *v = serde_json::json!(n as i64); [INFO] [stdout] 295 | | } [INFO] [stdout] 296 | | } [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] 292 ~ } else if let Some(n) = v.as_f64() [INFO] [stdout] 293 ~ && n.fract() == 0.0 { [INFO] [stdout] 294 | *v = serde_json::json!(n as i64); [INFO] [stdout] 295 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/sbardef.rs:701:17 [INFO] [stdout] | [INFO] [stdout] 701 | / if s.type_ == 0 { [INFO] [stdout] 702 | | if let Some(data) = &s.data { [INFO] [stdout] 703 | | if !data.is_empty() { [INFO] [stdout] 704 | | return format!("\"{}\"", data); [INFO] [stdout] ... | [INFO] [stdout] 707 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 701 ~ if s.type_ == 0 [INFO] [stdout] 702 ~ && let Some(data) = &s.data { [INFO] [stdout] 703 | if !data.is_empty() { [INFO] [stdout] 704 | return format!("\"{}\"", data); [INFO] [stdout] 705 | } [INFO] [stdout] 706 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/sbardef.rs:702:21 [INFO] [stdout] | [INFO] [stdout] 702 | / if let Some(data) = &s.data { [INFO] [stdout] 703 | | if !data.is_empty() { [INFO] [stdout] 704 | | return format!("\"{}\"", data); [INFO] [stdout] 705 | | } [INFO] [stdout] 706 | | } [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] 702 ~ if let Some(data) = &s.data [INFO] [stdout] 703 ~ && !data.is_empty() { [INFO] [stdout] 704 | return format!("\"{}\"", data); [INFO] [stdout] 705 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/sbardef.rs:847:21 [INFO] [stdout] | [INFO] [stdout] 847 | / if (n.type_ as u8) > 7 { [INFO] [stdout] 848 | | return true; [INFO] [stdout] 849 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 846 ~ Element::Number(n) | Element::Percent(n) [INFO] [stdout] 847 ~ if (n.type_ as u8) > 7 => { [INFO] [stdout] 848 | return true; [INFO] [stdout] 849 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `heat` [INFO] [stdout] --> src/render/fire.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | for i in start..heat.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 17 - for i in start..heat.len() { [INFO] [stdout] 17 + for in heat.iter_mut().skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/models/sbardef.rs:993:42 [INFO] [stdout] | [INFO] [stdout] 993 | let is_empty_array = obj [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 994 | | .get(&k) [INFO] [stdout] 995 | | .and_then(|v| v.as_array()) [INFO] [stdout] 996 | | .map_or(false, |a| a.is_empty()); [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 996 - .map_or(false, |a| a.is_empty()); [INFO] [stdout] 996 + .is_some_and(|a| a.is_empty()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/sbardef.rs:1021:13 [INFO] [stdout] | [INFO] [stdout] 1021 | / if target == ExportTarget::Basic { [INFO] [stdout] 1022 | | if let Element::Native(def) = &el.data { [INFO] [stdout] 1023 | | el.data = Element::Canvas(def.clone()); [INFO] [stdout] 1024 | | } [INFO] [stdout] 1025 | | } [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] 1021 ~ if target == ExportTarget::Basic [INFO] [stdout] 1022 ~ && let Element::Native(def) = &el.data { [INFO] [stdout] 1023 | el.data = Element::Canvas(def.clone()); [INFO] [stdout] 1024 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `colors` [INFO] [stdout] --> src/render/palette.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | for i in 0..256 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 10 - for i in 0..256 { [INFO] [stdout] 10 + for (i, ) in colors.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `colors` [INFO] [stdout] --> src/render/palette.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 0..256 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 20 - for i in 0..256 { [INFO] [stdout] 20 + for (i, ) in colors.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> src/render/patch.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | for i in 0..4096 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 79 - for i in 0..4096 { [INFO] [stdout] 79 + for (i, ) in data.iter().enumerate().take(4096) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/sky.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / if sky.sky_type == SkyType::WithForeground { [INFO] [stdout] 40 | | if let Some(fore) = &sky.foregroundtex { [INFO] [stdout] 41 | | let fore_id = assets.resolve_sky_id(&fore.name); [INFO] [stdout] 42 | | draw_single_sky_layer( [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [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] 39 ~ if sky.sky_type == SkyType::WithForeground [INFO] [stdout] 40 ~ && let Some(fore) = &sky.foregroundtex { [INFO] [stdout] 41 | let fore_id = assets.resolve_sky_id(&fore.name); [INFO] [stdout] ... [INFO] [stdout] 54 | ); [INFO] [stdout] 55 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/render/sky.rs:59:1 [INFO] [stdout] | [INFO] [stdout] 59 | / fn draw_single_sky_layer( [INFO] [stdout] 60 | | painter: &egui::Painter, [INFO] [stdout] 61 | | id: AssetId, [INFO] [stdout] 62 | | mid: f32, [INFO] [stdout] ... | [INFO] [stdout] 70 | | time: f64, [INFO] [stdout] 71 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `r.saturating_add(add)` is never greater than `255` and has therefore no effect [INFO] [stdout] --> src/render/umapinfo/constants.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | r.saturating_add(add).min(255), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r.saturating_add(add)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `g.saturating_add(add)` is never greater than `255` and has therefore no effect [INFO] [stdout] --> src/render/umapinfo/constants.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | g.saturating_add(add).min(255), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g.saturating_add(add)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `b.saturating_add(add)` is never greater than `255` and has therefore no effect [INFO] [stdout] --> src/render/umapinfo/constants.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | b.saturating_add(add).min(255), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `b.saturating_add(add)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/render/umapinfo/edges.rs:81:33 [INFO] [stdout] | [INFO] [stdout] 81 | let mut segment_tracks: HashMap<((i32, i32), (i32, i32)), (String, bool)> = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/edges.rs:184:21 [INFO] [stdout] | [INFO] [stdout] 184 | / if let Some((owner, owner_is_secret)) = point_tracks.get(&(nx, ny)) { [INFO] [stdout] 185 | | if owner != &edge.target || *owner_is_secret != is_secret { [INFO] [stdout] 186 | | if is_turning { [INFO] [stdout] 187 | | new_cost += 10000; [INFO] [stdout] ... | [INFO] [stdout] 192 | | } [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] 184 ~ if let Some((owner, owner_is_secret)) = point_tracks.get(&(nx, ny)) [INFO] [stdout] 185 ~ && (owner != &edge.target || *owner_is_secret != is_secret) { [INFO] [stdout] 186 | if is_turning { [INFO] [stdout] ... [INFO] [stdout] 190 | } [INFO] [stdout] 191 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/edges.rs:194:21 [INFO] [stdout] | [INFO] [stdout] 194 | / if let Some((owner, owner_is_secret)) = corners.get(&(nx, ny)) { [INFO] [stdout] 195 | | if owner != &edge.target || *owner_is_secret != is_secret { [INFO] [stdout] 196 | | new_cost += 10000; [INFO] [stdout] 197 | | } [INFO] [stdout] 198 | | } [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] 194 ~ if let Some((owner, owner_is_secret)) = corners.get(&(nx, ny)) [INFO] [stdout] 195 ~ && (owner != &edge.target || *owner_is_secret != is_secret) { [INFO] [stdout] 196 | new_cost += 10000; [INFO] [stdout] 197 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/umap_graph.rs:70:21 [INFO] [stdout] | [INFO] [stdout] 70 | / if lines.len() != 1 || lines[0].to_lowercase() != "clear" { [INFO] [stdout] 71 | | data.has_text_normal = true; [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ UmapField::InterText(lines) [INFO] [stdout] 70 ~ if (lines.len() != 1 || lines[0].to_lowercase() != "clear") => { [INFO] [stdout] 71 | data.has_text_normal = true; [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/umap_graph.rs:75:21 [INFO] [stdout] | [INFO] [stdout] 75 | / if lines.len() != 1 || lines[0].to_lowercase() != "clear" { [INFO] [stdout] 76 | | data.has_text_secret = true; [INFO] [stdout] 77 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 74 ~ UmapField::InterTextSecret(lines) [INFO] [stdout] 75 ~ if (lines.len() != 1 || lines[0].to_lowercase() != "clear") => { [INFO] [stdout] 76 | data.has_text_secret = true; [INFO] [stdout] 77 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/umap_graph.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | / if patch.to_lowercase() != "clear" { [INFO] [stdout] 85 | | data.episode_fields.push((patch.clone(), name.clone())); [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 83 ~ UmapField::Episode { patch, name, .. } [INFO] [stdout] 84 ~ if patch.to_lowercase() != "clear" => { [INFO] [stdout] 85 | data.episode_fields.push((patch.clone(), name.clone())); [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/render/umapinfo/edges.rs:365:25 [INFO] [stdout] | [INFO] [stdout] 365 | sp[last] = sp[last] + dir * tip_inset; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sp[last] += dir * tip_inset` [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/models/umap_graph.rs:131:25 [INFO] [stdout] | [INFO] [stdout] 131 | / if lines.len() != 1 || lines[0].to_lowercase() != "clear" { [INFO] [stdout] 132 | | has_text = true; [INFO] [stdout] 133 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 130 ~ UmapField::InterText(lines) [INFO] [stdout] 131 ~ if (lines.len() != 1 || lines[0].to_lowercase() != "clear") => { [INFO] [stdout] 132 | has_text = true; [INFO] [stdout] 133 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | / if let Some(rect) = node_rects.get(&node.id) { [INFO] [stdout] 25 | | if rect.contains(point) { [INFO] [stdout] 26 | | return Some(NodeHit { node: node.clone() }); [INFO] [stdout] 27 | | } [INFO] [stdout] 28 | | } [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] 24 ~ if let Some(rect) = node_rects.get(&node.id) [INFO] [stdout] 25 ~ && rect.contains(point) { [INFO] [stdout] 26 | return Some(NodeHit { node: node.clone() }); [INFO] [stdout] 27 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/render/umapinfo/interaction.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / if let Some(pos) = id.find("::") { [INFO] [stdout] 42 | | Some(id[..pos].to_uppercase()) [INFO] [stdout] 43 | | } else { [INFO] [stdout] 44 | | None [INFO] [stdout] 45 | | } [INFO] [stdout] | |_____^ help: try: `id.find("::").map(|pos| id[..pos].to_uppercase())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(idx) = center_idx { [INFO] [stdout] 76 | | if let Some(map) = file.data.maps.get(idx) { [INFO] [stdout] 77 | | let map_id = map.mapname.to_uppercase(); [INFO] [stdout] ... | [INFO] [stdout] 109 | | } [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] 75 ~ if let Some(idx) = center_idx [INFO] [stdout] 76 ~ && let Some(map) = file.data.maps.get(idx) { [INFO] [stdout] 77 | let map_id = map.mapname.to_uppercase(); [INFO] [stdout] ... [INFO] [stdout] 107 | } [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/render/umapinfo/interaction.rs:313:12 [INFO] [stdout] | [INFO] [stdout] 313 | if !crate::ui::context_menu::ContextMenu::get(ui, bg_menu_id).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `crate::ui::context_menu::ContextMenu::get(ui, bg_menu_id).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/umap_graph.rs:361:9 [INFO] [stdout] | [INFO] [stdout] 361 | / if let Some(pos) = metadata [INFO] [stdout] 362 | | .get("node_positions") [INFO] [stdout] 363 | | .and_then(|p| p.get(id)) [INFO] [stdout] 364 | | .and_then(|arr| arr.as_array()) [INFO] [stdout] ... | [INFO] [stdout] 371 | | } [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] 364 ~ .and_then(|arr| arr.as_array()) [INFO] [stdout] 365 ~ && pos.len() == 2 { [INFO] [stdout] 366 | if let (Some(x), Some(y)) = (pos[0].as_f64(), pos[1].as_f64()) { [INFO] [stdout] 367 | return (x as f32, y as f32); [INFO] [stdout] 368 | } [INFO] [stdout] 369 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/umap_graph.rs:366:13 [INFO] [stdout] | [INFO] [stdout] 366 | / if pos.len() == 2 { [INFO] [stdout] 367 | | if let (Some(x), Some(y)) = (pos[0].as_f64(), pos[1].as_f64()) { [INFO] [stdout] 368 | | return (x as f32, y as f32); [INFO] [stdout] 369 | | } [INFO] [stdout] 370 | | } [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] 366 ~ if pos.len() == 2 [INFO] [stdout] 367 ~ && let (Some(x), Some(y)) = (pos[0].as_f64(), pos[1].as_f64()) { [INFO] [stdout] 368 | return (x as f32, y as f32); [INFO] [stdout] 369 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / if active_connector_drag.is_none() && !ctx.is_panning { [INFO] [stdout] 162 | | if let Some(pos) = interact_pos.or(ctx.viewport_res.hover_pos()) { [INFO] [stdout] 163 | | let just_pressed = ui.input(|i| { [INFO] [stdout] 164 | | i.events.iter().any(|e| { [INFO] [stdout] ... | [INFO] [stdout] 190 | | } [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] 161 ~ if active_connector_drag.is_none() && !ctx.is_panning [INFO] [stdout] 162 ~ && let Some(pos) = interact_pos.or(ctx.viewport_res.hover_pos()) { [INFO] [stdout] 163 | let just_pressed = ui.input(|i| { [INFO] [stdout] ... [INFO] [stdout] 188 | } [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:237:13 [INFO] [stdout] | [INFO] [stdout] 237 | / if !hit_connector { [INFO] [stdout] 238 | | if let Some(node_hit) = detect_node_hit(pos, graph, node_rects) { [INFO] [stdout] 239 | | if let Some(idx) = find_map_index_for_node(file, &node_hit.node) { [INFO] [stdout] 240 | | actions.push(select_map_action(idx)); [INFO] [stdout] ... | [INFO] [stdout] 243 | | } [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] 237 ~ if !hit_connector [INFO] [stdout] 238 ~ && let Some(node_hit) = detect_node_hit(pos, graph, node_rects) { [INFO] [stdout] 239 | if let Some(idx) = find_map_index_for_node(file, &node_hit.node) { [INFO] [stdout] 240 | actions.push(select_map_action(idx)); [INFO] [stdout] 241 | } [INFO] [stdout] 242 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:238:17 [INFO] [stdout] | [INFO] [stdout] 238 | / if let Some(node_hit) = detect_node_hit(pos, graph, node_rects) { [INFO] [stdout] 239 | | if let Some(idx) = find_map_index_for_node(file, &node_hit.node) { [INFO] [stdout] 240 | | actions.push(select_map_action(idx)); [INFO] [stdout] 241 | | } [INFO] [stdout] 242 | | } [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] 238 ~ if let Some(node_hit) = detect_node_hit(pos, graph, node_rects) [INFO] [stdout] 239 ~ && let Some(idx) = find_map_index_for_node(file, &node_hit.node) { [INFO] [stdout] 240 | actions.push(select_map_action(idx)); [INFO] [stdout] 241 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:256:5 [INFO] [stdout] | [INFO] [stdout] 256 | / if just_opened { [INFO] [stdout] 257 | | if let Some(pos) = ui.input(|i| i.pointer.interact_pos()) { [INFO] [stdout] 258 | | let hit_connector = [INFO] [stdout] 259 | | detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x).is_some(); [INFO] [stdout] ... | [INFO] [stdout] 278 | | } [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] 256 ~ if just_opened [INFO] [stdout] 257 ~ && let Some(pos) = ui.input(|i| i.pointer.interact_pos()) { [INFO] [stdout] 258 | let hit_connector = [INFO] [stdout] ... [INFO] [stdout] 276 | } [INFO] [stdout] 277 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:321:5 [INFO] [stdout] | [INFO] [stdout] 321 | / if is_bg_panning && active_connector_drag.is_none() { [INFO] [stdout] 322 | | if ctx [INFO] [stdout] 323 | | .viewport_res [INFO] [stdout] 324 | | .dragged_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] ... | [INFO] [stdout] 330 | | } [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] 321 ~ if is_bg_panning && active_connector_drag.is_none() [INFO] [stdout] 322 ~ && ctx [INFO] [stdout] 323 | .viewport_res [INFO] [stdout] ... [INFO] [stdout] 328 | ui.ctx().request_repaint(); [INFO] [stdout] 329 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:332:5 [INFO] [stdout] | [INFO] [stdout] 332 | / if let Some(ref node_id) = dragged_node { [INFO] [stdout] 333 | | if ctx [INFO] [stdout] 334 | | .viewport_res [INFO] [stdout] 335 | | .dragged_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] ... | [INFO] [stdout] 359 | | } [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] 332 ~ if let Some(ref node_id) = dragged_node [INFO] [stdout] 333 ~ && ctx [INFO] [stdout] 334 | .viewport_res [INFO] [stdout] ... [INFO] [stdout] 357 | } [INFO] [stdout] 358 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:333:9 [INFO] [stdout] | [INFO] [stdout] 333 | / if ctx [INFO] [stdout] 334 | | .viewport_res [INFO] [stdout] 335 | | .dragged_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] ... | [INFO] [stdout] 358 | | } [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] 335 ~ .dragged_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] 336 ~ && let (Some(ptr_start), Some(n_start), Some(current_ptr)) = [INFO] [stdout] 337 | (start_ptr, node_start, ui.input(|i| i.pointer.latest_pos())) [INFO] [stdout] ... [INFO] [stdout] 355 | ui.ctx().request_repaint(); [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:370:5 [INFO] [stdout] | [INFO] [stdout] 370 | / if active_connector_drag.is_none() [INFO] [stdout] 371 | | && ctx [INFO] [stdout] 372 | | .viewport_res [INFO] [stdout] 373 | | .drag_started_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] ... | [INFO] [stdout] 389 | | } [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] 375 ~ && dragged_node.is_none() [INFO] [stdout] 376 ~ && let Some(pos) = click_pos { [INFO] [stdout] 377 | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] ... [INFO] [stdout] 386 | } [INFO] [stdout] 387 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:377:9 [INFO] [stdout] | [INFO] [stdout] 377 | / if let Some(pos) = click_pos { [INFO] [stdout] 378 | | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] 379 | | { [INFO] [stdout] 380 | | ui.ctx().data_mut(|d| { [INFO] [stdout] ... | [INFO] [stdout] 388 | | } [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] 377 ~ if let Some(pos) = click_pos [INFO] [stdout] 378 ~ && let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] 379 | { [INFO] [stdout] ... [INFO] [stdout] 386 | actions.push(DocumentAction::UndoSnapshot); [INFO] [stdout] 387 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / if secondary_clicked && !ctx.is_panning { [INFO] [stdout] 396 | | if let Some(pos) = click_pos { [INFO] [stdout] 397 | | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] ... | [INFO] [stdout] 427 | | } [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] 395 ~ if secondary_clicked && !ctx.is_panning [INFO] [stdout] 396 ~ && let Some(pos) = click_pos { [INFO] [stdout] 397 | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] ... [INFO] [stdout] 425 | } [INFO] [stdout] 426 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:396:9 [INFO] [stdout] | [INFO] [stdout] 396 | / if let Some(pos) = click_pos { [INFO] [stdout] 397 | | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] 398 | | { [INFO] [stdout] 399 | | let map_id = if let Some(idx) = hit.node_id.find("::") { [INFO] [stdout] ... | [INFO] [stdout] 426 | | } [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] 396 ~ if let Some(pos) = click_pos [INFO] [stdout] 397 ~ && let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] 398 | { [INFO] [stdout] ... [INFO] [stdout] 424 | } [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:451:21 [INFO] [stdout] | [INFO] [stdout] 451 | / if let Some(rect) = node_rects.get(&target_node.id) { [INFO] [stdout] 452 | | if rect.contains(pos) { [INFO] [stdout] 453 | | if let NodeType::Map { .. } = &target_node.node_type { [INFO] [stdout] 454 | | let source_map_id = extract_map_id_from_node( [INFO] [stdout] ... | [INFO] [stdout] 493 | | } [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] 451 ~ if let Some(rect) = node_rects.get(&target_node.id) [INFO] [stdout] 452 ~ && rect.contains(pos) { [INFO] [stdout] 453 | if let NodeType::Map { .. } = &target_node.node_type { [INFO] [stdout] ... [INFO] [stdout] 491 | break; [INFO] [stdout] 492 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/render/umapinfo/interaction.rs:455:37 [INFO] [stdout] | [INFO] [stdout] 455 | ... &graph.nodes.iter().find(|n| n.id == source_node_id).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `graph.nodes.iter().find(|n| n.id == source_node_id).unwrap()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/render/umapinfo/interaction.rs:472:49 [INFO] [stdout] | [INFO] [stdout] 472 | / ... &graph [INFO] [stdout] 473 | | ... .nodes [INFO] [stdout] 474 | | ... .iter() [INFO] [stdout] 475 | | ... .find(|n| n.id == source_node_id) [INFO] [stdout] 476 | | ... .unwrap(), [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 472 ~ graph [INFO] [stdout] 473 + .nodes [INFO] [stdout] 474 + .iter() [INFO] [stdout] 475 + .find(|n| n.id == source_node_id) [INFO] [stdout] 476 ~ .unwrap(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/nodes.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | / if let Some(rect) = node_rects.get(&node.id) { [INFO] [stdout] 35 | | if rect.contains(pos) { [INFO] [stdout] 36 | | return Some(node.id.as_str()); [INFO] [stdout] 37 | | } [INFO] [stdout] 38 | | } [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] 34 ~ if let Some(rect) = node_rects.get(&node.id) [INFO] [stdout] 35 ~ && rect.contains(pos) { [INFO] [stdout] 36 | return Some(node.id.as_str()); [INFO] [stdout] 37 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/render/umapinfo/viewport.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | hovered_node.as_deref(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `hovered_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] = note: `#[warn(clippy::needless_option_as_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/render/mod.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | let is_hovered_branch = ctx [INFO] [stdout] | _____________________________^ [INFO] [stdout] 122 | | .state [INFO] [stdout] 123 | | .interaction [INFO] [stdout] 124 | | .hovered_path [INFO] [stdout] 125 | | .as_ref() [INFO] [stdout] 126 | | .map_or(false, |h| current_path.starts_with(h)); [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 126 - .map_or(false, |h| current_path.starts_with(h)); [INFO] [stdout] 126 + .is_some_and(|h| current_path.starts_with(h)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/render/mod.rs:127:29 [INFO] [stdout] | [INFO] [stdout] 127 | let is_grabbed_branch = ctx [INFO] [stdout] | _____________________________^ [INFO] [stdout] 128 | | .state [INFO] [stdout] 129 | | .interaction [INFO] [stdout] 130 | | .grabbed_path [INFO] [stdout] 131 | | .as_ref() [INFO] [stdout] 132 | | .map_or(false, |g| current_path.starts_with(g)); [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 132 - .map_or(false, |g| current_path.starts_with(g)); [INFO] [stdout] 132 + .is_some_and(|g| current_path.starts_with(g)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/mod.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | / if is_native_container && ctx.pass == RenderPass::Background { [INFO] [stdout] 157 | | if let Some(bounds) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 158 | | let screen_rect = ctx.to_screen_rect(bounds); [INFO] [stdout] 159 | | ctx.painter.rect_stroke( [INFO] [stdout] ... | [INFO] [stdout] 166 | | } [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] 156 ~ if is_native_container && ctx.pass == RenderPass::Background [INFO] [stdout] 157 ~ && let Some(bounds) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 158 | let screen_rect = ctx.to_screen_rect(bounds); [INFO] [stdout] ... [INFO] [stdout] 164 | ); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/mod.rs:248:12 [INFO] [stdout] | [INFO] [stdout] 248 | } else if let Element::List(l) = &element.data { [INFO] [stdout] | ____________^ [INFO] [stdout] 249 | | if let Some(hit) = [INFO] [stdout] 250 | | list::hit_test_list(&local_ctx, l, pos, current_path, true, container_mode) [INFO] [stdout] ... | [INFO] [stdout] 257 | | } [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] 248 ~ } else if let Element::List(l) = &element.data [INFO] [stdout] 249 ~ && let Some(hit) = [INFO] [stdout] 250 | list::hit_test_list(&local_ctx, l, pos, current_path, true, container_mode) [INFO] [stdout] ... [INFO] [stdout] 255 | return Some(hit); [INFO] [stdout] 256 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/mod.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | / if is_selectable { [INFO] [stdout] 267 | | if let Some(rect) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 268 | | if rect.contains(ctx.mouse_pos) { [INFO] [stdout] 269 | | return Some(current_path.clone()); [INFO] [stdout] ... | [INFO] [stdout] 272 | | } [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] 266 ~ if is_selectable [INFO] [stdout] 267 ~ && let Some(rect) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 268 | if rect.contains(ctx.mouse_pos) { [INFO] [stdout] 269 | return Some(current_path.clone()); [INFO] [stdout] 270 | } [INFO] [stdout] 271 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/mod.rs:267:9 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Some(rect) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 268 | | if rect.contains(ctx.mouse_pos) { [INFO] [stdout] 269 | | return Some(current_path.clone()); [INFO] [stdout] 270 | | } [INFO] [stdout] 271 | | } [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] 267 ~ if let Some(rect) = get_element_bounds(&local_ctx, element, pos) [INFO] [stdout] 268 ~ && rect.contains(ctx.mouse_pos) { [INFO] [stdout] 269 | return Some(current_path.clone()); [INFO] [stdout] 270 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/models/umapinfo.rs:176:29 [INFO] [stdout] | [INFO] [stdout] 176 | ... out.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/models/umapinfo.rs:329:55 [INFO] [stdout] | [INFO] [stdout] 329 | ... val_joined.split(',').map(|s| clean_segment(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&clean_segment` [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: redundant closure [INFO] [stdout] --> src/models/umapinfo.rs:343:51 [INFO] [stdout] | [INFO] [stdout] 343 | val_joined.split(',').map(|s| clean_segment(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `clean_segment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/mod.rs:292:12 [INFO] [stdout] | [INFO] [stdout] 292 | } else if let Some(n) = v.as_f64() { [INFO] [stdout] | ____________^ [INFO] [stdout] 293 | | if n.fract() == 0.0 { [INFO] [stdout] 294 | | *v = serde_json::json!(n as i64); [INFO] [stdout] 295 | | } [INFO] [stdout] 296 | | } [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] 292 ~ } else if let Some(n) = v.as_f64() [INFO] [stdout] 293 ~ && n.fract() == 0.0 { [INFO] [stdout] 294 | *v = serde_json::json!(n as i64); [INFO] [stdout] 295 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `heat` [INFO] [stdout] --> src/render/fire.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | for i in start..heat.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 17 - for i in start..heat.len() { [INFO] [stdout] 17 + for in heat.iter_mut().skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `colors` [INFO] [stdout] --> src/render/palette.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | for i in 0..256 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 10 - for i in 0..256 { [INFO] [stdout] 10 + for (i, ) in colors.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `colors` [INFO] [stdout] --> src/render/palette.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 0..256 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 20 - for i in 0..256 { [INFO] [stdout] 20 + for (i, ) in colors.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> src/render/patch.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | for i in 0..4096 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 79 - for i in 0..4096 { [INFO] [stdout] 79 + for (i, ) in data.iter().enumerate().take(4096) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/sky.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / if sky.sky_type == SkyType::WithForeground { [INFO] [stdout] 40 | | if let Some(fore) = &sky.foregroundtex { [INFO] [stdout] 41 | | let fore_id = assets.resolve_sky_id(&fore.name); [INFO] [stdout] 42 | | draw_single_sky_layer( [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [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] 39 ~ if sky.sky_type == SkyType::WithForeground [INFO] [stdout] 40 ~ && let Some(fore) = &sky.foregroundtex { [INFO] [stdout] 41 | let fore_id = assets.resolve_sky_id(&fore.name); [INFO] [stdout] ... [INFO] [stdout] 54 | ); [INFO] [stdout] 55 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/render/sky.rs:59:1 [INFO] [stdout] | [INFO] [stdout] 59 | / fn draw_single_sky_layer( [INFO] [stdout] 60 | | painter: &egui::Painter, [INFO] [stdout] 61 | | id: AssetId, [INFO] [stdout] 62 | | mid: f32, [INFO] [stdout] ... | [INFO] [stdout] 70 | | time: f64, [INFO] [stdout] 71 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:47:35 [INFO] [stdout] | [INFO] [stdout] 47 | inv.has_invulnerability = d.get(&0).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 47 - inv.has_invulnerability = d.get(&0).map_or(false, |v| *v > 0.0); [INFO] [stdout] 47 + inv.has_invulnerability = d.get(&0).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:48:27 [INFO] [stdout] | [INFO] [stdout] 48 | inv.has_berserk = d.get(&1).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 48 - inv.has_berserk = d.get(&1).map_or(false, |v| *v > 0.0); [INFO] [stdout] 48 + inv.has_berserk = d.get(&1).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | inv.has_invisibility = d.get(&2).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 49 - inv.has_invisibility = d.get(&2).map_or(false, |v| *v > 0.0); [INFO] [stdout] 49 + inv.has_invisibility = d.get(&2).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:50:27 [INFO] [stdout] | [INFO] [stdout] 50 | inv.has_radsuit = d.get(&3).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 50 - inv.has_radsuit = d.get(&3).map_or(false, |v| *v > 0.0); [INFO] [stdout] 50 + inv.has_radsuit = d.get(&3).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:51:27 [INFO] [stdout] | [INFO] [stdout] 51 | inv.has_automap = d.get(&4).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 51 - inv.has_automap = d.get(&4).map_or(false, |v| *v > 0.0); [INFO] [stdout] 51 + inv.has_automap = d.get(&4).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | inv.has_liteamp = d.get(&5).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 52 - inv.has_liteamp = d.get(&5).map_or(false, |v| *v > 0.0); [INFO] [stdout] 52 + inv.has_liteamp = d.get(&5).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `r.saturating_add(add)` is never greater than `255` and has therefore no effect [INFO] [stdout] --> src/render/umapinfo/constants.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | r.saturating_add(add).min(255), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r.saturating_add(add)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `g.saturating_add(add)` is never greater than `255` and has therefore no effect [INFO] [stdout] --> src/render/umapinfo/constants.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | g.saturating_add(add).min(255), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g.saturating_add(add)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `b.saturating_add(add)` is never greater than `255` and has therefore no effect [INFO] [stdout] --> src/render/umapinfo/constants.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | b.saturating_add(add).min(255), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `b.saturating_add(add)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/context_menu.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | / if !just_opened && ui.input(|i| i.pointer.any_click()) { [INFO] [stdout] 69 | | if !area_res.response.hovered() { [INFO] [stdout] 70 | | Self::close(ui); [INFO] [stdout] 71 | | } [INFO] [stdout] 72 | | } [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] 68 ~ if !just_opened && ui.input(|i| i.pointer.any_click()) [INFO] [stdout] 69 ~ && !area_res.response.hovered() { [INFO] [stdout] 70 | Self::close(ui); [INFO] [stdout] 71 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/render/umapinfo/edges.rs:81:33 [INFO] [stdout] | [INFO] [stdout] 81 | let mut segment_tracks: HashMap<((i32, i32), (i32, i32)), (String, bool)> = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/font_wizard.rs:184:13 [INFO] [stdout] | [INFO] [stdout] 184 | / if suffix.chars().all(|c| c.is_ascii_digit()) { [INFO] [stdout] 185 | | if let Ok(val) = suffix.parse::() { [INFO] [stdout] 186 | | if val >= 33 && val <= 126 { [INFO] [stdout] 187 | | looks_like_hud = true; [INFO] [stdout] ... | [INFO] [stdout] 191 | | } [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] 184 ~ if suffix.chars().all(|c| c.is_ascii_digit()) [INFO] [stdout] 185 ~ && let Ok(val) = suffix.parse::() { [INFO] [stdout] 186 | if val >= 33 && val <= 126 { [INFO] [stdout] ... [INFO] [stdout] 189 | } [INFO] [stdout] 190 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/edges.rs:184:21 [INFO] [stdout] | [INFO] [stdout] 184 | / if let Some((owner, owner_is_secret)) = point_tracks.get(&(nx, ny)) { [INFO] [stdout] 185 | | if owner != &edge.target || *owner_is_secret != is_secret { [INFO] [stdout] 186 | | if is_turning { [INFO] [stdout] 187 | | new_cost += 10000; [INFO] [stdout] ... | [INFO] [stdout] 192 | | } [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] 184 ~ if let Some((owner, owner_is_secret)) = point_tracks.get(&(nx, ny)) [INFO] [stdout] 185 ~ && (owner != &edge.target || *owner_is_secret != is_secret) { [INFO] [stdout] 186 | if is_turning { [INFO] [stdout] ... [INFO] [stdout] 190 | } [INFO] [stdout] 191 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/font_wizard.rs:185:17 [INFO] [stdout] | [INFO] [stdout] 185 | / if let Ok(val) = suffix.parse::() { [INFO] [stdout] 186 | | if val >= 33 && val <= 126 { [INFO] [stdout] 187 | | looks_like_hud = true; [INFO] [stdout] 188 | | break; [INFO] [stdout] 189 | | } [INFO] [stdout] 190 | | } [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] 185 ~ if let Ok(val) = suffix.parse::() [INFO] [stdout] 186 ~ && val >= 33 && val <= 126 { [INFO] [stdout] 187 | looks_like_hud = true; [INFO] [stdout] 188 | break; [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ui/font_wizard.rs:186:24 [INFO] [stdout] | [INFO] [stdout] 186 | if val >= 33 && val <= 126 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(33..=126).contains(&val)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/edges.rs:194:21 [INFO] [stdout] | [INFO] [stdout] 194 | / if let Some((owner, owner_is_secret)) = corners.get(&(nx, ny)) { [INFO] [stdout] 195 | | if owner != &edge.target || *owner_is_secret != is_secret { [INFO] [stdout] 196 | | new_cost += 10000; [INFO] [stdout] 197 | | } [INFO] [stdout] 198 | | } [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] 194 ~ if let Some((owner, owner_is_secret)) = corners.get(&(nx, ny)) [INFO] [stdout] 195 ~ && (owner != &edge.target || *owner_is_secret != is_secret) { [INFO] [stdout] 196 | new_cost += 10000; [INFO] [stdout] 197 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BFG` contains a capitalized acronym [INFO] [stdout] --> src/ui/gamestate.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | BFG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bfg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/render/umapinfo/edges.rs:365:25 [INFO] [stdout] | [INFO] [stdout] 365 | sp[last] = sp[last] + dir * tip_inset; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sp[last] += dir * tip_inset` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:321:25 [INFO] [stdout] | [INFO] [stdout] 321 | / if ui [INFO] [stdout] 322 | | .add(egui::DragValue::new(&mut state.sim.player.armor).range(0..=200)) [INFO] [stdout] 323 | | .changed() [INFO] [stdout] ... | [INFO] [stdout] 331 | | } [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] 323 ~ .changed() [INFO] [stdout] 324 ~ && state.sim.player.armor > old_a { [INFO] [stdout] 325 | messages::log_event( [INFO] [stdout] ... [INFO] [stdout] 328 | ); [INFO] [stdout] 329 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | / if let Some(rect) = node_rects.get(&node.id) { [INFO] [stdout] 25 | | if rect.contains(point) { [INFO] [stdout] 26 | | return Some(NodeHit { node: node.clone() }); [INFO] [stdout] 27 | | } [INFO] [stdout] 28 | | } [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] 24 ~ if let Some(rect) = node_rects.get(&node.id) [INFO] [stdout] 25 ~ && rect.contains(point) { [INFO] [stdout] 26 | return Some(NodeHit { node: node.clone() }); [INFO] [stdout] 27 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/render/umapinfo/interaction.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / if let Some(pos) = id.find("::") { [INFO] [stdout] 42 | | Some(id[..pos].to_uppercase()) [INFO] [stdout] 43 | | } else { [INFO] [stdout] 44 | | None [INFO] [stdout] 45 | | } [INFO] [stdout] | |_____^ help: try: `id.find("::").map(|pos| id[..pos].to_uppercase())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:382:25 [INFO] [stdout] | [INFO] [stdout] 382 | / if ui [INFO] [stdout] 383 | | .add( [INFO] [stdout] 384 | | egui::DragValue::new(&mut state.sim.inventory.ammo_bullets) [INFO] [stdout] 385 | | .range(0..=m_bul), [INFO] [stdout] ... | [INFO] [stdout] 392 | | } [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] 387 ~ .changed() [INFO] [stdout] 388 ~ && state.sim.inventory.ammo_bullets > old_bul { [INFO] [stdout] 389 | messages::log_event(state, EditorEvent::Pickup(MessageItem::Clip)); [INFO] [stdout] 390 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(idx) = center_idx { [INFO] [stdout] 76 | | if let Some(map) = file.data.maps.get(idx) { [INFO] [stdout] 77 | | let map_id = map.mapname.to_uppercase(); [INFO] [stdout] ... | [INFO] [stdout] 109 | | } [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] 75 ~ if let Some(idx) = center_idx [INFO] [stdout] 76 ~ && let Some(map) = file.data.maps.get(idx) { [INFO] [stdout] 77 | let map_id = map.mapname.to_uppercase(); [INFO] [stdout] ... [INFO] [stdout] 107 | } [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:397:25 [INFO] [stdout] | [INFO] [stdout] 397 | / if ui [INFO] [stdout] 398 | | .add( [INFO] [stdout] 399 | | egui::DragValue::new(&mut state.sim.inventory.ammo_shells) [INFO] [stdout] 400 | | .range(0..=m_shl), [INFO] [stdout] ... | [INFO] [stdout] 410 | | } [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] 402 ~ .changed() [INFO] [stdout] 403 ~ && state.sim.inventory.ammo_shells > old_shl { [INFO] [stdout] 404 | messages::log_event( [INFO] [stdout] ... [INFO] [stdout] 407 | ); [INFO] [stdout] 408 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:415:25 [INFO] [stdout] | [INFO] [stdout] 415 | / if ui [INFO] [stdout] 416 | | .add( [INFO] [stdout] 417 | | egui::DragValue::new(&mut state.sim.inventory.ammo_rockets) [INFO] [stdout] 418 | | .range(0..=m_rkt), [INFO] [stdout] ... | [INFO] [stdout] 428 | | } [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] 420 ~ .changed() [INFO] [stdout] 421 ~ && state.sim.inventory.ammo_rockets > old_rkt { [INFO] [stdout] 422 | messages::log_event( [INFO] [stdout] ... [INFO] [stdout] 425 | ); [INFO] [stdout] 426 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:433:25 [INFO] [stdout] | [INFO] [stdout] 433 | / if ui [INFO] [stdout] 434 | | .add( [INFO] [stdout] 435 | | egui::DragValue::new(&mut state.sim.inventory.ammo_cells) [INFO] [stdout] 436 | | .range(0..=m_cel), [INFO] [stdout] ... | [INFO] [stdout] 443 | | } [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] 438 ~ .changed() [INFO] [stdout] 439 ~ && state.sim.inventory.ammo_cells > old_cel { [INFO] [stdout] 440 | messages::log_event(state, EditorEvent::Pickup(MessageItem::Cell)); [INFO] [stdout] 441 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/render/umapinfo/interaction.rs:313:12 [INFO] [stdout] | [INFO] [stdout] 313 | if !crate::ui::context_menu::ContextMenu::get(ui, bg_menu_id).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `crate::ui::context_menu::ContextMenu::get(ui, bg_menu_id).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / if active_connector_drag.is_none() && !ctx.is_panning { [INFO] [stdout] 162 | | if let Some(pos) = interact_pos.or(ctx.viewport_res.hover_pos()) { [INFO] [stdout] 163 | | let just_pressed = ui.input(|i| { [INFO] [stdout] 164 | | i.events.iter().any(|e| { [INFO] [stdout] ... | [INFO] [stdout] 190 | | } [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] 161 ~ if active_connector_drag.is_none() && !ctx.is_panning [INFO] [stdout] 162 ~ && let Some(pos) = interact_pos.or(ctx.viewport_res.hover_pos()) { [INFO] [stdout] 163 | let just_pressed = ui.input(|i| { [INFO] [stdout] ... [INFO] [stdout] 188 | } [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:237:13 [INFO] [stdout] | [INFO] [stdout] 237 | / if !hit_connector { [INFO] [stdout] 238 | | if let Some(node_hit) = detect_node_hit(pos, graph, node_rects) { [INFO] [stdout] 239 | | if let Some(idx) = find_map_index_for_node(file, &node_hit.node) { [INFO] [stdout] 240 | | actions.push(select_map_action(idx)); [INFO] [stdout] ... | [INFO] [stdout] 243 | | } [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] 237 ~ if !hit_connector [INFO] [stdout] 238 ~ && let Some(node_hit) = detect_node_hit(pos, graph, node_rects) { [INFO] [stdout] 239 | if let Some(idx) = find_map_index_for_node(file, &node_hit.node) { [INFO] [stdout] 240 | actions.push(select_map_action(idx)); [INFO] [stdout] 241 | } [INFO] [stdout] 242 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:238:17 [INFO] [stdout] | [INFO] [stdout] 238 | / if let Some(node_hit) = detect_node_hit(pos, graph, node_rects) { [INFO] [stdout] 239 | | if let Some(idx) = find_map_index_for_node(file, &node_hit.node) { [INFO] [stdout] 240 | | actions.push(select_map_action(idx)); [INFO] [stdout] 241 | | } [INFO] [stdout] 242 | | } [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] 238 ~ if let Some(node_hit) = detect_node_hit(pos, graph, node_rects) [INFO] [stdout] 239 ~ && let Some(idx) = find_map_index_for_node(file, &node_hit.node) { [INFO] [stdout] 240 | actions.push(select_map_action(idx)); [INFO] [stdout] 241 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:256:5 [INFO] [stdout] | [INFO] [stdout] 256 | / if just_opened { [INFO] [stdout] 257 | | if let Some(pos) = ui.input(|i| i.pointer.interact_pos()) { [INFO] [stdout] 258 | | let hit_connector = [INFO] [stdout] 259 | | detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x).is_some(); [INFO] [stdout] ... | [INFO] [stdout] 278 | | } [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] 256 ~ if just_opened [INFO] [stdout] 257 ~ && let Some(pos) = ui.input(|i| i.pointer.interact_pos()) { [INFO] [stdout] 258 | let hit_connector = [INFO] [stdout] ... [INFO] [stdout] 276 | } [INFO] [stdout] 277 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:633:13 [INFO] [stdout] | [INFO] [stdout] 633 | / if ui [INFO] [stdout] 634 | | .toggle_value(&mut state.sim.engine.automap_active, "Active") [INFO] [stdout] 635 | | .changed() [INFO] [stdout] ... | [INFO] [stdout] 640 | | } [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] 635 ~ .changed() [INFO] [stdout] 636 ~ && !state.sim.engine.automap_active { [INFO] [stdout] 637 | state.sim.engine.automap_overlay = false; [INFO] [stdout] 638 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/gamestate.rs:670:9 [INFO] [stdout] | [INFO] [stdout] 670 | / state [INFO] [stdout] 671 | | .sim [INFO] [stdout] 672 | | .player [INFO] [stdout] 673 | | .powerup_durations [INFO] [stdout] 674 | | .get(&id) [INFO] [stdout] 675 | | .map_or(false, |v| *v > 0.0) [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 675 - .map_or(false, |v| *v > 0.0) [INFO] [stdout] 675 + .is_some_and(|v| *v > 0.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:321:5 [INFO] [stdout] | [INFO] [stdout] 321 | / if is_bg_panning && active_connector_drag.is_none() { [INFO] [stdout] 322 | | if ctx [INFO] [stdout] 323 | | .viewport_res [INFO] [stdout] 324 | | .dragged_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] ... | [INFO] [stdout] 330 | | } [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] 321 ~ if is_bg_panning && active_connector_drag.is_none() [INFO] [stdout] 322 ~ && ctx [INFO] [stdout] 323 | .viewport_res [INFO] [stdout] ... [INFO] [stdout] 328 | ui.ctx().request_repaint(); [INFO] [stdout] 329 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/ui/gamestate.rs:689:25 [INFO] [stdout] | [INFO] [stdout] 689 | let key = badge.or(Some(patch)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or(patch)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] = note: `#[warn(clippy::or_then_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:332:5 [INFO] [stdout] | [INFO] [stdout] 332 | / if let Some(ref node_id) = dragged_node { [INFO] [stdout] 333 | | if ctx [INFO] [stdout] 334 | | .viewport_res [INFO] [stdout] 335 | | .dragged_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] ... | [INFO] [stdout] 359 | | } [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] 332 ~ if let Some(ref node_id) = dragged_node [INFO] [stdout] 333 ~ && ctx [INFO] [stdout] 334 | .viewport_res [INFO] [stdout] ... [INFO] [stdout] 357 | } [INFO] [stdout] 358 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:333:9 [INFO] [stdout] | [INFO] [stdout] 333 | / if ctx [INFO] [stdout] 334 | | .viewport_res [INFO] [stdout] 335 | | .dragged_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] ... | [INFO] [stdout] 358 | | } [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] 335 ~ .dragged_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] 336 ~ && let (Some(ptr_start), Some(n_start), Some(current_ptr)) = [INFO] [stdout] 337 | (start_ptr, node_start, ui.input(|i| i.pointer.latest_pos())) [INFO] [stdout] ... [INFO] [stdout] 355 | ui.ctx().request_repaint(); [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:370:5 [INFO] [stdout] | [INFO] [stdout] 370 | / if active_connector_drag.is_none() [INFO] [stdout] 371 | | && ctx [INFO] [stdout] 372 | | .viewport_res [INFO] [stdout] 373 | | .drag_started_by(eframe::egui::PointerButton::Primary) [INFO] [stdout] ... | [INFO] [stdout] 389 | | } [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] 375 ~ && dragged_node.is_none() [INFO] [stdout] 376 ~ && let Some(pos) = click_pos { [INFO] [stdout] 377 | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] ... [INFO] [stdout] 386 | } [INFO] [stdout] 387 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:377:9 [INFO] [stdout] | [INFO] [stdout] 377 | / if let Some(pos) = click_pos { [INFO] [stdout] 378 | | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] 379 | | { [INFO] [stdout] 380 | | ui.ctx().data_mut(|d| { [INFO] [stdout] ... | [INFO] [stdout] 388 | | } [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] 377 ~ if let Some(pos) = click_pos [INFO] [stdout] 378 ~ && let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] 379 | { [INFO] [stdout] ... [INFO] [stdout] 386 | actions.push(DocumentAction::UndoSnapshot); [INFO] [stdout] 387 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / if secondary_clicked && !ctx.is_panning { [INFO] [stdout] 396 | | if let Some(pos) = click_pos { [INFO] [stdout] 397 | | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] ... | [INFO] [stdout] 427 | | } [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] 395 ~ if secondary_clicked && !ctx.is_panning [INFO] [stdout] 396 ~ && let Some(pos) = click_pos { [INFO] [stdout] 397 | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] ... [INFO] [stdout] 425 | } [INFO] [stdout] 426 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:396:9 [INFO] [stdout] | [INFO] [stdout] 396 | / if let Some(pos) = click_pos { [INFO] [stdout] 397 | | if let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] 398 | | { [INFO] [stdout] 399 | | let map_id = if let Some(idx) = hit.node_id.find("::") { [INFO] [stdout] ... | [INFO] [stdout] 426 | | } [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] 396 ~ if let Some(pos) = click_pos [INFO] [stdout] 397 ~ && let Some(hit) = detect_connector_hit(pos, graph, node_rects, ctx.proj.final_scale_x) [INFO] [stdout] 398 | { [INFO] [stdout] ... [INFO] [stdout] 424 | } [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/interaction.rs:451:21 [INFO] [stdout] | [INFO] [stdout] 451 | / if let Some(rect) = node_rects.get(&target_node.id) { [INFO] [stdout] 452 | | if rect.contains(pos) { [INFO] [stdout] 453 | | if let NodeType::Map { .. } = &target_node.node_type { [INFO] [stdout] 454 | | let source_map_id = extract_map_id_from_node( [INFO] [stdout] ... | [INFO] [stdout] 493 | | } [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] 451 ~ if let Some(rect) = node_rects.get(&target_node.id) [INFO] [stdout] 452 ~ && rect.contains(pos) { [INFO] [stdout] 453 | if let NodeType::Map { .. } = &target_node.node_type { [INFO] [stdout] ... [INFO] [stdout] 491 | break; [INFO] [stdout] 492 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/render/umapinfo/interaction.rs:455:37 [INFO] [stdout] | [INFO] [stdout] 455 | ... &graph.nodes.iter().find(|n| n.id == source_node_id).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `graph.nodes.iter().find(|n| n.id == source_node_id).unwrap()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/render/umapinfo/interaction.rs:472:49 [INFO] [stdout] | [INFO] [stdout] 472 | / ... &graph [INFO] [stdout] 473 | | ... .nodes [INFO] [stdout] 474 | | ... .iter() [INFO] [stdout] 475 | | ... .find(|n| n.id == source_node_id) [INFO] [stdout] 476 | | ... .unwrap(), [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 472 ~ graph [INFO] [stdout] 473 + .nodes [INFO] [stdout] 474 + .iter() [INFO] [stdout] 475 + .find(|n| n.id == source_node_id) [INFO] [stdout] 476 ~ .unwrap(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/umapinfo/nodes.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | / if let Some(rect) = node_rects.get(&node.id) { [INFO] [stdout] 35 | | if rect.contains(pos) { [INFO] [stdout] 36 | | return Some(node.id.as_str()); [INFO] [stdout] 37 | | } [INFO] [stdout] 38 | | } [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] 34 ~ if let Some(rect) = node_rects.get(&node.id) [INFO] [stdout] 35 ~ && rect.contains(pos) { [INFO] [stdout] 36 | return Some(node.id.as_str()); [INFO] [stdout] 37 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/layers/browser.rs:104:1 [INFO] [stdout] | [INFO] [stdout] 104 | / fn draw_registered_font_row( [INFO] [stdout] 105 | | ui: &mut egui::Ui, [INFO] [stdout] 106 | | name: &str, [INFO] [stdout] 107 | | stem: &str, [INFO] [stdout] ... | [INFO] [stdout] 112 | | changed_out: &mut bool, [INFO] [stdout] 113 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/browser.rs:165:1 [INFO] [stdout] | [INFO] [stdout] 165 | / pub fn draw_filtered_browser( [INFO] [stdout] 166 | | ui: &mut egui::Ui, [INFO] [stdout] 167 | | assets: &mut AssetStore, [INFO] [stdout] 168 | | state: &mut PreviewState, [INFO] [stdout] ... | [INFO] [stdout] 174 | | show_fonts_toggle: bool, [INFO] [stdout] 175 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/render/umapinfo/viewport.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | hovered_node.as_deref(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `hovered_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] = note: `#[warn(clippy::needless_option_as_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/layers/browser.rs:295:24 [INFO] [stdout] | [INFO] [stdout] 295 | let is_installed = file.as_ref().map_or(false, |f| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 296 | | if font.is_hud { [INFO] [stdout] 297 | | f.data.hud_fonts.iter().any(|def| def.name == font.name) [INFO] [stdout] 298 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 301 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 295 - let is_installed = file.as_ref().map_or(false, |f| { [INFO] [stdout] 295 + let is_installed = file.as_ref().is_some_and(|f| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/render/mod.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | let is_hovered_branch = ctx [INFO] [stdout] | _____________________________^ [INFO] [stdout] 122 | | .state [INFO] [stdout] 123 | | .interaction [INFO] [stdout] 124 | | .hovered_path [INFO] [stdout] 125 | | .as_ref() [INFO] [stdout] 126 | | .map_or(false, |h| current_path.starts_with(h)); [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 126 - .map_or(false, |h| current_path.starts_with(h)); [INFO] [stdout] 126 + .is_some_and(|h| current_path.starts_with(h)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/render/mod.rs:127:29 [INFO] [stdout] | [INFO] [stdout] 127 | let is_grabbed_branch = ctx [INFO] [stdout] | _____________________________^ [INFO] [stdout] 128 | | .state [INFO] [stdout] 129 | | .interaction [INFO] [stdout] 130 | | .grabbed_path [INFO] [stdout] 131 | | .as_ref() [INFO] [stdout] 132 | | .map_or(false, |g| current_path.starts_with(g)); [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 132 - .map_or(false, |g| current_path.starts_with(g)); [INFO] [stdout] 132 + .is_some_and(|g| current_path.starts_with(g)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/browser.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | / if ui.put(btn_rect, egui::Button::new("Add").small()).clicked() { [INFO] [stdout] 329 | | if let Some(f) = file { [INFO] [stdout] 330 | | if font.source == FontSource::Package { [INFO] [stdout] 331 | | for asset in library::ASSETS { [INFO] [stdout] ... | [INFO] [stdout] 353 | | } [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] 328 ~ if ui.put(btn_rect, egui::Button::new("Add").small()).clicked() [INFO] [stdout] 329 ~ && let Some(f) = file { [INFO] [stdout] 330 | if font.source == FontSource::Package { [INFO] [stdout] ... [INFO] [stdout] 351 | changed = true; [INFO] [stdout] 352 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/mod.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | / if is_native_container && ctx.pass == RenderPass::Background { [INFO] [stdout] 157 | | if let Some(bounds) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 158 | | let screen_rect = ctx.to_screen_rect(bounds); [INFO] [stdout] 159 | | ctx.painter.rect_stroke( [INFO] [stdout] ... | [INFO] [stdout] 166 | | } [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] 156 ~ if is_native_container && ctx.pass == RenderPass::Background [INFO] [stdout] 157 ~ && let Some(bounds) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 158 | let screen_rect = ctx.to_screen_rect(bounds); [INFO] [stdout] ... [INFO] [stdout] 164 | ); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/layers/browser.rs:360:1 [INFO] [stdout] | [INFO] [stdout] 360 | / fn draw_asset_grid( [INFO] [stdout] 361 | | ui: &mut egui::Ui, [INFO] [stdout] 362 | | assets: &mut AssetStore, [INFO] [stdout] 363 | | state: &mut PreviewState, [INFO] [stdout] ... | [INFO] [stdout] 368 | | is_project_tab: bool, [INFO] [stdout] 369 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `names` [INFO] [stdout] --> src/ui/layers/browser.rs:404:38 [INFO] [stdout] | [INFO] [stdout] 404 | ... for i in s.min(e)..=s.max(e) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 404 - for i in s.min(e)..=s.max(e) { [INFO] [stdout] 404 + for in names.iter().take(s.max(e) + 1).skip(s.min(e)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/mod.rs:248:12 [INFO] [stdout] | [INFO] [stdout] 248 | } else if let Element::List(l) = &element.data { [INFO] [stdout] | ____________^ [INFO] [stdout] 249 | | if let Some(hit) = [INFO] [stdout] 250 | | list::hit_test_list(&local_ctx, l, pos, current_path, true, container_mode) [INFO] [stdout] ... | [INFO] [stdout] 257 | | } [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] 248 ~ } else if let Element::List(l) = &element.data [INFO] [stdout] 249 ~ && let Some(hit) = [INFO] [stdout] 250 | list::hit_test_list(&local_ctx, l, pos, current_path, true, container_mode) [INFO] [stdout] ... [INFO] [stdout] 255 | return Some(hit); [INFO] [stdout] 256 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/mod.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | / if is_selectable { [INFO] [stdout] 267 | | if let Some(rect) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 268 | | if rect.contains(ctx.mouse_pos) { [INFO] [stdout] 269 | | return Some(current_path.clone()); [INFO] [stdout] ... | [INFO] [stdout] 272 | | } [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] 266 ~ if is_selectable [INFO] [stdout] 267 ~ && let Some(rect) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 268 | if rect.contains(ctx.mouse_pos) { [INFO] [stdout] 269 | return Some(current_path.clone()); [INFO] [stdout] 270 | } [INFO] [stdout] 271 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/render/mod.rs:267:9 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Some(rect) = get_element_bounds(&local_ctx, element, pos) { [INFO] [stdout] 268 | | if rect.contains(ctx.mouse_pos) { [INFO] [stdout] 269 | | return Some(current_path.clone()); [INFO] [stdout] 270 | | } [INFO] [stdout] 271 | | } [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] 267 ~ if let Some(rect) = get_element_bounds(&local_ctx, element, pos) [INFO] [stdout] 268 ~ && rect.contains(ctx.mouse_pos) { [INFO] [stdout] 269 | return Some(current_path.clone()); [INFO] [stdout] 270 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/layers/thumbnails.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | / fn draw_live_number_thumbnail( [INFO] [stdout] 144 | | ui: &mut egui::Ui, [INFO] [stdout] 145 | | rect: egui::Rect, [INFO] [stdout] 146 | | number_def: &crate::models::sbardef::NumberDef, [INFO] [stdout] ... | [INFO] [stdout] 151 | | is_dimmed: bool, [INFO] [stdout] 152 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/thumbnails.rs:341:5 [INFO] [stdout] | [INFO] [stdout] 341 | / if let Some(id) = patch_id { [INFO] [stdout] 342 | | if let Some(tex) = assets.textures.get(&id) { [INFO] [stdout] 343 | | return Some(tex); [INFO] [stdout] 344 | | } [INFO] [stdout] 345 | | } [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] 341 ~ if let Some(id) = patch_id [INFO] [stdout] 342 ~ && let Some(tex) = assets.textures.get(&id) { [INFO] [stdout] 343 | return Some(tex); [INFO] [stdout] 344 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/tree.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn draw_layer_tree_root( [INFO] [stdout] 23 | | ui: &mut egui::Ui, [INFO] [stdout] 24 | | file: &SBarDefFile, [INFO] [stdout] 25 | | bar_idx: usize, [INFO] [stdout] ... | [INFO] [stdout] 31 | | confirmation_modal: &mut Option, [INFO] [stdout] 32 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/ui/layers/tree.rs:56:1 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn draw_layer_tree_recursive( [INFO] [stdout] 57 | | ui: &mut egui::Ui, [INFO] [stdout] 58 | | elements: &[ElementWrapper], [INFO] [stdout] 59 | | current_path: Vec, [INFO] [stdout] ... | [INFO] [stdout] 66 | | confirmation_modal: &mut Option, [INFO] [stdout] 67 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/ui/layers/tree.rs:129:1 [INFO] [stdout] | [INFO] [stdout] 129 | / fn draw_layer_row( [INFO] [stdout] 130 | | ui: &mut egui::Ui, [INFO] [stdout] 131 | | element: &ElementWrapper, [INFO] [stdout] 132 | | my_path: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 144 | | confirmation_modal: &mut Option, [INFO] [stdout] 145 | | ) -> egui::Response { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `visible` [INFO] [stdout] --> src/ui/layers/tree.rs:249:30 [INFO] [stdout] | [INFO] [stdout] 249 | for i in start.min(end)..=start.max(end) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 249 - for i in start.min(end)..=start.max(end) { [INFO] [stdout] 249 + for in visible.iter().take(start.max(end) + 1).skip(start.min(end)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/tree.rs:264:1 [INFO] [stdout] | [INFO] [stdout] 264 | / fn handle_drop_logic( [INFO] [stdout] 265 | | ui: &mut egui::Ui, [INFO] [stdout] 266 | | rect: egui::Rect, [INFO] [stdout] 267 | | my_path: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 273 | | actions: &mut Vec, [INFO] [stdout] 274 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/ui/layers/tree.rs:280:23 [INFO] [stdout] | [INFO] [stdout] 280 | let is_self = &*dragged == my_path; [INFO] [stdout] | ---------^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `*dragged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/ui/layers/tree.rs:281:45 [INFO] [stdout] | [INFO] [stdout] 281 | let is_parent = my_path.starts_with(&*dragged) && my_path.len() > dragged.len(); [INFO] [stdout] | ^^^^^^^^^ help: try: `&dragged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | / if !is_self && !is_parent && ui.rect_contains_pointer(rect) { [INFO] [stdout] 284 | | if let Some(target) = [INFO] [stdout] 285 | | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... | [INFO] [stdout] 328 | | } [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] 283 ~ if !is_self && !is_parent && ui.rect_contains_pointer(rect) [INFO] [stdout] 284 ~ && let Some(target) = [INFO] [stdout] 285 | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... [INFO] [stdout] 326 | } [INFO] [stdout] 327 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 331 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 332 | | if ui.rect_contains_pointer(rect) { [INFO] [stdout] 333 | | if let Some(target) = [INFO] [stdout] 334 | | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... | [INFO] [stdout] 376 | | } [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] 331 ~ if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 332 ~ && ui.rect_contains_pointer(rect) { [INFO] [stdout] 333 | if let Some(target) = [INFO] [stdout] ... [INFO] [stdout] 374 | } [INFO] [stdout] 375 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:332:9 [INFO] [stdout] | [INFO] [stdout] 332 | / if ui.rect_contains_pointer(rect) { [INFO] [stdout] 333 | | if let Some(target) = [INFO] [stdout] 334 | | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... | [INFO] [stdout] 375 | | } [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] 332 ~ if ui.rect_contains_pointer(rect) [INFO] [stdout] 333 ~ && let Some(target) = [INFO] [stdout] 334 | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... [INFO] [stdout] 373 | } [INFO] [stdout] 374 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `append_idx` is used as a loop counter [INFO] [stdout] --> src/ui/layers/tree.rs:362:29 [INFO] [stdout] | [INFO] [stdout] 362 | ... for key in asset_keys.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (append_idx, key) in (element.children().len()..).zip(asset_keys.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/ui/layers/tree.rs:406:1 [INFO] [stdout] | [INFO] [stdout] 406 | / fn render_row_contents( [INFO] [stdout] 407 | | ui: &mut egui::Ui, [INFO] [stdout] 408 | | rect: egui::Rect, [INFO] [stdout] 409 | | element: &ElementWrapper, [INFO] [stdout] ... | [INFO] [stdout] 416 | | my_path: &[usize], [INFO] [stdout] 417 | | ) -> egui::Response { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/tree.rs:480:1 [INFO] [stdout] | [INFO] [stdout] 480 | / fn handle_context_menu( [INFO] [stdout] 481 | | ui: &egui::Ui, [INFO] [stdout] 482 | | combined_res: &egui::Response, [INFO] [stdout] 483 | | my_path: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 489 | | confirmation_modal: &mut Option, [INFO] [stdout] 490 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:578:5 [INFO] [stdout] | [INFO] [stdout] 578 | / if has_payload { [INFO] [stdout] 579 | | if let Some(pos) = ui.ctx().input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 580 | | let clip = ui.clip_rect(); [INFO] [stdout] 581 | | if clip.contains(pos) { [INFO] [stdout] ... | [INFO] [stdout] 591 | | } [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] 578 ~ if has_payload [INFO] [stdout] 579 ~ && let Some(pos) = ui.ctx().input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 580 | let clip = ui.clip_rect(); [INFO] [stdout] ... [INFO] [stdout] 589 | } [INFO] [stdout] 590 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:668:9 [INFO] [stdout] | [INFO] [stdout] 668 | / if let Some(el) = file.get_element(path) { [INFO] [stdout] 669 | | if !el.children().is_empty() { [INFO] [stdout] 670 | | return true; [INFO] [stdout] 671 | | } [INFO] [stdout] 672 | | } [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] 668 ~ if let Some(el) = file.get_element(path) [INFO] [stdout] 669 ~ && !el.children().is_empty() { [INFO] [stdout] 670 | return true; [INFO] [stdout] 671 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/ui/layers/tree.rs:702:49 [INFO] [stdout] | [INFO] [stdout] 702 | if !is_noop && !parent_path.starts_with(&*dragged) && ui.rect_contains_pointer(rect) { [INFO] [stdout] | ^^^^^^^^^ help: try: `&dragged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:716:5 [INFO] [stdout] | [INFO] [stdout] 716 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 717 | | if ui.rect_contains_pointer(rect) { [INFO] [stdout] 718 | | shared::draw_yellow_line(ui, rect, rect.center().y); [INFO] [stdout] 719 | | if ui.input(|i| i.pointer.any_released()) { [INFO] [stdout] ... | [INFO] [stdout] 733 | | } [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] 716 ~ if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 717 ~ && ui.rect_contains_pointer(rect) { [INFO] [stdout] 718 | shared::draw_yellow_line(ui, rect, rect.center().y); [INFO] [stdout] ... [INFO] [stdout] 731 | } [INFO] [stdout] 732 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `current_insert` is used as a loop counter [INFO] [stdout] --> src/ui/layers/tree.rs:722:17 [INFO] [stdout] | [INFO] [stdout] 722 | for key in asset_keys.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (current_insert, key) in (insert_idx..).zip(asset_keys.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IWAD` contains a capitalized acronym [INFO] [stdout] --> src/ui/layers/mod.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | IWAD, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Iwad` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/mod.rs:34:1 [INFO] [stdout] | [INFO] [stdout] 34 | / pub fn draw_layers_panel( [INFO] [stdout] 35 | | ui: &mut egui::Ui, [INFO] [stdout] 36 | | file: &mut Option, [INFO] [stdout] 37 | | selection: &mut HashSet>, [INFO] [stdout] ... | [INFO] [stdout] 43 | | confirmation_modal: &mut Option, [INFO] [stdout] 44 | | ) -> (Vec, bool) { [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/ui/menu.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / pub enum MenuAction { [INFO] [stdout] 11 | | None, [INFO] [stdout] 12 | | LoadProject(LoadedProject, String), [INFO] [stdout] | | ---------------------------------- the largest variant contains at least 1360 bytes [INFO] [stdout] 13 | | Open, [INFO] [stdout] 14 | | RequestDiscard(PendingAction), [INFO] [stdout] | | ----------------------------- the second-largest variant contains at least 24 bytes [INFO] [stdout] ... | [INFO] [stdout] 18 | | NewProject, [INFO] [stdout] 19 | | } [INFO] [stdout] | |_^ the entire enum is at least 1360 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 12 - LoadProject(LoadedProject, String), [INFO] [stdout] 12 + LoadProject(Box, String), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/menu.rs:48:17 [INFO] [stdout] | [INFO] [stdout] 48 | let dirty = doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 48 - let dirty = doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] 48 + let dirty = doc.as_ref().is_some_and(|d| d.dirty); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:142:17 [INFO] [stdout] | [INFO] [stdout] 142 | / if let Some(d) = doc { [INFO] [stdout] 143 | | if let Some(path) = [INFO] [stdout] 144 | | io::save_pk3_dialog(&d.lumps, assets, &d.passthrough_lumps, d.path.clone()) [INFO] [stdout] ... | [INFO] [stdout] 148 | | } [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] 142 ~ if let Some(d) = doc [INFO] [stdout] 143 ~ && let Some(path) = [INFO] [stdout] 144 | io::save_pk3_dialog(&d.lumps, assets, &d.passthrough_lumps, d.path.clone()) [INFO] [stdout] 145 | { [INFO] [stdout] 146 | action = MenuAction::SaveDone(path); [INFO] [stdout] 147 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | / if let Some(d) = doc { [INFO] [stdout] 153 | | if let Some(lump) = d.get_lump(active_mode) { [INFO] [stdout] 154 | | let sanitized = lump.to_sanitized_json(assets); [INFO] [stdout] 155 | | if let Some(path) = io::save_json_dialog(&sanitized, d.path.clone()) { [INFO] [stdout] ... | [INFO] [stdout] 159 | | } [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] 152 ~ if let Some(d) = doc [INFO] [stdout] 153 ~ && let Some(lump) = d.get_lump(active_mode) { [INFO] [stdout] 154 | let sanitized = lump.to_sanitized_json(assets); [INFO] [stdout] ... [INFO] [stdout] 157 | } [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:163:17 [INFO] [stdout] | [INFO] [stdout] 163 | / if let Some(d) = doc { [INFO] [stdout] 164 | | if let Some(path) = [INFO] [stdout] 165 | | io::save_wad_dialog(&d.lumps, assets, &d.passthrough_lumps, d.path.clone()) [INFO] [stdout] ... | [INFO] [stdout] 169 | | } [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] 163 ~ if let Some(d) = doc [INFO] [stdout] 164 ~ && let Some(path) = [INFO] [stdout] 165 | io::save_wad_dialog(&d.lumps, assets, &d.passthrough_lumps, d.path.clone()) [INFO] [stdout] 166 | { [INFO] [stdout] 167 | action = MenuAction::ExportDone(path); [INFO] [stdout] 168 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:276:13 [INFO] [stdout] | [INFO] [stdout] 276 | / if draw_menu_card(ui, "Base IWAD", iwad_desc) { [INFO] [stdout] 277 | | if let Some(new_path) = io::load_iwad_dialog(ctx, assets) { [INFO] [stdout] 278 | | config.base_wad_path = Some(new_path); [INFO] [stdout] 279 | | } [INFO] [stdout] 280 | | } [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] 276 ~ if draw_menu_card(ui, "Base IWAD", iwad_desc) [INFO] [stdout] 277 ~ && let Some(new_path) = io::load_iwad_dialog(ctx, assets) { [INFO] [stdout] 278 | config.base_wad_path = Some(new_path); [INFO] [stdout] 279 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:684:49 [INFO] [stdout] | [INFO] [stdout] 684 | / ... if let Some(doc) = &mut app.doc { [INFO] [stdout] 685 | | ... if let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 686 | | ... for nf in s.data.number_fonts { [INFO] [stdout] 687 | | ... if !sbar.data.number_fonts.iter().any(|f| f.name == nf.name) { [INFO] [stdout] ... | [INFO] [stdout] 697 | | ... } [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] 684 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 685 ~ && let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 686 | for nf in s.data.number_fonts { [INFO] [stdout] ... [INFO] [stdout] 695 | } [INFO] [stdout] 696 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:727:17 [INFO] [stdout] | [INFO] [stdout] 727 | / if app.creation_modal != CreationModal::LumpSelector && app.creation_modal != CreationModal::LayoutTemplate { [INFO] [stdout] 728 | | if ui.button(" Back ").clicked() { [INFO] [stdout] 729 | | app.creation_modal = CreationModal::LumpSelector; [INFO] [stdout] 730 | | } [INFO] [stdout] 731 | | } [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] 727 ~ if app.creation_modal != CreationModal::LumpSelector && app.creation_modal != CreationModal::LayoutTemplate [INFO] [stdout] 728 ~ && ui.button(" Back ").clicked() { [INFO] [stdout] 729 | app.creation_modal = CreationModal::LumpSelector; [INFO] [stdout] 730 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BFG` contains a capitalized acronym [INFO] [stdout] --> src/ui/messages.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | BFG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bfg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/modals.rs:40:21 [INFO] [stdout] | [INFO] [stdout] 40 | / if crate::ui::menu::draw_menu_card(ui, "Select Base DOOM II IWAD", desc) { [INFO] [stdout] 41 | | if let Some(p) = crate::io::load_iwad_dialog(ctx, &mut app.assets) { [INFO] [stdout] 42 | | app.config.base_wad_path = Some(p); [INFO] [stdout] 43 | | app.config.save(); [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [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] 40 ~ if crate::ui::menu::draw_menu_card(ui, "Select Base DOOM II IWAD", desc) [INFO] [stdout] 41 ~ && let Some(p) = crate::io::load_iwad_dialog(ctx, &mut app.assets) { [INFO] [stdout] 42 | app.config.base_wad_path = Some(p); [INFO] [stdout] 43 | app.config.save(); [INFO] [stdout] 44 | app.iwad_verified = true; [INFO] [stdout] 45 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:47:35 [INFO] [stdout] | [INFO] [stdout] 47 | inv.has_invulnerability = d.get(&0).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 47 - inv.has_invulnerability = d.get(&0).map_or(false, |v| *v > 0.0); [INFO] [stdout] 47 + inv.has_invulnerability = d.get(&0).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:48:27 [INFO] [stdout] | [INFO] [stdout] 48 | inv.has_berserk = d.get(&1).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 48 - inv.has_berserk = d.get(&1).map_or(false, |v| *v > 0.0); [INFO] [stdout] 48 + inv.has_berserk = d.get(&1).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | inv.has_invisibility = d.get(&2).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 49 - inv.has_invisibility = d.get(&2).map_or(false, |v| *v > 0.0); [INFO] [stdout] 49 + inv.has_invisibility = d.get(&2).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui/modals.rs:184:93 [INFO] [stdout] | [INFO] [stdout] 184 | } else if let Some(loaded) = crate::io::load_project_from_path(ctx, &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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui/modals.rs:185:59 [INFO] [stdout] | [INFO] [stdout] 185 | ... app.load_project(ctx, loaded, &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: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:50:27 [INFO] [stdout] | [INFO] [stdout] 50 | inv.has_radsuit = d.get(&3).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 50 - inv.has_radsuit = d.get(&3).map_or(false, |v| *v > 0.0); [INFO] [stdout] 50 + inv.has_radsuit = d.get(&3).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:51:27 [INFO] [stdout] | [INFO] [stdout] 51 | inv.has_automap = d.get(&4).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 51 - inv.has_automap = d.get(&4).map_or(false, |v| *v > 0.0); [INFO] [stdout] 51 + inv.has_automap = d.get(&4).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/state/mod.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | inv.has_liteamp = d.get(&5).map_or(false, |v| *v > 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 52 - inv.has_liteamp = d.get(&5).map_or(false, |v| *v > 0.0); [INFO] [stdout] 52 + inv.has_liteamp = d.get(&5).is_some_and(|v| *v > 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/context_menu.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | / if !just_opened && ui.input(|i| i.pointer.any_click()) { [INFO] [stdout] 69 | | if !area_res.response.hovered() { [INFO] [stdout] 70 | | Self::close(ui); [INFO] [stdout] 71 | | } [INFO] [stdout] 72 | | } [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] 68 ~ if !just_opened && ui.input(|i| i.pointer.any_click()) [INFO] [stdout] 69 ~ && !area_res.response.hovered() { [INFO] [stdout] 70 | Self::close(ui); [INFO] [stdout] 71 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/properties/animation.rs:168:1 [INFO] [stdout] | [INFO] [stdout] 168 | / fn draw_frame_row( [INFO] [stdout] 169 | | ui: &mut egui::Ui, [INFO] [stdout] 170 | | idx: usize, [INFO] [stdout] 171 | | frame: &mut FrameDef, [INFO] [stdout] ... | [INFO] [stdout] 176 | | is_active: bool, [INFO] [stdout] 177 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/font_wizard.rs:184:13 [INFO] [stdout] | [INFO] [stdout] 184 | / if suffix.chars().all(|c| c.is_ascii_digit()) { [INFO] [stdout] 185 | | if let Ok(val) = suffix.parse::() { [INFO] [stdout] 186 | | if val >= 33 && val <= 126 { [INFO] [stdout] 187 | | looks_like_hud = true; [INFO] [stdout] ... | [INFO] [stdout] 191 | | } [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] 184 ~ if suffix.chars().all(|c| c.is_ascii_digit()) [INFO] [stdout] 185 ~ && let Ok(val) = suffix.parse::() { [INFO] [stdout] 186 | if val >= 33 && val <= 126 { [INFO] [stdout] ... [INFO] [stdout] 189 | } [INFO] [stdout] 190 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/font_wizard.rs:185:17 [INFO] [stdout] | [INFO] [stdout] 185 | / if let Ok(val) = suffix.parse::() { [INFO] [stdout] 186 | | if val >= 33 && val <= 126 { [INFO] [stdout] 187 | | looks_like_hud = true; [INFO] [stdout] 188 | | break; [INFO] [stdout] 189 | | } [INFO] [stdout] 190 | | } [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] 185 ~ if let Ok(val) = suffix.parse::() [INFO] [stdout] 186 ~ && val >= 33 && val <= 126 { [INFO] [stdout] 187 | looks_like_hud = true; [INFO] [stdout] 188 | break; [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ui/font_wizard.rs:186:24 [INFO] [stdout] | [INFO] [stdout] 186 | if val >= 33 && val <= 126 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(33..=126).contains(&val)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/animation.rs:384:5 [INFO] [stdout] | [INFO] [stdout] 384 | / if let Some(keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 385 | | if ui.rect_contains_pointer(rect) { [INFO] [stdout] 386 | | ui.painter() [INFO] [stdout] 387 | | .rect_filled(rect, 4.0, egui::Color32::from_white_alpha(10)); [INFO] [stdout] ... | [INFO] [stdout] 395 | | } [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] 384 ~ if let Some(keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 385 ~ && ui.rect_contains_pointer(rect) { [INFO] [stdout] 386 | ui.painter() [INFO] [stdout] ... [INFO] [stdout] 393 | } [INFO] [stdout] 394 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BFG` contains a capitalized acronym [INFO] [stdout] --> src/ui/gamestate.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | BFG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bfg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:321:25 [INFO] [stdout] | [INFO] [stdout] 321 | / if ui [INFO] [stdout] 322 | | .add(egui::DragValue::new(&mut state.sim.player.armor).range(0..=200)) [INFO] [stdout] 323 | | .changed() [INFO] [stdout] ... | [INFO] [stdout] 331 | | } [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] 323 ~ .changed() [INFO] [stdout] 324 ~ && state.sim.player.armor > old_a { [INFO] [stdout] 325 | messages::log_event( [INFO] [stdout] ... [INFO] [stdout] 328 | ); [INFO] [stdout] 329 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:382:25 [INFO] [stdout] | [INFO] [stdout] 382 | / if ui [INFO] [stdout] 383 | | .add( [INFO] [stdout] 384 | | egui::DragValue::new(&mut state.sim.inventory.ammo_bullets) [INFO] [stdout] 385 | | .range(0..=m_bul), [INFO] [stdout] ... | [INFO] [stdout] 392 | | } [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] 387 ~ .changed() [INFO] [stdout] 388 ~ && state.sim.inventory.ammo_bullets > old_bul { [INFO] [stdout] 389 | messages::log_event(state, EditorEvent::Pickup(MessageItem::Clip)); [INFO] [stdout] 390 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:397:25 [INFO] [stdout] | [INFO] [stdout] 397 | / if ui [INFO] [stdout] 398 | | .add( [INFO] [stdout] 399 | | egui::DragValue::new(&mut state.sim.inventory.ammo_shells) [INFO] [stdout] 400 | | .range(0..=m_shl), [INFO] [stdout] ... | [INFO] [stdout] 410 | | } [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] 402 ~ .changed() [INFO] [stdout] 403 ~ && state.sim.inventory.ammo_shells > old_shl { [INFO] [stdout] 404 | messages::log_event( [INFO] [stdout] ... [INFO] [stdout] 407 | ); [INFO] [stdout] 408 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:415:25 [INFO] [stdout] | [INFO] [stdout] 415 | / if ui [INFO] [stdout] 416 | | .add( [INFO] [stdout] 417 | | egui::DragValue::new(&mut state.sim.inventory.ammo_rockets) [INFO] [stdout] 418 | | .range(0..=m_rkt), [INFO] [stdout] ... | [INFO] [stdout] 428 | | } [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] 420 ~ .changed() [INFO] [stdout] 421 ~ && state.sim.inventory.ammo_rockets > old_rkt { [INFO] [stdout] 422 | messages::log_event( [INFO] [stdout] ... [INFO] [stdout] 425 | ); [INFO] [stdout] 426 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:433:25 [INFO] [stdout] | [INFO] [stdout] 433 | / if ui [INFO] [stdout] 434 | | .add( [INFO] [stdout] 435 | | egui::DragValue::new(&mut state.sim.inventory.ammo_cells) [INFO] [stdout] 436 | | .range(0..=m_cel), [INFO] [stdout] ... | [INFO] [stdout] 443 | | } [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] 438 ~ .changed() [INFO] [stdout] 439 ~ && state.sim.inventory.ammo_cells > old_cel { [INFO] [stdout] 440 | messages::log_event(state, EditorEvent::Pickup(MessageItem::Cell)); [INFO] [stdout] 441 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/compatibility.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | / if (n.type_ as u8) > 7 { [INFO] [stdout] 31 | | return false; [INFO] [stdout] 32 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ Element::Number(n) | Element::Percent(n) [INFO] [stdout] 30 ~ if (n.type_ as u8) > 7 => { [INFO] [stdout] 31 | return false; [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/gamestate.rs:633:13 [INFO] [stdout] | [INFO] [stdout] 633 | / if ui [INFO] [stdout] 634 | | .toggle_value(&mut state.sim.engine.automap_active, "Active") [INFO] [stdout] 635 | | .changed() [INFO] [stdout] ... | [INFO] [stdout] 640 | | } [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] 635 ~ .changed() [INFO] [stdout] 636 ~ && !state.sim.engine.automap_active { [INFO] [stdout] 637 | state.sim.engine.automap_overlay = false; [INFO] [stdout] 638 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/gamestate.rs:670:9 [INFO] [stdout] | [INFO] [stdout] 670 | / state [INFO] [stdout] 671 | | .sim [INFO] [stdout] 672 | | .player [INFO] [stdout] 673 | | .powerup_durations [INFO] [stdout] 674 | | .get(&id) [INFO] [stdout] 675 | | .map_or(false, |v| *v > 0.0) [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 675 - .map_or(false, |v| *v > 0.0) [INFO] [stdout] 675 + .is_some_and(|v| *v > 0.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/ui/gamestate.rs:689:25 [INFO] [stdout] | [INFO] [stdout] 689 | let key = badge.or(Some(patch)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or(patch)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] = note: `#[warn(clippy::or_then_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/conditions.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | / if !common_ref.conditions.is_empty() { [INFO] [stdout] 65 | | if ui [INFO] [stdout] 66 | | .add_enabled(!is_ammo_selected, egui::Button::new("Clear All")) [INFO] [stdout] 67 | | .clicked() [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [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] 64 ~ if !common_ref.conditions.is_empty() [INFO] [stdout] 65 ~ && ui [INFO] [stdout] 66 | .add_enabled(!is_ammo_selected, egui::Button::new("Clear All")) [INFO] [stdout] ... [INFO] [stdout] 70 | changed = true; [INFO] [stdout] 71 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/properties/conditions.rs:115:1 [INFO] [stdout] | [INFO] [stdout] 115 | / fn draw_condition_card( [INFO] [stdout] 116 | | ui: &mut egui::Ui, [INFO] [stdout] 117 | | cond: &mut ConditionDef, [INFO] [stdout] 118 | | assets: &AssetStore, [INFO] [stdout] ... | [INFO] [stdout] 123 | | target: ExportTarget, [INFO] [stdout] 124 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/ui/properties/conditions.rs:126:46 [INFO] [stdout] | [INFO] [stdout] 126 | let is_true = crate::conditions::resolve(&[cond.clone()], state, assets); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(cond)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] = note: `#[warn(clippy::cloned_ref_to_slice_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/conditions.rs:197:41 [INFO] [stdout] | [INFO] [stdout] 197 | / ... if common::custom_menu_item(ui, g.name, g_idx == idx) { [INFO] [stdout] 198 | | ... if idx != g_idx { [INFO] [stdout] 199 | | ... let new_group = &lookups::GROUPS[idx]; [INFO] [stdout] 200 | | ... cond.condition = new_group.variants[0].condition; [INFO] [stdout] ... | [INFO] [stdout] 207 | | ... } [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] 197 ~ if common::custom_menu_item(ui, g.name, g_idx == idx) [INFO] [stdout] 198 ~ && idx != g_idx { [INFO] [stdout] 199 | let new_group = &lookups::GROUPS[idx]; [INFO] [stdout] ... [INFO] [stdout] 205 | ContextMenu::close(ui); [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/layers/browser.rs:104:1 [INFO] [stdout] | [INFO] [stdout] 104 | / fn draw_registered_font_row( [INFO] [stdout] 105 | | ui: &mut egui::Ui, [INFO] [stdout] 106 | | name: &str, [INFO] [stdout] 107 | | stem: &str, [INFO] [stdout] ... | [INFO] [stdout] 112 | | changed_out: &mut bool, [INFO] [stdout] 113 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/browser.rs:165:1 [INFO] [stdout] | [INFO] [stdout] 165 | / pub fn draw_filtered_browser( [INFO] [stdout] 166 | | ui: &mut egui::Ui, [INFO] [stdout] 167 | | assets: &mut AssetStore, [INFO] [stdout] 168 | | state: &mut PreviewState, [INFO] [stdout] ... | [INFO] [stdout] 174 | | show_fonts_toggle: bool, [INFO] [stdout] 175 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/conditions.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 352 | | if ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 353 | | ui.painter().rect_stroke( [INFO] [stdout] 354 | | response.rect, [INFO] [stdout] ... | [INFO] [stdout] 364 | | } [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(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 352 ~ && ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 353 | ui.painter().rect_stroke( [INFO] [stdout] ... [INFO] [stdout] 362 | } [INFO] [stdout] 363 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/layers/browser.rs:295:24 [INFO] [stdout] | [INFO] [stdout] 295 | let is_installed = file.as_ref().map_or(false, |f| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 296 | | if font.is_hud { [INFO] [stdout] 297 | | f.data.hud_fonts.iter().any(|def| def.name == font.name) [INFO] [stdout] 298 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 301 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 295 - let is_installed = file.as_ref().map_or(false, |f| { [INFO] [stdout] 295 + let is_installed = file.as_ref().is_some_and(|f| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/browser.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | / if ui.put(btn_rect, egui::Button::new("Add").small()).clicked() { [INFO] [stdout] 329 | | if let Some(f) = file { [INFO] [stdout] 330 | | if font.source == FontSource::Package { [INFO] [stdout] 331 | | for asset in library::ASSETS { [INFO] [stdout] ... | [INFO] [stdout] 353 | | } [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] 328 ~ if ui.put(btn_rect, egui::Button::new("Add").small()).clicked() [INFO] [stdout] 329 ~ && let Some(f) = file { [INFO] [stdout] 330 | if font.source == FontSource::Package { [INFO] [stdout] ... [INFO] [stdout] 351 | changed = true; [INFO] [stdout] 352 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/layers/browser.rs:360:1 [INFO] [stdout] | [INFO] [stdout] 360 | / fn draw_asset_grid( [INFO] [stdout] 361 | | ui: &mut egui::Ui, [INFO] [stdout] 362 | | assets: &mut AssetStore, [INFO] [stdout] 363 | | state: &mut PreviewState, [INFO] [stdout] ... | [INFO] [stdout] 368 | | is_project_tab: bool, [INFO] [stdout] 369 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `names` [INFO] [stdout] --> src/ui/layers/browser.rs:404:38 [INFO] [stdout] | [INFO] [stdout] 404 | ... for i in s.min(e)..=s.max(e) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 404 - for i in s.min(e)..=s.max(e) { [INFO] [stdout] 404 + for in names.iter().take(s.max(e) + 1).skip(s.min(e)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/layers/thumbnails.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | / fn draw_live_number_thumbnail( [INFO] [stdout] 144 | | ui: &mut egui::Ui, [INFO] [stdout] 145 | | rect: egui::Rect, [INFO] [stdout] 146 | | number_def: &crate::models::sbardef::NumberDef, [INFO] [stdout] ... | [INFO] [stdout] 151 | | is_dimmed: bool, [INFO] [stdout] 152 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/thumbnails.rs:341:5 [INFO] [stdout] | [INFO] [stdout] 341 | / if let Some(id) = patch_id { [INFO] [stdout] 342 | | if let Some(tex) = assets.textures.get(&id) { [INFO] [stdout] 343 | | return Some(tex); [INFO] [stdout] 344 | | } [INFO] [stdout] 345 | | } [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] 341 ~ if let Some(id) = patch_id [INFO] [stdout] 342 ~ && let Some(tex) = assets.textures.get(&id) { [INFO] [stdout] 343 | return Some(tex); [INFO] [stdout] 344 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/sbardef.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / if let Some(path) = ctx.selection.iter().next() { [INFO] [stdout] 36 | | if path.len() > 1 { [INFO] [stdout] 37 | | ui.columns(2, |uis| { [INFO] [stdout] 38 | | if crate::ui::shared::section_header_button( [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [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] 35 ~ if let Some(path) = ctx.selection.iter().next() [INFO] [stdout] 36 ~ && path.len() > 1 { [INFO] [stdout] 37 | ui.columns(2, |uis| { [INFO] [stdout] ... [INFO] [stdout] 61 | ui.add_space(4.0); [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/tree.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn draw_layer_tree_root( [INFO] [stdout] 23 | | ui: &mut egui::Ui, [INFO] [stdout] 24 | | file: &SBarDefFile, [INFO] [stdout] 25 | | bar_idx: usize, [INFO] [stdout] ... | [INFO] [stdout] 31 | | confirmation_modal: &mut Option, [INFO] [stdout] 32 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/ui/layers/tree.rs:56:1 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn draw_layer_tree_recursive( [INFO] [stdout] 57 | | ui: &mut egui::Ui, [INFO] [stdout] 58 | | elements: &[ElementWrapper], [INFO] [stdout] 59 | | current_path: Vec, [INFO] [stdout] ... | [INFO] [stdout] 66 | | confirmation_modal: &mut Option, [INFO] [stdout] 67 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/sbardef.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | / if path.len() > 1 { [INFO] [stdout] 130 | | if let Some(el) = self.get_element_mut(path) { [INFO] [stdout] 131 | | changed |= crate::ui::properties::conditions::draw_conditions_editor( [INFO] [stdout] 132 | | ui, el, ctx.assets, ctx.state, [INFO] [stdout] ... | [INFO] [stdout] 135 | | } [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] 129 ~ if path.len() > 1 [INFO] [stdout] 130 ~ && let Some(el) = self.get_element_mut(path) { [INFO] [stdout] 131 | changed |= crate::ui::properties::conditions::draw_conditions_editor( [INFO] [stdout] 132 | ui, el, ctx.assets, ctx.state, [INFO] [stdout] 133 | ); [INFO] [stdout] 134 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/ui/layers/tree.rs:129:1 [INFO] [stdout] | [INFO] [stdout] 129 | / fn draw_layer_row( [INFO] [stdout] 130 | | ui: &mut egui::Ui, [INFO] [stdout] 131 | | element: &ElementWrapper, [INFO] [stdout] 132 | | my_path: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 144 | | confirmation_modal: &mut Option, [INFO] [stdout] 145 | | ) -> egui::Response { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `visible` [INFO] [stdout] --> src/ui/layers/tree.rs:249:30 [INFO] [stdout] | [INFO] [stdout] 249 | for i in start.min(end)..=start.max(end) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 249 - for i in start.min(end)..=start.max(end) { [INFO] [stdout] 249 + for in visible.iter().take(start.max(end) + 1).skip(start.min(end)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/tree.rs:264:1 [INFO] [stdout] | [INFO] [stdout] 264 | / fn handle_drop_logic( [INFO] [stdout] 265 | | ui: &mut egui::Ui, [INFO] [stdout] 266 | | rect: egui::Rect, [INFO] [stdout] 267 | | my_path: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 273 | | actions: &mut Vec, [INFO] [stdout] 274 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/ui/layers/tree.rs:280:23 [INFO] [stdout] | [INFO] [stdout] 280 | let is_self = &*dragged == my_path; [INFO] [stdout] | ---------^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `*dragged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/ui/layers/tree.rs:281:45 [INFO] [stdout] | [INFO] [stdout] 281 | let is_parent = my_path.starts_with(&*dragged) && my_path.len() > dragged.len(); [INFO] [stdout] | ^^^^^^^^^ help: try: `&dragged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | / if !is_self && !is_parent && ui.rect_contains_pointer(rect) { [INFO] [stdout] 284 | | if let Some(target) = [INFO] [stdout] 285 | | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... | [INFO] [stdout] 328 | | } [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] 283 ~ if !is_self && !is_parent && ui.rect_contains_pointer(rect) [INFO] [stdout] 284 ~ && let Some(target) = [INFO] [stdout] 285 | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... [INFO] [stdout] 326 | } [INFO] [stdout] 327 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 331 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 332 | | if ui.rect_contains_pointer(rect) { [INFO] [stdout] 333 | | if let Some(target) = [INFO] [stdout] 334 | | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... | [INFO] [stdout] 376 | | } [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] 331 ~ if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 332 ~ && ui.rect_contains_pointer(rect) { [INFO] [stdout] 333 | if let Some(target) = [INFO] [stdout] ... [INFO] [stdout] 374 | } [INFO] [stdout] 375 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:332:9 [INFO] [stdout] | [INFO] [stdout] 332 | / if ui.rect_contains_pointer(rect) { [INFO] [stdout] 333 | | if let Some(target) = [INFO] [stdout] 334 | | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... | [INFO] [stdout] 375 | | } [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] 332 ~ if ui.rect_contains_pointer(rect) [INFO] [stdout] 333 ~ && let Some(target) = [INFO] [stdout] 334 | calculate_drop_target(ui, rect, my_idx, element, is_last, nesting_mode) [INFO] [stdout] ... [INFO] [stdout] 373 | } [INFO] [stdout] 374 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `append_idx` is used as a loop counter [INFO] [stdout] --> src/ui/layers/tree.rs:362:29 [INFO] [stdout] | [INFO] [stdout] 362 | ... for key in asset_keys.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (append_idx, key) in (element.children().len()..).zip(asset_keys.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/sbardef.rs:468:13 [INFO] [stdout] | [INFO] [stdout] 468 | / if ctx.primary_pressed && ctx.viewport_res.hovered() { [INFO] [stdout] 469 | | if let Some(path) = hit_result { [INFO] [stdout] 470 | | ctx.state.interaction.grabbed_path = Some(path.clone()); [INFO] [stdout] 471 | | if ui.input(|i| i.modifiers.shift) { [INFO] [stdout] ... | [INFO] [stdout] 479 | | } [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] 468 ~ if ctx.primary_pressed && ctx.viewport_res.hovered() [INFO] [stdout] 469 ~ && let Some(path) = hit_result { [INFO] [stdout] 470 | ctx.state.interaction.grabbed_path = Some(path.clone()); [INFO] [stdout] ... [INFO] [stdout] 477 | } [INFO] [stdout] 478 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/ui/layers/tree.rs:406:1 [INFO] [stdout] | [INFO] [stdout] 406 | / fn render_row_contents( [INFO] [stdout] 407 | | ui: &mut egui::Ui, [INFO] [stdout] 408 | | rect: egui::Rect, [INFO] [stdout] 409 | | element: &ElementWrapper, [INFO] [stdout] ... | [INFO] [stdout] 416 | | my_path: &[usize], [INFO] [stdout] 417 | | ) -> egui::Response { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/tree.rs:480:1 [INFO] [stdout] | [INFO] [stdout] 480 | / fn handle_context_menu( [INFO] [stdout] 481 | | ui: &egui::Ui, [INFO] [stdout] 482 | | combined_res: &egui::Response, [INFO] [stdout] 483 | | my_path: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 489 | | confirmation_modal: &mut Option, [INFO] [stdout] 490 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:578:5 [INFO] [stdout] | [INFO] [stdout] 578 | / if has_payload { [INFO] [stdout] 579 | | if let Some(pos) = ui.ctx().input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 580 | | let clip = ui.clip_rect(); [INFO] [stdout] 581 | | if clip.contains(pos) { [INFO] [stdout] ... | [INFO] [stdout] 591 | | } [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] 578 ~ if has_payload [INFO] [stdout] 579 ~ && let Some(pos) = ui.ctx().input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 580 | let clip = ui.clip_rect(); [INFO] [stdout] ... [INFO] [stdout] 589 | } [INFO] [stdout] 590 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:668:9 [INFO] [stdout] | [INFO] [stdout] 668 | / if let Some(el) = file.get_element(path) { [INFO] [stdout] 669 | | if !el.children().is_empty() { [INFO] [stdout] 670 | | return true; [INFO] [stdout] 671 | | } [INFO] [stdout] 672 | | } [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] 668 ~ if let Some(el) = file.get_element(path) [INFO] [stdout] 669 ~ && !el.children().is_empty() { [INFO] [stdout] 670 | return true; [INFO] [stdout] 671 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/ui/layers/tree.rs:702:49 [INFO] [stdout] | [INFO] [stdout] 702 | if !is_noop && !parent_path.starts_with(&*dragged) && ui.rect_contains_pointer(rect) { [INFO] [stdout] | ^^^^^^^^^ help: try: `&dragged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/layers/tree.rs:716:5 [INFO] [stdout] | [INFO] [stdout] 716 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 717 | | if ui.rect_contains_pointer(rect) { [INFO] [stdout] 718 | | shared::draw_yellow_line(ui, rect, rect.center().y); [INFO] [stdout] 719 | | if ui.input(|i| i.pointer.any_released()) { [INFO] [stdout] ... | [INFO] [stdout] 733 | | } [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] 716 ~ if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 717 ~ && ui.rect_contains_pointer(rect) { [INFO] [stdout] 718 | shared::draw_yellow_line(ui, rect, rect.center().y); [INFO] [stdout] ... [INFO] [stdout] 731 | } [INFO] [stdout] 732 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `current_insert` is used as a loop counter [INFO] [stdout] --> src/ui/layers/tree.rs:722:17 [INFO] [stdout] | [INFO] [stdout] 722 | for key in asset_keys.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (current_insert, key) in (insert_idx..).zip(asset_keys.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IWAD` contains a capitalized acronym [INFO] [stdout] --> src/ui/layers/mod.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | IWAD, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Iwad` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/layers/mod.rs:34:1 [INFO] [stdout] | [INFO] [stdout] 34 | / pub fn draw_layers_panel( [INFO] [stdout] 35 | | ui: &mut egui::Ui, [INFO] [stdout] 36 | | file: &mut Option, [INFO] [stdout] 37 | | selection: &mut HashSet>, [INFO] [stdout] ... | [INFO] [stdout] 43 | | confirmation_modal: &mut Option, [INFO] [stdout] 44 | | ) -> (Vec, bool) { [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:206:29 [INFO] [stdout] | [INFO] [stdout] 206 | / ... if response.clicked() { [INFO] [stdout] 207 | | ... if let Some(pos) = response.interact_pointer_pos() { [INFO] [stdout] 208 | | ... let idx = ((pos.x - rect.min.x) / step_w).floor() as usize; [INFO] [stdout] 209 | | ... let idx = idx.min(fire.palette.len() - 1); [INFO] [stdout] ... | [INFO] [stdout] 215 | | ... } [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] 206 ~ if response.clicked() [INFO] [stdout] 207 ~ && let Some(pos) = response.interact_pointer_pos() { [INFO] [stdout] 208 | let idx = ((pos.x - rect.min.x) / step_w).floor() as usize; [INFO] [stdout] ... [INFO] [stdout] 213 | ui.ctx().request_repaint(); [INFO] [stdout] 214 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:348:9 [INFO] [stdout] | [INFO] [stdout] 348 | / if let Some(slot_idx) = active_slot { [INFO] [stdout] 349 | | if let Some(fire) = &mut s.fire { [INFO] [stdout] 350 | | if slot_idx < fire.palette.len() { [INFO] [stdout] 351 | | let mut is_open = true; [INFO] [stdout] ... | [INFO] [stdout] 374 | | } [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] 348 ~ if let Some(slot_idx) = active_slot [INFO] [stdout] 349 ~ && let Some(fire) = &mut s.fire { [INFO] [stdout] 350 | if slot_idx < fire.palette.len() { [INFO] [stdout] ... [INFO] [stdout] 372 | } [INFO] [stdout] 373 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:349:13 [INFO] [stdout] | [INFO] [stdout] 349 | / if let Some(fire) = &mut s.fire { [INFO] [stdout] 350 | | if slot_idx < fire.palette.len() { [INFO] [stdout] 351 | | let mut is_open = true; [INFO] [stdout] 352 | | egui::Window::new("Select Fire Color") [INFO] [stdout] ... | [INFO] [stdout] 373 | | } [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 let Some(fire) = &mut s.fire [INFO] [stdout] 350 ~ && slot_idx < fire.palette.len() { [INFO] [stdout] 351 | let mut is_open = true; [INFO] [stdout] ... [INFO] [stdout] 371 | } [INFO] [stdout] 372 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:390:13 [INFO] [stdout] | [INFO] [stdout] 390 | / if sky.sky_type == SkyType::Fire { [INFO] [stdout] 391 | | if let Some(fire_def) = &sky.fire { [INFO] [stdout] 392 | | let sky_id = ctx.assets.resolve_sky_id(&sky.name); [INFO] [stdout] ... | [INFO] [stdout] 413 | | } [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] 390 ~ if sky.sky_type == SkyType::Fire [INFO] [stdout] 391 ~ && let Some(fire_def) = &sky.fire { [INFO] [stdout] 392 | let sky_id = ctx.assets.resolve_sky_id(&sky.name); [INFO] [stdout] ... [INFO] [stdout] 411 | } [INFO] [stdout] 412 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/ui/menu.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / pub enum MenuAction { [INFO] [stdout] 11 | | None, [INFO] [stdout] 12 | | LoadProject(LoadedProject, String), [INFO] [stdout] | | ---------------------------------- the largest variant contains at least 1360 bytes [INFO] [stdout] 13 | | Open, [INFO] [stdout] 14 | | RequestDiscard(PendingAction), [INFO] [stdout] | | ----------------------------- the second-largest variant contains at least 24 bytes [INFO] [stdout] ... | [INFO] [stdout] 18 | | NewProject, [INFO] [stdout] 19 | | } [INFO] [stdout] | |_^ the entire enum is at least 1360 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 12 - LoadProject(LoadedProject, String), [INFO] [stdout] 12 + LoadProject(Box, String), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:448:9 [INFO] [stdout] | [INFO] [stdout] 448 | / if let Some(path) = selection.iter().next() { [INFO] [stdout] 449 | | if let Some(s) = self.data.skies.get(path[0]) { [INFO] [stdout] 450 | | return ( [INFO] [stdout] 451 | | format!("Sky: {}", s.name), [INFO] [stdout] ... | [INFO] [stdout] 456 | | } [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] 448 ~ if let Some(path) = selection.iter().next() [INFO] [stdout] 449 ~ && let Some(s) = self.data.skies.get(path[0]) { [INFO] [stdout] 450 | return ( [INFO] [stdout] ... [INFO] [stdout] 454 | ); [INFO] [stdout] 455 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/menu.rs:48:17 [INFO] [stdout] | [INFO] [stdout] 48 | let dirty = doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 48 - let dirty = doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] 48 + let dirty = doc.as_ref().is_some_and(|d| d.dirty); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:142:17 [INFO] [stdout] | [INFO] [stdout] 142 | / if let Some(d) = doc { [INFO] [stdout] 143 | | if let Some(path) = [INFO] [stdout] 144 | | io::save_pk3_dialog(&d.lumps, assets, &d.passthrough_lumps, d.path.clone()) [INFO] [stdout] ... | [INFO] [stdout] 148 | | } [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] 142 ~ if let Some(d) = doc [INFO] [stdout] 143 ~ && let Some(path) = [INFO] [stdout] 144 | io::save_pk3_dialog(&d.lumps, assets, &d.passthrough_lumps, d.path.clone()) [INFO] [stdout] 145 | { [INFO] [stdout] 146 | action = MenuAction::SaveDone(path); [INFO] [stdout] 147 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | / if let Some(d) = doc { [INFO] [stdout] 153 | | if let Some(lump) = d.get_lump(active_mode) { [INFO] [stdout] 154 | | let sanitized = lump.to_sanitized_json(assets); [INFO] [stdout] 155 | | if let Some(path) = io::save_json_dialog(&sanitized, d.path.clone()) { [INFO] [stdout] ... | [INFO] [stdout] 159 | | } [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] 152 ~ if let Some(d) = doc [INFO] [stdout] 153 ~ && let Some(lump) = d.get_lump(active_mode) { [INFO] [stdout] 154 | let sanitized = lump.to_sanitized_json(assets); [INFO] [stdout] ... [INFO] [stdout] 157 | } [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:163:17 [INFO] [stdout] | [INFO] [stdout] 163 | / if let Some(d) = doc { [INFO] [stdout] 164 | | if let Some(path) = [INFO] [stdout] 165 | | io::save_wad_dialog(&d.lumps, assets, &d.passthrough_lumps, d.path.clone()) [INFO] [stdout] ... | [INFO] [stdout] 169 | | } [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] 163 ~ if let Some(d) = doc [INFO] [stdout] 164 ~ && let Some(path) = [INFO] [stdout] 165 | io::save_wad_dialog(&d.lumps, assets, &d.passthrough_lumps, d.path.clone()) [INFO] [stdout] 166 | { [INFO] [stdout] 167 | action = MenuAction::ExportDone(path); [INFO] [stdout] 168 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:276:13 [INFO] [stdout] | [INFO] [stdout] 276 | / if draw_menu_card(ui, "Base IWAD", iwad_desc) { [INFO] [stdout] 277 | | if let Some(new_path) = io::load_iwad_dialog(ctx, assets) { [INFO] [stdout] 278 | | config.base_wad_path = Some(new_path); [INFO] [stdout] 279 | | } [INFO] [stdout] 280 | | } [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] 276 ~ if draw_menu_card(ui, "Base IWAD", iwad_desc) [INFO] [stdout] 277 ~ && let Some(new_path) = io::load_iwad_dialog(ctx, assets) { [INFO] [stdout] 278 | config.base_wad_path = Some(new_path); [INFO] [stdout] 279 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/text.rs:364:33 [INFO] [stdout] | [INFO] [stdout] 364 | / ... if draw_number_options(ui, &mut n.type_, &mut n.param, target) { [INFO] [stdout] 365 | | ... close = true; [INFO] [stdout] 366 | | ... changed = true; [INFO] [stdout] 367 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 363 ~ Element::Number(n) [INFO] [stdout] 364 ~ if draw_number_options(ui, &mut n.type_, &mut n.param, target) => { [INFO] [stdout] 365 | close = true; [INFO] [stdout] 366 | changed = true; [INFO] [stdout] 367 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/text.rs:370:33 [INFO] [stdout] | [INFO] [stdout] 370 | / ... if draw_number_options(ui, &mut p.type_, &mut p.param, target) { [INFO] [stdout] 371 | | ... close = true; [INFO] [stdout] 372 | | ... changed = true; [INFO] [stdout] 373 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 369 ~ Element::Percent(p) [INFO] [stdout] 370 ~ if draw_number_options(ui, &mut p.type_, &mut p.param, target) => { [INFO] [stdout] 371 | close = true; [INFO] [stdout] 372 | changed = true; [INFO] [stdout] 373 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/text.rs:376:33 [INFO] [stdout] | [INFO] [stdout] 376 | / ... if super::components::draw_component_options(ui, &mut c.type_) { [INFO] [stdout] 377 | | ... close = true; [INFO] [stdout] 378 | | ... changed = true; [INFO] [stdout] 379 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 375 ~ Element::Component(c) [INFO] [stdout] 376 ~ if super::components::draw_component_options(ui, &mut c.type_) => { [INFO] [stdout] 377 | close = true; [INFO] [stdout] 378 | changed = true; [INFO] [stdout] 379 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/text.rs:412:5 [INFO] [stdout] | [INFO] [stdout] 412 | / if let Element::Graphic(g) = &mut element.data { [INFO] [stdout] 413 | | if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 414 | | if ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 415 | | ui.ctx().set_cursor_icon(egui::CursorIcon::Copy); [INFO] [stdout] ... | [INFO] [stdout] 442 | | } [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] 412 ~ if let Element::Graphic(g) = &mut element.data [INFO] [stdout] 413 ~ && let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 414 | if ui.rect_contains_pointer(response.rect) { [INFO] [stdout] ... [INFO] [stdout] 440 | } [INFO] [stdout] 441 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/text.rs:413:9 [INFO] [stdout] | [INFO] [stdout] 413 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 414 | | if ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 415 | | ui.ctx().set_cursor_icon(egui::CursorIcon::Copy); [INFO] [stdout] 416 | | ui.painter() [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [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] 413 ~ if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 414 ~ && ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 415 | ui.ctx().set_cursor_icon(egui::CursorIcon::Copy); [INFO] [stdout] ... [INFO] [stdout] 439 | } [INFO] [stdout] 440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `asset_keys.get(0)` [INFO] [stdout] --> src/ui/properties/text.rs:434:40 [INFO] [stdout] | [INFO] [stdout] 434 | if let Some(key) = asset_keys.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `asset_keys.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: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/text.rs:525:5 [INFO] [stdout] | [INFO] [stdout] 525 | / if is_extended { [INFO] [stdout] 526 | | if common::custom_menu_item(ui, "Powerup Time", *type_ == NumberType::PowerupDuration) { [INFO] [stdout] 527 | | *type_ = NumberType::PowerupDuration; [INFO] [stdout] 528 | | if !lookups::POWERUPS.iter().any(|i| i.id == *param) { [INFO] [stdout] ... | [INFO] [stdout] 533 | | } [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] 525 ~ if is_extended [INFO] [stdout] 526 ~ && common::custom_menu_item(ui, "Powerup Time", *type_ == NumberType::PowerupDuration) { [INFO] [stdout] 527 | *type_ = NumberType::PowerupDuration; [INFO] [stdout] ... [INFO] [stdout] 531 | changed = true; [INFO] [stdout] 532 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:684:49 [INFO] [stdout] | [INFO] [stdout] 684 | / ... if let Some(doc) = &mut app.doc { [INFO] [stdout] 685 | | ... if let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 686 | | ... for nf in s.data.number_fonts { [INFO] [stdout] 687 | | ... if !sbar.data.number_fonts.iter().any(|f| f.name == nf.name) { [INFO] [stdout] ... | [INFO] [stdout] 697 | | ... } [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] 684 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 685 ~ && let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 686 | for nf in s.data.number_fonts { [INFO] [stdout] ... [INFO] [stdout] 695 | } [INFO] [stdout] 696 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/menu.rs:727:17 [INFO] [stdout] | [INFO] [stdout] 727 | / if app.creation_modal != CreationModal::LumpSelector && app.creation_modal != CreationModal::LayoutTemplate { [INFO] [stdout] 728 | | if ui.button(" Back ").clicked() { [INFO] [stdout] 729 | | app.creation_modal = CreationModal::LumpSelector; [INFO] [stdout] 730 | | } [INFO] [stdout] 731 | | } [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] 727 ~ if app.creation_modal != CreationModal::LumpSelector && app.creation_modal != CreationModal::LayoutTemplate [INFO] [stdout] 728 ~ && ui.button(" Back ").clicked() { [INFO] [stdout] 729 | app.creation_modal = CreationModal::LumpSelector; [INFO] [stdout] 730 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BFG` contains a capitalized acronym [INFO] [stdout] --> src/ui/messages.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | BFG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bfg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/umapinfo.rs:300:25 [INFO] [stdout] | [INFO] [stdout] 300 | / if ui.add(egui::DragValue::new(v).suffix("s")).changed() { [INFO] [stdout] 301 | | changed = true; [INFO] [stdout] 302 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 299 ~ UmapField::ParTime(v) [INFO] [stdout] 300 ~ if ui.add(egui::DragValue::new(v).suffix("s")).changed() => { [INFO] [stdout] 301 | changed = true; [INFO] [stdout] 302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/umapinfo.rs:308:25 [INFO] [stdout] | [INFO] [stdout] 308 | / if ui.checkbox(v, "Enabled").changed() { [INFO] [stdout] 309 | | changed = true; [INFO] [stdout] 310 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 307 ~ | UmapField::NoIntermission(v) [INFO] [stdout] 308 ~ if ui.checkbox(v, "Enabled").changed() => { [INFO] [stdout] 309 | changed = true; [INFO] [stdout] 310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/umapinfo.rs:258:29 [INFO] [stdout] | [INFO] [stdout] 258 | / ... if !is_clear { [INFO] [stdout] 259 | | ... if ui [INFO] [stdout] 260 | | ... .add( [INFO] [stdout] 261 | | ... egui::TextEdit::singleline(s) [INFO] [stdout] ... | [INFO] [stdout] 268 | | ... } [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] 258 ~ if !is_clear [INFO] [stdout] 259 ~ && ui [INFO] [stdout] 260 | .add( [INFO] [stdout] ... [INFO] [stdout] 266 | changed = true; [INFO] [stdout] 267 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/modals.rs:40:21 [INFO] [stdout] | [INFO] [stdout] 40 | / if crate::ui::menu::draw_menu_card(ui, "Select Base DOOM II IWAD", desc) { [INFO] [stdout] 41 | | if let Some(p) = crate::io::load_iwad_dialog(ctx, &mut app.assets) { [INFO] [stdout] 42 | | app.config.base_wad_path = Some(p); [INFO] [stdout] 43 | | app.config.save(); [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [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] 40 ~ if crate::ui::menu::draw_menu_card(ui, "Select Base DOOM II IWAD", desc) [INFO] [stdout] 41 ~ && let Some(p) = crate::io::load_iwad_dialog(ctx, &mut app.assets) { [INFO] [stdout] 42 | app.config.base_wad_path = Some(p); [INFO] [stdout] 43 | app.config.save(); [INFO] [stdout] 44 | app.iwad_verified = true; [INFO] [stdout] 45 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui/modals.rs:184:93 [INFO] [stdout] | [INFO] [stdout] 184 | } else if let Some(loaded) = crate::io::load_project_from_path(ctx, &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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui/modals.rs:185:59 [INFO] [stdout] | [INFO] [stdout] 185 | ... app.load_project(ctx, loaded, &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: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/properties/animation.rs:168:1 [INFO] [stdout] | [INFO] [stdout] 168 | / fn draw_frame_row( [INFO] [stdout] 169 | | ui: &mut egui::Ui, [INFO] [stdout] 170 | | idx: usize, [INFO] [stdout] 171 | | frame: &mut FrameDef, [INFO] [stdout] ... | [INFO] [stdout] 176 | | is_active: bool, [INFO] [stdout] 177 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:19:24 [INFO] [stdout] | [INFO] [stdout] 19 | let is_dirty = app.doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 19 - let is_dirty = app.doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] 19 + let is_dirty = app.doc.as_ref().is_some_and(|d| d.dirty); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | / if let Some(lm) = last_mode { [INFO] [stdout] 46 | | if lm != app.active_mode { [INFO] [stdout] 47 | | if let Some(doc) = &mut app.doc { [INFO] [stdout] 48 | | doc.selection.clear(); [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [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] 45 ~ if let Some(lm) = last_mode [INFO] [stdout] 46 ~ && lm != app.active_mode { [INFO] [stdout] 47 | if let Some(doc) = &mut app.doc { [INFO] [stdout] ... [INFO] [stdout] 56 | app.preview_state.sim.engine.zoom_level = 1; [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:104:25 [INFO] [stdout] | [INFO] [stdout] 104 | / if ui::draw_properties_panel( [INFO] [stdout] 105 | | ui, [INFO] [stdout] 106 | | &mut active_lump, [INFO] [stdout] 107 | | &doc.selection, [INFO] [stdout] ... | [INFO] [stdout] 117 | | } [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] 110 ~ ) [INFO] [stdout] 111 ~ && let Some(updated) = active_lump { [INFO] [stdout] 112 | if let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] ... [INFO] [stdout] 115 | } [INFO] [stdout] 116 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:111:29 [INFO] [stdout] | [INFO] [stdout] 111 | / ... if let Some(updated) = active_lump { [INFO] [stdout] 112 | | ... if let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 113 | | ... *lump_ref = updated; [INFO] [stdout] 114 | | ... doc.dirty = true; [INFO] [stdout] 115 | | ... } [INFO] [stdout] 116 | | ... } [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] 111 ~ if let Some(updated) = active_lump [INFO] [stdout] 112 ~ && let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 113 | *lump_ref = updated; [INFO] [stdout] 114 | doc.dirty = true; [INFO] [stdout] 115 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:149:17 [INFO] [stdout] | [INFO] [stdout] 149 | / if let Some(updated) = active_lump { [INFO] [stdout] 150 | | if let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 151 | | *lump_ref = updated; [INFO] [stdout] 152 | | } [INFO] [stdout] 153 | | } [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] 149 ~ if let Some(updated) = active_lump [INFO] [stdout] 150 ~ && let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 151 | *lump_ref = updated; [INFO] [stdout] 152 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:204:5 [INFO] [stdout] | [INFO] [stdout] 204 | / if let Some(doc) = &mut app.doc { [INFO] [stdout] 205 | | if let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) [INFO] [stdout] 206 | | { [INFO] [stdout] 207 | | if font_wizard::draw_font_wizard(ctx, &mut app.font_wizard, sbar, &app.assets) { [INFO] [stdout] ... | [INFO] [stdout] 211 | | } [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] 204 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 205 ~ && let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) [INFO] [stdout] 206 | { [INFO] [stdout] ... [INFO] [stdout] 209 | } [INFO] [stdout] 210 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | / if let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) [INFO] [stdout] 206 | | { [INFO] [stdout] 207 | | if font_wizard::draw_font_wizard(ctx, &mut app.font_wizard, sbar, &app.assets) { [INFO] [stdout] 208 | | doc.dirty = true; [INFO] [stdout] 209 | | } [INFO] [stdout] 210 | | } [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] 205 ~ if let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) [INFO] [stdout] 206 ~ && font_wizard::draw_font_wizard(ctx, &mut app.font_wizard, sbar, &app.assets) { [INFO] [stdout] 207 | doc.dirty = true; [INFO] [stdout] 208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/animation.rs:384:5 [INFO] [stdout] | [INFO] [stdout] 384 | / if let Some(keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 385 | | if ui.rect_contains_pointer(rect) { [INFO] [stdout] 386 | | ui.painter() [INFO] [stdout] 387 | | .rect_filled(rect, 4.0, egui::Color32::from_white_alpha(10)); [INFO] [stdout] ... | [INFO] [stdout] 395 | | } [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] 384 ~ if let Some(keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 385 ~ && ui.rect_contains_pointer(rect) { [INFO] [stdout] 386 | ui.painter() [INFO] [stdout] ... [INFO] [stdout] 393 | } [INFO] [stdout] 394 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:364:28 [INFO] [stdout] | [INFO] [stdout] 364 | let is_dirty = app.doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 364 - let is_dirty = app.doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] 364 + let is_dirty = app.doc.as_ref().is_some_and(|d| d.dirty); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:411:13 [INFO] [stdout] | [INFO] [stdout] 411 | / if let Some(doc) = &app.doc { [INFO] [stdout] 412 | | if let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 413 | | let sanitized = lump.to_sanitized_json(&app.assets); [INFO] [stdout] 414 | | if let Some(p) = crate::io::save_json_dialog(&sanitized, doc.path.clone()) { [INFO] [stdout] ... | [INFO] [stdout] 422 | | } [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] 411 ~ if let Some(doc) = &app.doc [INFO] [stdout] 412 ~ && let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 413 | let sanitized = lump.to_sanitized_json(&app.assets); [INFO] [stdout] ... [INFO] [stdout] 420 | } [INFO] [stdout] 421 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:457:13 [INFO] [stdout] | [INFO] [stdout] 457 | / if let Some(doc) = &mut app.doc { [INFO] [stdout] 458 | | if let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 459 | | if !doc.history.bar_clipboard.is_empty() { [INFO] [stdout] 460 | | let count = doc.history.bar_clipboard.len(); [INFO] [stdout] ... | [INFO] [stdout] 498 | | } [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] 457 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 458 ~ && let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 459 | if !doc.history.bar_clipboard.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 496 | } [INFO] [stdout] 497 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:501:13 [INFO] [stdout] | [INFO] [stdout] 501 | / if let Some(doc) = &mut app.doc { [INFO] [stdout] 502 | | if !doc.selection.is_empty() { [INFO] [stdout] 503 | | doc.history.take_snapshot(&doc.lumps, &doc.selection); [INFO] [stdout] 504 | | let paths: Vec> = doc.selection.iter().cloned().collect(); [INFO] [stdout] ... | [INFO] [stdout] 518 | | } [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] 501 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 502 ~ && !doc.selection.is_empty() { [INFO] [stdout] 503 | doc.history.take_snapshot(&doc.lumps, &doc.selection); [INFO] [stdout] ... [INFO] [stdout] 516 | messages::log_event(&mut app.preview_state, EditorEvent::Duplicate); [INFO] [stdout] 517 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:521:13 [INFO] [stdout] | [INFO] [stdout] 521 | / if let Some(doc) = &mut app.doc { [INFO] [stdout] 522 | | if let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 523 | | if !doc.selection.is_empty() { [INFO] [stdout] 524 | | let paths: Vec> = doc.selection.iter().cloned().collect(); [INFO] [stdout] ... | [INFO] [stdout] 568 | | } [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] 521 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 522 ~ && let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 523 | if !doc.selection.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 566 | } [INFO] [stdout] 567 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:522:17 [INFO] [stdout] | [INFO] [stdout] 522 | / if let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 523 | | if !doc.selection.is_empty() { [INFO] [stdout] 524 | | let paths: Vec> = doc.selection.iter().cloned().collect(); [INFO] [stdout] ... | [INFO] [stdout] 567 | | } [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] 522 ~ if let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) [INFO] [stdout] 523 ~ && !doc.selection.is_empty() { [INFO] [stdout] 524 | let paths: Vec> = doc.selection.iter().cloned().collect(); [INFO] [stdout] ... [INFO] [stdout] 565 | } [INFO] [stdout] 566 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/compatibility.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | / if (n.type_ as u8) > 7 { [INFO] [stdout] 31 | | return false; [INFO] [stdout] 32 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ Element::Number(n) | Element::Percent(n) [INFO] [stdout] 30 ~ if (n.type_ as u8) > 7 => { [INFO] [stdout] 31 | return false; [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:546:29 [INFO] [stdout] | [INFO] [stdout] 546 | / ... if let Some(el) = sbar.get_element(path) { [INFO] [stdout] 547 | | ... if !el.children().is_empty() { [INFO] [stdout] 548 | | ... needs_conf = true; [INFO] [stdout] 549 | | ... break; [INFO] [stdout] 550 | | ... } [INFO] [stdout] 551 | | ... } [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] 546 ~ if let Some(el) = sbar.get_element(path) [INFO] [stdout] 547 ~ && !el.children().is_empty() { [INFO] [stdout] 548 | needs_conf = true; [INFO] [stdout] 549 | break; [INFO] [stdout] 550 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:595:43 [INFO] [stdout] | [INFO] [stdout] 595 | let current_is_extended = doc [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 596 | | .get_lump(app.active_mode) [INFO] [stdout] 597 | | .map_or(false, |l| l.target() == Extended); [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 597 - .map_or(false, |l| l.target() == Extended); [INFO] [stdout] 597 + .is_some_and(|l| l.target() == Extended); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:599:17 [INFO] [stdout] | [INFO] [stdout] 599 | / if current_is_extended && t == Basic { [INFO] [stdout] 600 | | if let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 601 | | if lump.determine_target() == Extended { [INFO] [stdout] 602 | | app.confirmation_modal = Some(ConfirmationRequest::DowngradeTarget(t)); [INFO] [stdout] ... | [INFO] [stdout] 606 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 599 ~ if current_is_extended && t == Basic [INFO] [stdout] 600 ~ && let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 601 | if lump.determine_target() == Extended { [INFO] [stdout] ... [INFO] [stdout] 604 | } [INFO] [stdout] 605 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:600:21 [INFO] [stdout] | [INFO] [stdout] 600 | / if let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 601 | | if lump.determine_target() == Extended { [INFO] [stdout] 602 | | app.confirmation_modal = Some(ConfirmationRequest::DowngradeTarget(t)); [INFO] [stdout] 603 | | return; [INFO] [stdout] 604 | | } [INFO] [stdout] 605 | | } [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] 600 ~ if let Some(lump) = doc.get_lump(app.active_mode) [INFO] [stdout] 601 ~ && lump.determine_target() == Extended { [INFO] [stdout] 602 | app.confirmation_modal = Some(ConfirmationRequest::DowngradeTarget(t)); [INFO] [stdout] 603 | return; [INFO] [stdout] 604 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:701:28 [INFO] [stdout] | [INFO] [stdout] 701 | let delay_passed = move_start_time.map_or(false, |t| current_time - t >= 0.5); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 701 - let delay_passed = move_start_time.map_or(false, |t| current_time - t >= 0.5); [INFO] [stdout] 701 + let delay_passed = move_start_time.is_some_and(|t| current_time - t >= 0.5); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:702:31 [INFO] [stdout] | [INFO] [stdout] 702 | let recently_undone = recent_move_time.map_or(false, |t| current_time - t < 0.1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 702 - let recently_undone = recent_move_time.map_or(false, |t| current_time - t < 0.1); [INFO] [stdout] 702 + let recently_undone = recent_move_time.is_some_and(|t| current_time - t < 0.1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/conditions.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | / if !common_ref.conditions.is_empty() { [INFO] [stdout] 65 | | if ui [INFO] [stdout] 66 | | .add_enabled(!is_ammo_selected, egui::Button::new("Clear All")) [INFO] [stdout] 67 | | .clicked() [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [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] 64 ~ if !common_ref.conditions.is_empty() [INFO] [stdout] 65 ~ && ui [INFO] [stdout] 66 | .add_enabled(!is_ammo_selected, egui::Button::new("Clear All")) [INFO] [stdout] ... [INFO] [stdout] 70 | changed = true; [INFO] [stdout] 71 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/shared.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / if let (Some(vr), Some(pp)) = (viewport_rect, pointer_pos) { [INFO] [stdout] 58 | | if vr.contains(pp) { [INFO] [stdout] 59 | | return; [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 57 ~ if let (Some(vr), Some(pp)) = (viewport_rect, pointer_pos) [INFO] [stdout] 58 ~ && vr.contains(pp) { [INFO] [stdout] 59 | return; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/properties/conditions.rs:115:1 [INFO] [stdout] | [INFO] [stdout] 115 | / fn draw_condition_card( [INFO] [stdout] 116 | | ui: &mut egui::Ui, [INFO] [stdout] 117 | | cond: &mut ConditionDef, [INFO] [stdout] 118 | | assets: &AssetStore, [INFO] [stdout] ... | [INFO] [stdout] 123 | | target: ExportTarget, [INFO] [stdout] 124 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/ui/properties/conditions.rs:126:46 [INFO] [stdout] | [INFO] [stdout] 126 | let is_true = crate::conditions::resolve(&[cond.clone()], state, assets); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(cond)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] = note: `#[warn(clippy::cloned_ref_to_slice_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/conditions.rs:197:41 [INFO] [stdout] | [INFO] [stdout] 197 | / ... if common::custom_menu_item(ui, g.name, g_idx == idx) { [INFO] [stdout] 198 | | ... if idx != g_idx { [INFO] [stdout] 199 | | ... let new_group = &lookups::GROUPS[idx]; [INFO] [stdout] 200 | | ... cond.condition = new_group.variants[0].condition; [INFO] [stdout] ... | [INFO] [stdout] 207 | | ... } [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] 197 ~ if common::custom_menu_item(ui, g.name, g_idx == idx) [INFO] [stdout] 198 ~ && idx != g_idx { [INFO] [stdout] 199 | let new_group = &lookups::GROUPS[idx]; [INFO] [stdout] ... [INFO] [stdout] 205 | ContextMenu::close(ui); [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/shared.rs:341:5 [INFO] [stdout] | [INFO] [stdout] 341 | / if let Some(source_idx) = egui::DragAndDrop::payload::(ui.ctx()) { [INFO] [stdout] 342 | | if *source_idx != i { [INFO] [stdout] 343 | | if let Some(target_idx) = handle_list_drag_zone(ui, rect, i, count) { [INFO] [stdout] 344 | | return Some((*source_idx, target_idx)); [INFO] [stdout] ... | [INFO] [stdout] 347 | | } [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] 341 ~ if let Some(source_idx) = egui::DragAndDrop::payload::(ui.ctx()) [INFO] [stdout] 342 ~ && *source_idx != i { [INFO] [stdout] 343 | if let Some(target_idx) = handle_list_drag_zone(ui, rect, i, count) { [INFO] [stdout] 344 | return Some((*source_idx, target_idx)); [INFO] [stdout] 345 | } [INFO] [stdout] 346 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/shared.rs:342:9 [INFO] [stdout] | [INFO] [stdout] 342 | / if *source_idx != i { [INFO] [stdout] 343 | | if let Some(target_idx) = handle_list_drag_zone(ui, rect, i, count) { [INFO] [stdout] 344 | | return Some((*source_idx, target_idx)); [INFO] [stdout] 345 | | } [INFO] [stdout] 346 | | } [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] 342 ~ if *source_idx != i [INFO] [stdout] 343 ~ && let Some(target_idx) = handle_list_drag_zone(ui, rect, i, count) { [INFO] [stdout] 344 | return Some((*source_idx, target_idx)); [INFO] [stdout] 345 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/conditions.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 352 | | if ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 353 | | ui.painter().rect_stroke( [INFO] [stdout] 354 | | response.rect, [INFO] [stdout] ... | [INFO] [stdout] 364 | | } [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(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 352 ~ && ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 353 | ui.painter().rect_stroke( [INFO] [stdout] ... [INFO] [stdout] 362 | } [INFO] [stdout] 363 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/viewport.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | / pub fn draw_viewport( [INFO] [stdout] 17 | | ui: &mut egui::Ui, [INFO] [stdout] 18 | | project: &Option, [INFO] [stdout] 19 | | assets: &AssetStore, [INFO] [stdout] ... | [INFO] [stdout] 24 | | active_mode: &mut crate::app::ProjectMode, [INFO] [stdout] 25 | | ) -> Vec { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:267:25 [INFO] [stdout] | [INFO] [stdout] 267 | / if !already_exists { [INFO] [stdout] 268 | | if crate::ui::context_menu::ContextMenu::button(ui, lbl, true) { [INFO] [stdout] 269 | | ui.data_mut(|d| { [INFO] [stdout] 270 | | d.insert_temp(egui::Id::new("creation_modal_type"), target) [INFO] [stdout] ... | [INFO] [stdout] 274 | | } [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] 267 ~ if !already_exists [INFO] [stdout] 268 ~ && crate::ui::context_menu::ContextMenu::button(ui, lbl, true) { [INFO] [stdout] 269 | ui.data_mut(|d| { [INFO] [stdout] ... [INFO] [stdout] 272 | crate::ui::context_menu::ContextMenu::close(ui); [INFO] [stdout] 273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:319:21 [INFO] [stdout] | [INFO] [stdout] 319 | / if ui [INFO] [stdout] 320 | | .checkbox(&mut preview_state.sim.engine.auto_zoom, "Auto Fit") [INFO] [stdout] 321 | | .changed() [INFO] [stdout] ... | [INFO] [stdout] 326 | | } [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] 321 ~ .changed() [INFO] [stdout] 322 ~ && preview_state.sim.engine.auto_zoom { [INFO] [stdout] 323 | preview_state.sim.engine.pan_offset = egui::Vec2::ZERO; [INFO] [stdout] 324 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:436:9 [INFO] [stdout] | [INFO] [stdout] 436 | / if viewport_res.drag_started_by(egui::PointerButton::Middle) { [INFO] [stdout] 437 | | if let Some(pos) = ui.input(|i| i.pointer.hover_pos()) { [INFO] [stdout] 438 | | ui.ctx().data_mut(|d| d.insert_temp(middle_anchor_id, pos)); [INFO] [stdout] 439 | | } [INFO] [stdout] 440 | | } [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] 436 ~ if viewport_res.drag_started_by(egui::PointerButton::Middle) [INFO] [stdout] 437 ~ && let Some(pos) = ui.input(|i| i.pointer.hover_pos()) { [INFO] [stdout] 438 | ui.ctx().data_mut(|d| d.insert_temp(middle_anchor_id, pos)); [INFO] [stdout] 439 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:443:13 [INFO] [stdout] | [INFO] [stdout] 443 | / if let Some(anchor) = ui [INFO] [stdout] 444 | | .ctx() [INFO] [stdout] 445 | | .data(|d| d.get_temp::(middle_anchor_id)) [INFO] [stdout] ... | [INFO] [stdout] 462 | | } [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] 445 ~ .data(|d| d.get_temp::(middle_anchor_id)) [INFO] [stdout] 446 ~ && let Some(pos) = ui.input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 447 | let delta = pos - anchor; [INFO] [stdout] ... [INFO] [stdout] 459 | ui.ctx().set_cursor_icon(egui::CursorIcon::AllScroll); [INFO] [stdout] 460 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/viewport.rs:470:1 [INFO] [stdout] | [INFO] [stdout] 470 | / fn handle_asset_drop( [INFO] [stdout] 471 | | ui: &mut egui::Ui, [INFO] [stdout] 472 | | viewport_res: &egui::Response, [INFO] [stdout] 473 | | project: &Option, [INFO] [stdout] ... | [INFO] [stdout] 479 | | controller: &ViewportController, [INFO] [stdout] 480 | | ) -> Vec { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:483:5 [INFO] [stdout] | [INFO] [stdout] 483 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 484 | | if viewport_res.contains_pointer() { [INFO] [stdout] 485 | | ui.ctx().set_cursor_icon(egui::CursorIcon::None); [INFO] [stdout] 486 | | if let Some(ProjectData::StatusBar(sbar)) = project { [INFO] [stdout] ... | [INFO] [stdout] 544 | | } [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] 483 ~ if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 484 ~ && viewport_res.contains_pointer() { [INFO] [stdout] 485 | ui.ctx().set_cursor_icon(egui::CursorIcon::None); [INFO] [stdout] ... [INFO] [stdout] 542 | } [INFO] [stdout] 543 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:486:13 [INFO] [stdout] | [INFO] [stdout] 486 | / if let Some(ProjectData::StatusBar(sbar)) = project { [INFO] [stdout] 487 | | if let Some(pos) = ui.input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 488 | | let bar_idx = [INFO] [stdout] 489 | | current_bar_idx.min(sbar.data.status_bars.len().saturating_sub(1)); [INFO] [stdout] ... | [INFO] [stdout] 542 | | } [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] 486 ~ if let Some(ProjectData::StatusBar(sbar)) = project [INFO] [stdout] 487 ~ && let Some(pos) = ui.input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 488 | let bar_idx = [INFO] [stdout] ... [INFO] [stdout] 540 | } [INFO] [stdout] 541 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/viewport_controller.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn handle_selection_drag( [INFO] [stdout] 27 | | &mut self, [INFO] [stdout] 28 | | ui: &egui::Ui, [INFO] [stdout] 29 | | proj: &ViewportProjection, [INFO] [stdout] ... | [INFO] [stdout] 34 | | state: &mut crate::state::PreviewState, [INFO] [stdout] 35 | | ) -> Vec { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wad/umapinfo.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / if let Some(sky_file) = sky_lump { [INFO] [stdout] 13 | | if let Some(first_sky_entry) = sky_file.data.skies.first() { [INFO] [stdout] 14 | | let mut output = String::new(); [INFO] [stdout] 15 | | output.push_str("map MAP01\n{\n"); [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [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] 12 ~ if let Some(sky_file) = sky_lump [INFO] [stdout] 13 ~ && let Some(first_sky_entry) = sky_file.data.skies.first() { [INFO] [stdout] 14 | let mut output = String::new(); [INFO] [stdout] ... [INFO] [stdout] 21 | return output; [INFO] [stdout] 22 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wad/mod.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | / if managed_names.iter().any(|&m| m.eq_ignore_ascii_case(&name)) { [INFO] [stdout] 74 | | if let Some(parsed) = ProjectData::parse_lump(&name, &lump_data) { [INFO] [stdout] 75 | | lumps.push(parsed); [INFO] [stdout] 76 | | } [INFO] [stdout] 77 | | } [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] 73 ~ if managed_names.iter().any(|&m| m.eq_ignore_ascii_case(&name)) [INFO] [stdout] 74 ~ && let Some(parsed) = ProjectData::parse_lump(&name, &lump_data) { [INFO] [stdout] 75 | lumps.push(parsed); [INFO] [stdout] 76 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/sbardef.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / if let Some(path) = ctx.selection.iter().next() { [INFO] [stdout] 36 | | if path.len() > 1 { [INFO] [stdout] 37 | | ui.columns(2, |uis| { [INFO] [stdout] 38 | | if crate::ui::shared::section_header_button( [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [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] 35 ~ if let Some(path) = ctx.selection.iter().next() [INFO] [stdout] 36 ~ && path.len() > 1 { [INFO] [stdout] 37 | ui.columns(2, |uis| { [INFO] [stdout] ... [INFO] [stdout] 61 | ui.add_space(4.0); [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/sbardef.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | / if path.len() > 1 { [INFO] [stdout] 130 | | if let Some(el) = self.get_element_mut(path) { [INFO] [stdout] 131 | | changed |= crate::ui::properties::conditions::draw_conditions_editor( [INFO] [stdout] 132 | | ui, el, ctx.assets, ctx.state, [INFO] [stdout] ... | [INFO] [stdout] 135 | | } [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] 129 ~ if path.len() > 1 [INFO] [stdout] 130 ~ && let Some(el) = self.get_element_mut(path) { [INFO] [stdout] 131 | changed |= crate::ui::properties::conditions::draw_conditions_editor( [INFO] [stdout] 132 | ui, el, ctx.assets, ctx.state, [INFO] [stdout] 133 | ); [INFO] [stdout] 134 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/sbardef.rs:468:13 [INFO] [stdout] | [INFO] [stdout] 468 | / if ctx.primary_pressed && ctx.viewport_res.hovered() { [INFO] [stdout] 469 | | if let Some(path) = hit_result { [INFO] [stdout] 470 | | ctx.state.interaction.grabbed_path = Some(path.clone()); [INFO] [stdout] 471 | | if ui.input(|i| i.modifiers.shift) { [INFO] [stdout] ... | [INFO] [stdout] 479 | | } [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] 468 ~ if ctx.primary_pressed && ctx.viewport_res.hovered() [INFO] [stdout] 469 ~ && let Some(path) = hit_result { [INFO] [stdout] 470 | ctx.state.interaction.grabbed_path = Some(path.clone()); [INFO] [stdout] ... [INFO] [stdout] 477 | } [INFO] [stdout] 478 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:206:29 [INFO] [stdout] | [INFO] [stdout] 206 | / ... if response.clicked() { [INFO] [stdout] 207 | | ... if let Some(pos) = response.interact_pointer_pos() { [INFO] [stdout] 208 | | ... let idx = ((pos.x - rect.min.x) / step_w).floor() as usize; [INFO] [stdout] 209 | | ... let idx = idx.min(fire.palette.len() - 1); [INFO] [stdout] ... | [INFO] [stdout] 215 | | ... } [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] 206 ~ if response.clicked() [INFO] [stdout] 207 ~ && let Some(pos) = response.interact_pointer_pos() { [INFO] [stdout] 208 | let idx = ((pos.x - rect.min.x) / step_w).floor() as usize; [INFO] [stdout] ... [INFO] [stdout] 213 | ui.ctx().request_repaint(); [INFO] [stdout] 214 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:348:9 [INFO] [stdout] | [INFO] [stdout] 348 | / if let Some(slot_idx) = active_slot { [INFO] [stdout] 349 | | if let Some(fire) = &mut s.fire { [INFO] [stdout] 350 | | if slot_idx < fire.palette.len() { [INFO] [stdout] 351 | | let mut is_open = true; [INFO] [stdout] ... | [INFO] [stdout] 374 | | } [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] 348 ~ if let Some(slot_idx) = active_slot [INFO] [stdout] 349 ~ && let Some(fire) = &mut s.fire { [INFO] [stdout] 350 | if slot_idx < fire.palette.len() { [INFO] [stdout] ... [INFO] [stdout] 372 | } [INFO] [stdout] 373 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:349:13 [INFO] [stdout] | [INFO] [stdout] 349 | / if let Some(fire) = &mut s.fire { [INFO] [stdout] 350 | | if slot_idx < fire.palette.len() { [INFO] [stdout] 351 | | let mut is_open = true; [INFO] [stdout] 352 | | egui::Window::new("Select Fire Color") [INFO] [stdout] ... | [INFO] [stdout] 373 | | } [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 let Some(fire) = &mut s.fire [INFO] [stdout] 350 ~ && slot_idx < fire.palette.len() { [INFO] [stdout] 351 | let mut is_open = true; [INFO] [stdout] ... [INFO] [stdout] 371 | } [INFO] [stdout] 372 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:390:13 [INFO] [stdout] | [INFO] [stdout] 390 | / if sky.sky_type == SkyType::Fire { [INFO] [stdout] 391 | | if let Some(fire_def) = &sky.fire { [INFO] [stdout] 392 | | let sky_id = ctx.assets.resolve_sky_id(&sky.name); [INFO] [stdout] ... | [INFO] [stdout] 413 | | } [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] 390 ~ if sky.sky_type == SkyType::Fire [INFO] [stdout] 391 ~ && let Some(fire_def) = &sky.fire { [INFO] [stdout] 392 | let sky_id = ctx.assets.resolve_sky_id(&sky.name); [INFO] [stdout] ... [INFO] [stdout] 411 | } [INFO] [stdout] 412 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/skydefs.rs:448:9 [INFO] [stdout] | [INFO] [stdout] 448 | / if let Some(path) = selection.iter().next() { [INFO] [stdout] 449 | | if let Some(s) = self.data.skies.get(path[0]) { [INFO] [stdout] 450 | | return ( [INFO] [stdout] 451 | | format!("Sky: {}", s.name), [INFO] [stdout] ... | [INFO] [stdout] 456 | | } [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] 448 ~ if let Some(path) = selection.iter().next() [INFO] [stdout] 449 ~ && let Some(s) = self.data.skies.get(path[0]) { [INFO] [stdout] 450 | return ( [INFO] [stdout] ... [INFO] [stdout] 454 | ); [INFO] [stdout] 455 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/text.rs:364:33 [INFO] [stdout] | [INFO] [stdout] 364 | / ... if draw_number_options(ui, &mut n.type_, &mut n.param, target) { [INFO] [stdout] 365 | | ... close = true; [INFO] [stdout] 366 | | ... changed = true; [INFO] [stdout] 367 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 363 ~ Element::Number(n) [INFO] [stdout] 364 ~ if draw_number_options(ui, &mut n.type_, &mut n.param, target) => { [INFO] [stdout] 365 | close = true; [INFO] [stdout] 366 | changed = true; [INFO] [stdout] 367 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/text.rs:370:33 [INFO] [stdout] | [INFO] [stdout] 370 | / ... if draw_number_options(ui, &mut p.type_, &mut p.param, target) { [INFO] [stdout] 371 | | ... close = true; [INFO] [stdout] 372 | | ... changed = true; [INFO] [stdout] 373 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 369 ~ Element::Percent(p) [INFO] [stdout] 370 ~ if draw_number_options(ui, &mut p.type_, &mut p.param, target) => { [INFO] [stdout] 371 | close = true; [INFO] [stdout] 372 | changed = true; [INFO] [stdout] 373 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/text.rs:376:33 [INFO] [stdout] | [INFO] [stdout] 376 | / ... if super::components::draw_component_options(ui, &mut c.type_) { [INFO] [stdout] 377 | | ... close = true; [INFO] [stdout] 378 | | ... changed = true; [INFO] [stdout] 379 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 375 ~ Element::Component(c) [INFO] [stdout] 376 ~ if super::components::draw_component_options(ui, &mut c.type_) => { [INFO] [stdout] 377 | close = true; [INFO] [stdout] 378 | changed = true; [INFO] [stdout] 379 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/text.rs:412:5 [INFO] [stdout] | [INFO] [stdout] 412 | / if let Element::Graphic(g) = &mut element.data { [INFO] [stdout] 413 | | if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 414 | | if ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 415 | | ui.ctx().set_cursor_icon(egui::CursorIcon::Copy); [INFO] [stdout] ... | [INFO] [stdout] 442 | | } [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] 412 ~ if let Element::Graphic(g) = &mut element.data [INFO] [stdout] 413 ~ && let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 414 | if ui.rect_contains_pointer(response.rect) { [INFO] [stdout] ... [INFO] [stdout] 440 | } [INFO] [stdout] 441 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/text.rs:413:9 [INFO] [stdout] | [INFO] [stdout] 413 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 414 | | if ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 415 | | ui.ctx().set_cursor_icon(egui::CursorIcon::Copy); [INFO] [stdout] 416 | | ui.painter() [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [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] 413 ~ if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 414 ~ && ui.rect_contains_pointer(response.rect) { [INFO] [stdout] 415 | ui.ctx().set_cursor_icon(egui::CursorIcon::Copy); [INFO] [stdout] ... [INFO] [stdout] 439 | } [INFO] [stdout] 440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `asset_keys.get(0)` [INFO] [stdout] --> src/ui/properties/text.rs:434:40 [INFO] [stdout] | [INFO] [stdout] 434 | if let Some(key) = asset_keys.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `asset_keys.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: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/text.rs:525:5 [INFO] [stdout] | [INFO] [stdout] 525 | / if is_extended { [INFO] [stdout] 526 | | if common::custom_menu_item(ui, "Powerup Time", *type_ == NumberType::PowerupDuration) { [INFO] [stdout] 527 | | *type_ = NumberType::PowerupDuration; [INFO] [stdout] 528 | | if !lookups::POWERUPS.iter().any(|i| i.id == *param) { [INFO] [stdout] ... | [INFO] [stdout] 533 | | } [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] 525 ~ if is_extended [INFO] [stdout] 526 ~ && common::custom_menu_item(ui, "Powerup Time", *type_ == NumberType::PowerupDuration) { [INFO] [stdout] 527 | *type_ = NumberType::PowerupDuration; [INFO] [stdout] ... [INFO] [stdout] 531 | changed = true; [INFO] [stdout] 532 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/umapinfo.rs:300:25 [INFO] [stdout] | [INFO] [stdout] 300 | / if ui.add(egui::DragValue::new(v).suffix("s")).changed() { [INFO] [stdout] 301 | | changed = true; [INFO] [stdout] 302 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 299 ~ UmapField::ParTime(v) [INFO] [stdout] 300 ~ if ui.add(egui::DragValue::new(v).suffix("s")).changed() => { [INFO] [stdout] 301 | changed = true; [INFO] [stdout] 302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui/properties/umapinfo.rs:308:25 [INFO] [stdout] | [INFO] [stdout] 308 | / if ui.checkbox(v, "Enabled").changed() { [INFO] [stdout] 309 | | changed = true; [INFO] [stdout] 310 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 307 ~ | UmapField::NoIntermission(v) [INFO] [stdout] 308 ~ if ui.checkbox(v, "Enabled").changed() => { [INFO] [stdout] 309 | changed = true; [INFO] [stdout] 310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/properties/umapinfo.rs:258:29 [INFO] [stdout] | [INFO] [stdout] 258 | / ... if !is_clear { [INFO] [stdout] 259 | | ... if ui [INFO] [stdout] 260 | | ... .add( [INFO] [stdout] 261 | | ... egui::TextEdit::singleline(s) [INFO] [stdout] ... | [INFO] [stdout] 268 | | ... } [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] 258 ~ if !is_clear [INFO] [stdout] 259 ~ && ui [INFO] [stdout] 260 | .add( [INFO] [stdout] ... [INFO] [stdout] 266 | changed = true; [INFO] [stdout] 267 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:19:24 [INFO] [stdout] | [INFO] [stdout] 19 | let is_dirty = app.doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 19 - let is_dirty = app.doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] 19 + let is_dirty = app.doc.as_ref().is_some_and(|d| d.dirty); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | / if let Some(lm) = last_mode { [INFO] [stdout] 46 | | if lm != app.active_mode { [INFO] [stdout] 47 | | if let Some(doc) = &mut app.doc { [INFO] [stdout] 48 | | doc.selection.clear(); [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [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] 45 ~ if let Some(lm) = last_mode [INFO] [stdout] 46 ~ && lm != app.active_mode { [INFO] [stdout] 47 | if let Some(doc) = &mut app.doc { [INFO] [stdout] ... [INFO] [stdout] 56 | app.preview_state.sim.engine.zoom_level = 1; [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:104:25 [INFO] [stdout] | [INFO] [stdout] 104 | / if ui::draw_properties_panel( [INFO] [stdout] 105 | | ui, [INFO] [stdout] 106 | | &mut active_lump, [INFO] [stdout] 107 | | &doc.selection, [INFO] [stdout] ... | [INFO] [stdout] 117 | | } [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] 110 ~ ) [INFO] [stdout] 111 ~ && let Some(updated) = active_lump { [INFO] [stdout] 112 | if let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] ... [INFO] [stdout] 115 | } [INFO] [stdout] 116 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:111:29 [INFO] [stdout] | [INFO] [stdout] 111 | / ... if let Some(updated) = active_lump { [INFO] [stdout] 112 | | ... if let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 113 | | ... *lump_ref = updated; [INFO] [stdout] 114 | | ... doc.dirty = true; [INFO] [stdout] 115 | | ... } [INFO] [stdout] 116 | | ... } [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] 111 ~ if let Some(updated) = active_lump [INFO] [stdout] 112 ~ && let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 113 | *lump_ref = updated; [INFO] [stdout] 114 | doc.dirty = true; [INFO] [stdout] 115 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:149:17 [INFO] [stdout] | [INFO] [stdout] 149 | / if let Some(updated) = active_lump { [INFO] [stdout] 150 | | if let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 151 | | *lump_ref = updated; [INFO] [stdout] 152 | | } [INFO] [stdout] 153 | | } [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] 149 ~ if let Some(updated) = active_lump [INFO] [stdout] 150 ~ && let Some(lump_ref) = doc.get_lump_mut(app.active_mode) { [INFO] [stdout] 151 | *lump_ref = updated; [INFO] [stdout] 152 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:204:5 [INFO] [stdout] | [INFO] [stdout] 204 | / if let Some(doc) = &mut app.doc { [INFO] [stdout] 205 | | if let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) [INFO] [stdout] 206 | | { [INFO] [stdout] 207 | | if font_wizard::draw_font_wizard(ctx, &mut app.font_wizard, sbar, &app.assets) { [INFO] [stdout] ... | [INFO] [stdout] 211 | | } [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] 204 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 205 ~ && let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) [INFO] [stdout] 206 | { [INFO] [stdout] ... [INFO] [stdout] 209 | } [INFO] [stdout] 210 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | / if let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) [INFO] [stdout] 206 | | { [INFO] [stdout] 207 | | if font_wizard::draw_font_wizard(ctx, &mut app.font_wizard, sbar, &app.assets) { [INFO] [stdout] 208 | | doc.dirty = true; [INFO] [stdout] 209 | | } [INFO] [stdout] 210 | | } [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] 205 ~ if let Some(crate::models::ProjectData::StatusBar(sbar)) = doc.get_lump_mut(app.active_mode) [INFO] [stdout] 206 ~ && font_wizard::draw_font_wizard(ctx, &mut app.font_wizard, sbar, &app.assets) { [INFO] [stdout] 207 | doc.dirty = true; [INFO] [stdout] 208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:364:28 [INFO] [stdout] | [INFO] [stdout] 364 | let is_dirty = app.doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 364 - let is_dirty = app.doc.as_ref().map_or(false, |d| d.dirty); [INFO] [stdout] 364 + let is_dirty = app.doc.as_ref().is_some_and(|d| d.dirty); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:411:13 [INFO] [stdout] | [INFO] [stdout] 411 | / if let Some(doc) = &app.doc { [INFO] [stdout] 412 | | if let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 413 | | let sanitized = lump.to_sanitized_json(&app.assets); [INFO] [stdout] 414 | | if let Some(p) = crate::io::save_json_dialog(&sanitized, doc.path.clone()) { [INFO] [stdout] ... | [INFO] [stdout] 422 | | } [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] 411 ~ if let Some(doc) = &app.doc [INFO] [stdout] 412 ~ && let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 413 | let sanitized = lump.to_sanitized_json(&app.assets); [INFO] [stdout] ... [INFO] [stdout] 420 | } [INFO] [stdout] 421 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:457:13 [INFO] [stdout] | [INFO] [stdout] 457 | / if let Some(doc) = &mut app.doc { [INFO] [stdout] 458 | | if let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 459 | | if !doc.history.bar_clipboard.is_empty() { [INFO] [stdout] 460 | | let count = doc.history.bar_clipboard.len(); [INFO] [stdout] ... | [INFO] [stdout] 498 | | } [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] 457 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 458 ~ && let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 459 | if !doc.history.bar_clipboard.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 496 | } [INFO] [stdout] 497 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:501:13 [INFO] [stdout] | [INFO] [stdout] 501 | / if let Some(doc) = &mut app.doc { [INFO] [stdout] 502 | | if !doc.selection.is_empty() { [INFO] [stdout] 503 | | doc.history.take_snapshot(&doc.lumps, &doc.selection); [INFO] [stdout] 504 | | let paths: Vec> = doc.selection.iter().cloned().collect(); [INFO] [stdout] ... | [INFO] [stdout] 518 | | } [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] 501 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 502 ~ && !doc.selection.is_empty() { [INFO] [stdout] 503 | doc.history.take_snapshot(&doc.lumps, &doc.selection); [INFO] [stdout] ... [INFO] [stdout] 516 | messages::log_event(&mut app.preview_state, EditorEvent::Duplicate); [INFO] [stdout] 517 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:521:13 [INFO] [stdout] | [INFO] [stdout] 521 | / if let Some(doc) = &mut app.doc { [INFO] [stdout] 522 | | if let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 523 | | if !doc.selection.is_empty() { [INFO] [stdout] 524 | | let paths: Vec> = doc.selection.iter().cloned().collect(); [INFO] [stdout] ... | [INFO] [stdout] 568 | | } [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] 521 ~ if let Some(doc) = &mut app.doc [INFO] [stdout] 522 ~ && let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 523 | if !doc.selection.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 566 | } [INFO] [stdout] 567 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:522:17 [INFO] [stdout] | [INFO] [stdout] 522 | / if let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) { [INFO] [stdout] 523 | | if !doc.selection.is_empty() { [INFO] [stdout] 524 | | let paths: Vec> = doc.selection.iter().cloned().collect(); [INFO] [stdout] ... | [INFO] [stdout] 567 | | } [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] 522 ~ if let Some(ProjectData::StatusBar(sbar)) = doc.get_lump(app.active_mode) [INFO] [stdout] 523 ~ && !doc.selection.is_empty() { [INFO] [stdout] 524 | let paths: Vec> = doc.selection.iter().cloned().collect(); [INFO] [stdout] ... [INFO] [stdout] 565 | } [INFO] [stdout] 566 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:546:29 [INFO] [stdout] | [INFO] [stdout] 546 | / ... if let Some(el) = sbar.get_element(path) { [INFO] [stdout] 547 | | ... if !el.children().is_empty() { [INFO] [stdout] 548 | | ... needs_conf = true; [INFO] [stdout] 549 | | ... break; [INFO] [stdout] 550 | | ... } [INFO] [stdout] 551 | | ... } [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] 546 ~ if let Some(el) = sbar.get_element(path) [INFO] [stdout] 547 ~ && !el.children().is_empty() { [INFO] [stdout] 548 | needs_conf = true; [INFO] [stdout] 549 | break; [INFO] [stdout] 550 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:595:43 [INFO] [stdout] | [INFO] [stdout] 595 | let current_is_extended = doc [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 596 | | .get_lump(app.active_mode) [INFO] [stdout] 597 | | .map_or(false, |l| l.target() == Extended); [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 597 - .map_or(false, |l| l.target() == Extended); [INFO] [stdout] 597 + .is_some_and(|l| l.target() == Extended); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:599:17 [INFO] [stdout] | [INFO] [stdout] 599 | / if current_is_extended && t == Basic { [INFO] [stdout] 600 | | if let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 601 | | if lump.determine_target() == Extended { [INFO] [stdout] 602 | | app.confirmation_modal = Some(ConfirmationRequest::DowngradeTarget(t)); [INFO] [stdout] ... | [INFO] [stdout] 606 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 599 ~ if current_is_extended && t == Basic [INFO] [stdout] 600 ~ && let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 601 | if lump.determine_target() == Extended { [INFO] [stdout] ... [INFO] [stdout] 604 | } [INFO] [stdout] 605 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/root.rs:600:21 [INFO] [stdout] | [INFO] [stdout] 600 | / if let Some(lump) = doc.get_lump(app.active_mode) { [INFO] [stdout] 601 | | if lump.determine_target() == Extended { [INFO] [stdout] 602 | | app.confirmation_modal = Some(ConfirmationRequest::DowngradeTarget(t)); [INFO] [stdout] 603 | | return; [INFO] [stdout] 604 | | } [INFO] [stdout] 605 | | } [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] 600 ~ if let Some(lump) = doc.get_lump(app.active_mode) [INFO] [stdout] 601 ~ && lump.determine_target() == Extended { [INFO] [stdout] 602 | app.confirmation_modal = Some(ConfirmationRequest::DowngradeTarget(t)); [INFO] [stdout] 603 | return; [INFO] [stdout] 604 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:701:28 [INFO] [stdout] | [INFO] [stdout] 701 | let delay_passed = move_start_time.map_or(false, |t| current_time - t >= 0.5); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 701 - let delay_passed = move_start_time.map_or(false, |t| current_time - t >= 0.5); [INFO] [stdout] 701 + let delay_passed = move_start_time.is_some_and(|t| current_time - t >= 0.5); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/ui/root.rs:702:31 [INFO] [stdout] | [INFO] [stdout] 702 | let recently_undone = recent_move_time.map_or(false, |t| current_time - t < 0.1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 702 - let recently_undone = recent_move_time.map_or(false, |t| current_time - t < 0.1); [INFO] [stdout] 702 + let recently_undone = recent_move_time.is_some_and(|t| current_time - t < 0.1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/ui/root.rs:786:9 [INFO] [stdout] | [INFO] [stdout] 786 | / app.doc = Some(document::ProjectDocument::new( [INFO] [stdout] 787 | | ProjectData::StatusBar(SBarDefFile::new_empty()), [INFO] [stdout] 788 | | Vec::new(), [INFO] [stdout] 789 | | None, [INFO] [stdout] 790 | | )); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `app::CacocoApp { doc: Some(document::ProjectDocument::new( [INFO] [stdout] ProjectData::StatusBar(SBarDefFile::new_empty()), [INFO] [stdout] Vec::new(), [INFO] [stdout] None, [INFO] [stdout] )), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/ui/root.rs:784:9 [INFO] [stdout] | [INFO] [stdout] 784 | let mut app = CacocoApp::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] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/shared.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / if let (Some(vr), Some(pp)) = (viewport_rect, pointer_pos) { [INFO] [stdout] 58 | | if vr.contains(pp) { [INFO] [stdout] 59 | | return; [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 57 ~ if let (Some(vr), Some(pp)) = (viewport_rect, pointer_pos) [INFO] [stdout] 58 ~ && vr.contains(pp) { [INFO] [stdout] 59 | return; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/shared.rs:341:5 [INFO] [stdout] | [INFO] [stdout] 341 | / if let Some(source_idx) = egui::DragAndDrop::payload::(ui.ctx()) { [INFO] [stdout] 342 | | if *source_idx != i { [INFO] [stdout] 343 | | if let Some(target_idx) = handle_list_drag_zone(ui, rect, i, count) { [INFO] [stdout] 344 | | return Some((*source_idx, target_idx)); [INFO] [stdout] ... | [INFO] [stdout] 347 | | } [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] 341 ~ if let Some(source_idx) = egui::DragAndDrop::payload::(ui.ctx()) [INFO] [stdout] 342 ~ && *source_idx != i { [INFO] [stdout] 343 | if let Some(target_idx) = handle_list_drag_zone(ui, rect, i, count) { [INFO] [stdout] 344 | return Some((*source_idx, target_idx)); [INFO] [stdout] 345 | } [INFO] [stdout] 346 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/shared.rs:342:9 [INFO] [stdout] | [INFO] [stdout] 342 | / if *source_idx != i { [INFO] [stdout] 343 | | if let Some(target_idx) = handle_list_drag_zone(ui, rect, i, count) { [INFO] [stdout] 344 | | return Some((*source_idx, target_idx)); [INFO] [stdout] 345 | | } [INFO] [stdout] 346 | | } [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] 342 ~ if *source_idx != i [INFO] [stdout] 343 ~ && let Some(target_idx) = handle_list_drag_zone(ui, rect, i, count) { [INFO] [stdout] 344 | return Some((*source_idx, target_idx)); [INFO] [stdout] 345 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/viewport.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | / pub fn draw_viewport( [INFO] [stdout] 17 | | ui: &mut egui::Ui, [INFO] [stdout] 18 | | project: &Option, [INFO] [stdout] 19 | | assets: &AssetStore, [INFO] [stdout] ... | [INFO] [stdout] 24 | | active_mode: &mut crate::app::ProjectMode, [INFO] [stdout] 25 | | ) -> Vec { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:267:25 [INFO] [stdout] | [INFO] [stdout] 267 | / if !already_exists { [INFO] [stdout] 268 | | if crate::ui::context_menu::ContextMenu::button(ui, lbl, true) { [INFO] [stdout] 269 | | ui.data_mut(|d| { [INFO] [stdout] 270 | | d.insert_temp(egui::Id::new("creation_modal_type"), target) [INFO] [stdout] ... | [INFO] [stdout] 274 | | } [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] 267 ~ if !already_exists [INFO] [stdout] 268 ~ && crate::ui::context_menu::ContextMenu::button(ui, lbl, true) { [INFO] [stdout] 269 | ui.data_mut(|d| { [INFO] [stdout] ... [INFO] [stdout] 272 | crate::ui::context_menu::ContextMenu::close(ui); [INFO] [stdout] 273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:319:21 [INFO] [stdout] | [INFO] [stdout] 319 | / if ui [INFO] [stdout] 320 | | .checkbox(&mut preview_state.sim.engine.auto_zoom, "Auto Fit") [INFO] [stdout] 321 | | .changed() [INFO] [stdout] ... | [INFO] [stdout] 326 | | } [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] 321 ~ .changed() [INFO] [stdout] 322 ~ && preview_state.sim.engine.auto_zoom { [INFO] [stdout] 323 | preview_state.sim.engine.pan_offset = egui::Vec2::ZERO; [INFO] [stdout] 324 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:436:9 [INFO] [stdout] | [INFO] [stdout] 436 | / if viewport_res.drag_started_by(egui::PointerButton::Middle) { [INFO] [stdout] 437 | | if let Some(pos) = ui.input(|i| i.pointer.hover_pos()) { [INFO] [stdout] 438 | | ui.ctx().data_mut(|d| d.insert_temp(middle_anchor_id, pos)); [INFO] [stdout] 439 | | } [INFO] [stdout] 440 | | } [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] 436 ~ if viewport_res.drag_started_by(egui::PointerButton::Middle) [INFO] [stdout] 437 ~ && let Some(pos) = ui.input(|i| i.pointer.hover_pos()) { [INFO] [stdout] 438 | ui.ctx().data_mut(|d| d.insert_temp(middle_anchor_id, pos)); [INFO] [stdout] 439 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:443:13 [INFO] [stdout] | [INFO] [stdout] 443 | / if let Some(anchor) = ui [INFO] [stdout] 444 | | .ctx() [INFO] [stdout] 445 | | .data(|d| d.get_temp::(middle_anchor_id)) [INFO] [stdout] ... | [INFO] [stdout] 462 | | } [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] 445 ~ .data(|d| d.get_temp::(middle_anchor_id)) [INFO] [stdout] 446 ~ && let Some(pos) = ui.input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 447 | let delta = pos - anchor; [INFO] [stdout] ... [INFO] [stdout] 459 | ui.ctx().set_cursor_icon(egui::CursorIcon::AllScroll); [INFO] [stdout] 460 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/ui/viewport.rs:470:1 [INFO] [stdout] | [INFO] [stdout] 470 | / fn handle_asset_drop( [INFO] [stdout] 471 | | ui: &mut egui::Ui, [INFO] [stdout] 472 | | viewport_res: &egui::Response, [INFO] [stdout] 473 | | project: &Option, [INFO] [stdout] ... | [INFO] [stdout] 479 | | controller: &ViewportController, [INFO] [stdout] 480 | | ) -> Vec { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:483:5 [INFO] [stdout] | [INFO] [stdout] 483 | / if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) { [INFO] [stdout] 484 | | if viewport_res.contains_pointer() { [INFO] [stdout] 485 | | ui.ctx().set_cursor_icon(egui::CursorIcon::None); [INFO] [stdout] 486 | | if let Some(ProjectData::StatusBar(sbar)) = project { [INFO] [stdout] ... | [INFO] [stdout] 544 | | } [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] 483 ~ if let Some(asset_keys) = egui::DragAndDrop::payload::>(ui.ctx()) [INFO] [stdout] 484 ~ && viewport_res.contains_pointer() { [INFO] [stdout] 485 | ui.ctx().set_cursor_icon(egui::CursorIcon::None); [INFO] [stdout] ... [INFO] [stdout] 542 | } [INFO] [stdout] 543 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/viewport.rs:486:13 [INFO] [stdout] | [INFO] [stdout] 486 | / if let Some(ProjectData::StatusBar(sbar)) = project { [INFO] [stdout] 487 | | if let Some(pos) = ui.input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 488 | | let bar_idx = [INFO] [stdout] 489 | | current_bar_idx.min(sbar.data.status_bars.len().saturating_sub(1)); [INFO] [stdout] ... | [INFO] [stdout] 542 | | } [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] 486 ~ if let Some(ProjectData::StatusBar(sbar)) = project [INFO] [stdout] 487 ~ && let Some(pos) = ui.input(|i| i.pointer.latest_pos()) { [INFO] [stdout] 488 | let bar_idx = [INFO] [stdout] ... [INFO] [stdout] 540 | } [INFO] [stdout] 541 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/viewport_controller.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn handle_selection_drag( [INFO] [stdout] 27 | | &mut self, [INFO] [stdout] 28 | | ui: &egui::Ui, [INFO] [stdout] 29 | | proj: &ViewportProjection, [INFO] [stdout] ... | [INFO] [stdout] 34 | | state: &mut crate::state::PreviewState, [INFO] [stdout] 35 | | ) -> Vec { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wad/umapinfo.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / if let Some(sky_file) = sky_lump { [INFO] [stdout] 13 | | if let Some(first_sky_entry) = sky_file.data.skies.first() { [INFO] [stdout] 14 | | let mut output = String::new(); [INFO] [stdout] 15 | | output.push_str("map MAP01\n{\n"); [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [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] 12 ~ if let Some(sky_file) = sky_lump [INFO] [stdout] 13 ~ && let Some(first_sky_entry) = sky_file.data.skies.first() { [INFO] [stdout] 14 | let mut output = String::new(); [INFO] [stdout] ... [INFO] [stdout] 21 | return output; [INFO] [stdout] 22 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wad/mod.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | / if managed_names.iter().any(|&m| m.eq_ignore_ascii_case(&name)) { [INFO] [stdout] 74 | | if let Some(parsed) = ProjectData::parse_lump(&name, &lump_data) { [INFO] [stdout] 75 | | lumps.push(parsed); [INFO] [stdout] 76 | | } [INFO] [stdout] 77 | | } [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] 73 ~ if managed_names.iter().any(|&m| m.eq_ignore_ascii_case(&name)) [INFO] [stdout] 74 ~ && let Some(parsed) = ProjectData::parse_lump(&name, &lump_data) { [INFO] [stdout] 75 | lumps.push(parsed); [INFO] [stdout] 76 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 16s [INFO] running `Command { std: "docker" "inspect" "18e776463e637f9aa122edc526527a2e85959af1bfd7e1425e82de77e547fb78", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "18e776463e637f9aa122edc526527a2e85959af1bfd7e1425e82de77e547fb78", kill_on_drop: false }` [INFO] [stdout] 18e776463e637f9aa122edc526527a2e85959af1bfd7e1425e82de77e547fb78