[INFO] cloning repository https://github.com/Aqu1tain/summit [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Aqu1tain/summit" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAqu1tain%2Fsummit", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAqu1tain%2Fsummit'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 685ce35c9d6bbe379ab52f35888349217165cd46 [INFO] linting Aqu1tain/summit against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAqu1tain%2Fsummit" "/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/Aqu1tain/summit [INFO] finished tweaking git repo https://github.com/Aqu1tain/summit [INFO] tweaked toml for git repo https://github.com/Aqu1tain/summit written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Aqu1tain/summit 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/Aqu1tain/summit already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating git repository `https://github.com/Aqu1tain/cairn.git` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cairo-sys-rs v0.18.2 [INFO] [stderr] Downloaded gdk-pixbuf-sys v0.18.0 [INFO] [stderr] Downloaded glutin_gles2_sys v0.1.5 [INFO] [stderr] Downloaded glutin_glx_sys v0.1.8 [INFO] [stderr] Downloaded emath v0.19.0 [INFO] [stderr] Downloaded ndk-glue v0.6.2 [INFO] [stderr] Downloaded egui-winit v0.19.0 [INFO] [stderr] Downloaded glutin_wgl_sys v0.1.5 [INFO] [stderr] Downloaded webbrowser v0.7.1 [INFO] [stderr] Downloaded egui_glow v0.19.0 [INFO] [stderr] Downloaded eframe v0.19.0 [INFO] [stderr] Downloaded arboard v2.1.1 [INFO] [stderr] Downloaded gio-sys v0.18.1 [INFO] [stderr] Downloaded gtk-sys v0.18.2 [INFO] [stderr] Downloaded glutin v0.29.1 [INFO] [stderr] Downloaded rfd v0.13.0 [INFO] [stderr] Downloaded atk-sys v0.18.2 [INFO] [stderr] Downloaded gdk-sys v0.18.2 [INFO] [stderr] Downloaded dwrote v0.11.3 [INFO] [stderr] Downloaded nix v0.22.3 [INFO] [stderr] Downloaded egui v0.19.0 [INFO] [stderr] Downloaded glib-sys v0.18.1 [INFO] [stderr] Downloaded gobject-sys v0.18.0 [INFO] [stderr] Downloaded pango-sys v0.18.0 [INFO] [stderr] Downloaded glutin_egl_sys v0.1.6 [INFO] [stderr] Downloaded wayland-egl v0.29.5 [INFO] [stderr] Downloaded x11rb v0.9.0 [INFO] [stderr] Downloaded epaint v0.19.0 [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] 4cd10498f1638a01c618996555d36e7c897e52b7c48a3741911232431f8d89e9 [INFO] running `Command { std: "docker" "start" "-a" "4cd10498f1638a01c618996555d36e7c897e52b7c48a3741911232431f8d89e9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4cd10498f1638a01c618996555d36e7c897e52b7c48a3741911232431f8d89e9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4cd10498f1638a01c618996555d36e7c897e52b7c48a3741911232431f8d89e9", kill_on_drop: false }` [INFO] [stdout] 4cd10498f1638a01c618996555d36e7c897e52b7c48a3741911232431f8d89e9 [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] a2683e3d965a6377b436234b9a2178d023b1f4a7a2402082658694ee1cfd292a [INFO] running `Command { std: "docker" "start" "-a" "a2683e3d965a6377b436234b9a2178d023b1f4a7a2402082658694ee1cfd292a", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Compiling hashbrown v0.15.2 [INFO] [stderr] Compiling target-lexicon v0.12.16 [INFO] [stderr] Compiling winnow v0.7.6 [INFO] [stderr] Compiling smallvec v1.15.0 [INFO] [stderr] Compiling version-compare v0.2.0 [INFO] [stderr] Compiling xml-rs v0.8.26 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Compiling cc v1.2.19 [INFO] [stderr] Compiling wayland-sys v0.29.5 [INFO] [stderr] Checking libloading v0.8.6 [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Compiling serde_spanned v0.6.8 [INFO] [stderr] Compiling toml_datetime v0.6.8 [INFO] [stderr] Checking adler2 v2.0.0 [INFO] [stderr] Checking miniz_oxide v0.8.8 [INFO] [stderr] Checking scoped-tls v1.0.1 [INFO] [stderr] Checking downcast-rs v1.2.1 [INFO] [stderr] Compiling slotmap v1.0.7 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Compiling khronos_api v3.1.0 [INFO] [stderr] Compiling icu_locid_transform_data v1.5.1 [INFO] [stderr] Checking writeable v0.5.5 [INFO] [stderr] Checking litemap v0.7.5 [INFO] [stderr] Compiling smithay-client-toolkit v0.16.1 [INFO] [stderr] Checking xcursor v0.3.8 [INFO] [stderr] Compiling icu_properties_data v1.5.1 [INFO] [stderr] Checking vec_map v0.8.2 [INFO] [stderr] Compiling servo-fontconfig-sys v5.1.0 [INFO] [stderr] Compiling icu_normalizer_data v1.5.1 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Compiling x11-dl v2.21.0 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.8 [INFO] [stderr] Compiling crossfont v0.5.2 [INFO] [stderr] Checking utf16_iter v1.0.5 [INFO] [stderr] Checking write16 v1.0.0 [INFO] [stderr] Compiling cfg-expr v0.15.8 [INFO] [stderr] Checking foreign-types-shared v0.3.1 [INFO] [stderr] Checking raw-window-handle v0.5.2 [INFO] [stderr] Checking arrayvec v0.5.2 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Compiling zerocopy v0.8.24 [INFO] [stderr] Compiling getrandom v0.3.2 [INFO] [stderr] Checking nohash-hasher v0.2.0 [INFO] [stderr] Checking cty v0.2.2 [INFO] [stderr] Checking raw-window-handle v0.4.3 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Checking strict-num v0.1.1 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Compiling indexmap v2.9.0 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking flate2 v1.1.1 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling cfg_aliases v0.1.1 [INFO] [stderr] Checking weezl v0.1.8 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Compiling wayland-scanner v0.29.5 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Compiling cmake v0.1.54 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking libloading v0.7.4 [INFO] [stderr] Checking half v2.6.0 [INFO] [stderr] Checking lebe v0.5.2 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking bit_field v0.10.2 [INFO] [stderr] Compiling rfd v0.13.0 [INFO] [stderr] Checking glow v0.11.2 [INFO] [stderr] Checking gif v0.13.1 [INFO] [stderr] Checking exr v1.73.0 [INFO] [stderr] Checking quick-xml v0.31.0 [INFO] [stderr] Compiling glutin_glx_sys v0.1.8 [INFO] [stderr] Compiling freetype-sys v0.13.1 [INFO] [stderr] Compiling expat-sys v2.1.6 [INFO] [stderr] Compiling glutin_egl_sys v0.1.6 [INFO] [stderr] Compiling wayland-client v0.29.5 [INFO] [stderr] Compiling wayland-protocols v0.29.5 [INFO] [stderr] Compiling winit v0.28.7 [INFO] [stderr] Compiling toml_edit v0.22.24 [INFO] [stderr] Checking nix v0.24.3 [INFO] [stderr] Checking nix v0.25.1 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking memmap2 v0.5.10 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking freetype-rs v0.26.0 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking servo-fontconfig v0.5.1 [INFO] [stderr] Checking owned_ttf_parser v0.25.0 [INFO] [stderr] Checking ahash v0.8.11 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking nix v0.22.3 [INFO] [stderr] Checking ab_glyph v0.2.29 [INFO] [stderr] Checking gethostname v0.2.3 [INFO] [stderr] Checking shared_library v0.1.9 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking dirs-sys v0.3.7 [INFO] [stderr] Checking osmesa-sys v0.1.2 [INFO] [stderr] Checking is-terminal v0.4.16 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking dirs v4.0.0 [INFO] [stderr] Checking shellexpand v2.1.2 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking jpeg-decoder v0.3.1 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking env_logger v0.10.2 [INFO] [stderr] Checking tiff v0.9.1 [INFO] [stderr] Checking wayland-commons v0.29.5 [INFO] [stderr] Checking x11rb v0.9.0 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Compiling toml v0.8.20 [INFO] [stderr] Compiling bytemuck_derive v1.9.3 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling foreign-types-macros v0.2.3 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling system-deps v6.2.2 [INFO] [stderr] Checking wayland-cursor v0.29.5 [INFO] [stderr] Checking wayland-egl v0.29.5 [INFO] [stderr] Checking foreign-types v0.5.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking yoke v0.7.5 [INFO] [stderr] Checking calloop v0.10.6 [INFO] [stderr] Compiling glib-sys v0.18.1 [INFO] [stderr] Compiling gobject-sys v0.18.0 [INFO] [stderr] Compiling atk-sys v0.18.2 [INFO] [stderr] Compiling gdk-sys v0.18.2 [INFO] [stderr] Compiling gio-sys v0.18.1 [INFO] [stderr] Compiling gdk-pixbuf-sys v0.18.0 [INFO] [stderr] Compiling cairo-sys-rs v0.18.2 [INFO] [stderr] Compiling pango-sys v0.18.0 [INFO] [stderr] Compiling gtk-sys v0.18.2 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking bytemuck v1.22.0 [INFO] [stderr] Checking safe_arch v0.5.2 [INFO] [stderr] Checking tiny-skia-path v0.7.0 [INFO] [stderr] Checking emath v0.19.0 [INFO] [stderr] Checking tiny-skia-path v0.8.4 [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking epaint v0.19.0 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Checking tiny-skia v0.8.4 [INFO] [stderr] Checking tiny-skia v0.7.0 [INFO] [stderr] Checking egui v0.19.0 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking egui_glow v0.19.0 [INFO] [stderr] Checking arboard v2.1.1 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking cairn v0.1.0 (https://github.com/Aqu1tain/cairn.git#51460afc) [INFO] [stderr] Checking webbrowser v0.7.1 [INFO] [stderr] Checking sctk-adwaita v0.4.3 [INFO] [stderr] Checking smithay-clipboard v0.6.6 [INFO] [stderr] Checking sctk-adwaita v0.5.4 [INFO] [stderr] Checking winit v0.27.5 [INFO] [stderr] Checking egui-winit v0.19.0 [INFO] [stderr] Checking glutin v0.29.1 [INFO] [stderr] Checking eframe v0.19.0 [INFO] [stderr] Checking summit v0.1.0-dev (/opt/rustwide/workdir) [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/data/celeste_atlas.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | let mut atlas_base = celeste_dir.to_path_buf(); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/data/celeste_atlas.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | let mut atlas_base = celeste_dir.to_path_buf(); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `levels` [INFO] [stdout] --> src/app/mod.rs:173:38 [INFO] [stdout] | [INFO] [stdout] 173 | ... for i in 0..max_levels_to_print { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 173 - for i in 0..max_levels_to_print { [INFO] [stdout] 173 + for (i, ) in levels.iter().enumerate().take(max_levels_to_print) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `levels` [INFO] [stdout] --> src/app/mod.rs:173:38 [INFO] [stdout] | [INFO] [stdout] 173 | ... for i in 0..max_levels_to_print { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 173 - for i in 0..max_levels_to_print { [INFO] [stdout] 173 + for (i, ) in levels.iter().enumerate().take(max_levels_to_print) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CelesteAssets` [INFO] [stdout] --> src/data/assets.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / pub fn new() -> Self { [INFO] [stdout] 40 | | let detected = Self::detect_celeste_dir(); [INFO] [stdout] 41 | | Self { [INFO] [stdout] 42 | | celeste_dir: detected, [INFO] [stdout] 43 | | } [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 10 + impl Default for CelesteAssets { [INFO] [stdout] 11 + fn default() -> Self { [INFO] [stdout] 12 + Self::new() [INFO] [stdout] 13 + } [INFO] [stdout] 14 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `SeekFrom::Current` to start from current position [INFO] [stdout] --> src/data/binary_reader.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | self.reader.seek(SeekFrom::Current(0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.reader.stream_position()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current [INFO] [stdout] = note: `#[warn(clippy::seek_from_current)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CelesteAssets` [INFO] [stdout] --> src/data/assets.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / pub fn new() -> Self { [INFO] [stdout] 40 | | let detected = Self::detect_celeste_dir(); [INFO] [stdout] 41 | | Self { [INFO] [stdout] 42 | | celeste_dir: detected, [INFO] [stdout] 43 | | } [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 10 + impl Default for CelesteAssets { [INFO] [stdout] 11 + fn default() -> Self { [INFO] [stdout] 12 + Self::new() [INFO] [stdout] 13 + } [INFO] [stdout] 14 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `SeekFrom::Current` to start from current position [INFO] [stdout] --> src/data/binary_reader.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | self.reader.seek(SeekFrom::Current(0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.reader.stream_position()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current [INFO] [stdout] = note: `#[warn(clippy::seek_from_current)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:360:24 [INFO] [stdout] | [INFO] [stdout] 360 | if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(oob || is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is only used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:306:20 [INFO] [stdout] | [INFO] [stdout] 306 | for row in 0..3 { [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] 306 - for row in 0..3 { [INFO] [stdout] 306 + for in neighborhood.iter().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is only used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:307:24 [INFO] [stdout] | [INFO] [stdout] 307 | for col in 0..3 { [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] 307 - for col in 0..3 { [INFO] [stdout] 307 + for in neighborhood.iter().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | for row in 0..3 { [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] 327 - for row in 0..3 { [INFO] [stdout] 327 + for (row, ) in neighborhood.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:328:24 [INFO] [stdout] | [INFO] [stdout] 328 | for col in 0..3 { [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] 328 - for col in 0..3 { [INFO] [stdout] 328 + for (col, ) in neighborhood.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/data/tile_xml.rs:354:21 [INFO] [stdout] | [INFO] [stdout] 354 | / if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [INFO] [stdout] 355 | | return false; [INFO] [stdout] 356 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 352 ~ '0' [INFO] [stdout] 353 | // Must be empty [INFO] [stdout] 354 ~ if ((is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob) => { [INFO] [stdout] 355 | return false; [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/data/tile_xml.rs:360:21 [INFO] [stdout] | [INFO] [stdout] 360 | / if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] 361 | | return false; [INFO] [stdout] 362 | | } [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] 358 ~ '1' [INFO] [stdout] 359 | // Must be solid [INFO] [stdout] 360 ~ if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob => { [INFO] [stdout] 361 | return false; [INFO] [stdout] 362 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:360:24 [INFO] [stdout] | [INFO] [stdout] 360 | if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(oob || is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is only used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:306:20 [INFO] [stdout] | [INFO] [stdout] 306 | for row in 0..3 { [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] 306 - for row in 0..3 { [INFO] [stdout] 306 + for in neighborhood.iter().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is only used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:307:24 [INFO] [stdout] | [INFO] [stdout] 307 | for col in 0..3 { [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] 307 - for col in 0..3 { [INFO] [stdout] 307 + for in neighborhood.iter().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | for row in 0..3 { [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] 327 - for row in 0..3 { [INFO] [stdout] 327 + for (row, ) in neighborhood.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:328:24 [INFO] [stdout] | [INFO] [stdout] 328 | for col in 0..3 { [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] 328 - for col in 0..3 { [INFO] [stdout] 328 + for (col, ) in neighborhood.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:354:43 [INFO] [stdout] | [INFO] [stdout] 354 | if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 354 - if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [INFO] [stdout] 354 + if (is_solid(tile) && ignores.is_none_or(|ign| !ign.contains(tile))) || oob { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:360:44 [INFO] [stdout] | [INFO] [stdout] 360 | if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 360 - if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] 360 + if !(is_solid(tile) && ignores.is_none_or(|ign| !ign.contains(tile))) && !oob { [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/data/tile_xml.rs:375:33 [INFO] [stdout] | [INFO] [stdout] 375 | pub fn get_neighborhood(solids: &Vec>, x: usize, y: usize) -> [[char; 3]; 3] { [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] 375 - pub fn get_neighborhood(solids: &Vec>, x: usize, y: usize) -> [[char; 3]; 3] { [INFO] [stdout] 375 + pub fn get_neighborhood(solids: &[Vec], x: usize, y: usize) -> [[char; 3]; 3] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/data/tile_xml.rs:354:21 [INFO] [stdout] | [INFO] [stdout] 354 | / if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [INFO] [stdout] 355 | | return false; [INFO] [stdout] 356 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 352 ~ '0' [INFO] [stdout] 353 | // Must be empty [INFO] [stdout] 354 ~ if ((is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob) => { [INFO] [stdout] 355 | return false; [INFO] [stdout] 356 ~ } [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/data/tile_xml.rs:400:31 [INFO] [stdout] | [INFO] [stdout] 400 | fn has_orthogonal_air(solids: &Vec>, x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [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] 400 - fn has_orthogonal_air(solids: &Vec>, x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [INFO] [stdout] 400 + fn has_orthogonal_air(solids: &[Vec], x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/data/tile_xml.rs:360:21 [INFO] [stdout] | [INFO] [stdout] 360 | / if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] 361 | | return false; [INFO] [stdout] 362 | | } [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] 358 ~ '1' [INFO] [stdout] 359 | // Must be solid [INFO] [stdout] 360 ~ if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob => { [INFO] [stdout] 361 | return false; [INFO] [stdout] 362 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:354:43 [INFO] [stdout] | [INFO] [stdout] 354 | if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 354 - if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [INFO] [stdout] 354 + if (is_solid(tile) && ignores.is_none_or(|ign| !ign.contains(tile))) || oob { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:360:44 [INFO] [stdout] | [INFO] [stdout] 360 | if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 360 - if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] 360 + if !(is_solid(tile) && ignores.is_none_or(|ign| !ign.contains(tile))) && !oob { [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/data/tile_xml.rs:375:33 [INFO] [stdout] | [INFO] [stdout] 375 | pub fn get_neighborhood(solids: &Vec>, x: usize, y: usize) -> [[char; 3]; 3] { [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] 375 - pub fn get_neighborhood(solids: &Vec>, x: usize, y: usize) -> [[char; 3]; 3] { [INFO] [stdout] 375 + pub fn get_neighborhood(solids: &[Vec], x: usize, y: usize) -> [[char; 3]; 3] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:431:9 [INFO] [stdout] | [INFO] [stdout] 431 | / if rule.mask != "padding" && rule.mask != "center" { [INFO] [stdout] 432 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | | if !rule.tiles.is_empty() { [INFO] [stdout] 434 | | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] ... | [INFO] [stdout] 438 | | } [INFO] [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] 431 ~ if rule.mask != "padding" && rule.mask != "center" [INFO] [stdout] 432 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | if !rule.tiles.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 436 | } [INFO] [stdout] 437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:432:13 [INFO] [stdout] | [INFO] [stdout] 432 | / if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | | if !rule.tiles.is_empty() { [INFO] [stdout] 434 | | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] 435 | | return Some(rule.tiles[idx]); [INFO] [stdout] 436 | | } [INFO] [stdout] 437 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 432 ~ if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) [INFO] [stdout] 433 ~ && !rule.tiles.is_empty() { [INFO] [stdout] 434 | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] 435 | return Some(rule.tiles[idx]); [INFO] [stdout] 436 ~ } [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/data/tile_xml.rs:400:31 [INFO] [stdout] | [INFO] [stdout] 400 | fn has_orthogonal_air(solids: &Vec>, x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [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] 400 - fn has_orthogonal_air(solids: &Vec>, x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [INFO] [stdout] 400 + fn has_orthogonal_air(solids: &[Vec], x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:443:9 [INFO] [stdout] | [INFO] [stdout] 443 | / if rule.mask == "padding" { [INFO] [stdout] 444 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) && has_orthogonal_air(solids, x, y, is_solid) { [INFO] [stdout] 445 | | padding_rule = Some(rule); [INFO] [stdout] 446 | | break; [INFO] [stdout] 447 | | } [INFO] [stdout] 448 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 443 ~ if rule.mask == "padding" [INFO] [stdout] 444 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) && has_orthogonal_air(solids, x, y, is_solid) { [INFO] [stdout] 445 | padding_rule = Some(rule); [INFO] [stdout] 446 | break; [INFO] [stdout] 447 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:459:9 [INFO] [stdout] | [INFO] [stdout] 459 | / if rule.mask == "center" { [INFO] [stdout] 460 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 461 | | center_rule = Some(rule); [INFO] [stdout] 462 | | break; [INFO] [stdout] 463 | | } [INFO] [stdout] 464 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 459 ~ if rule.mask == "center" [INFO] [stdout] 460 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 461 | center_rule = Some(rule); [INFO] [stdout] 462 | break; [INFO] [stdout] 463 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:431:9 [INFO] [stdout] | [INFO] [stdout] 431 | / if rule.mask != "padding" && rule.mask != "center" { [INFO] [stdout] 432 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | | if !rule.tiles.is_empty() { [INFO] [stdout] 434 | | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] ... | [INFO] [stdout] 438 | | } [INFO] [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] 431 ~ if rule.mask != "padding" && rule.mask != "center" [INFO] [stdout] 432 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | if !rule.tiles.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 436 | } [INFO] [stdout] 437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:432:13 [INFO] [stdout] | [INFO] [stdout] 432 | / if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | | if !rule.tiles.is_empty() { [INFO] [stdout] 434 | | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] 435 | | return Some(rule.tiles[idx]); [INFO] [stdout] 436 | | } [INFO] [stdout] 437 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 432 ~ if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) [INFO] [stdout] 433 ~ && !rule.tiles.is_empty() { [INFO] [stdout] 434 | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] 435 | return Some(rule.tiles[idx]); [INFO] [stdout] 436 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:443:9 [INFO] [stdout] | [INFO] [stdout] 443 | / if rule.mask == "padding" { [INFO] [stdout] 444 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) && has_orthogonal_air(solids, x, y, is_solid) { [INFO] [stdout] 445 | | padding_rule = Some(rule); [INFO] [stdout] 446 | | break; [INFO] [stdout] 447 | | } [INFO] [stdout] 448 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 443 ~ if rule.mask == "padding" [INFO] [stdout] 444 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) && has_orthogonal_air(solids, x, y, is_solid) { [INFO] [stdout] 445 | padding_rule = Some(rule); [INFO] [stdout] 446 | break; [INFO] [stdout] 447 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:459:9 [INFO] [stdout] | [INFO] [stdout] 459 | / if rule.mask == "center" { [INFO] [stdout] 460 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 461 | | center_rule = Some(rule); [INFO] [stdout] 462 | | break; [INFO] [stdout] 463 | | } [INFO] [stdout] 464 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 459 ~ if rule.mask == "center" [INFO] [stdout] 460 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 461 | center_rule = Some(rule); [INFO] [stdout] 462 | break; [INFO] [stdout] 463 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/data/xnb_reader.rs:177:21 [INFO] [stdout] | [INFO] [stdout] 177 | let width = self.reader.read_ulong()? as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.reader.read_ulong()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/data/xnb_reader.rs:178:22 [INFO] [stdout] | [INFO] [stdout] 178 | let height = self.reader.read_ulong()? as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.reader.read_ulong()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/data/xnb_reader.rs:177:21 [INFO] [stdout] | [INFO] [stdout] 177 | let width = self.reader.read_ulong()? as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.reader.read_ulong()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/data/xnb_reader.rs:178:22 [INFO] [stdout] | [INFO] [stdout] 178 | let height = self.reader.read_ulong()? as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.reader.read_ulong()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AtlasManager` [INFO] [stdout] --> src/data/celeste_atlas.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / pub fn new() -> Self { [INFO] [stdout] 76 | | Self { [INFO] [stdout] 77 | | atlases: HashMap::new(), [INFO] [stdout] 78 | | texture_id_to_atlas: HashMap::new(), [INFO] [stdout] 79 | | } [INFO] [stdout] 80 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 74 + impl Default for AtlasManager { [INFO] [stdout] 75 + fn default() -> Self { [INFO] [stdout] 76 + Self::new() [INFO] [stdout] 77 + } [INFO] [stdout] 78 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AtlasManager` [INFO] [stdout] --> src/data/celeste_atlas.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / pub fn new() -> Self { [INFO] [stdout] 76 | | Self { [INFO] [stdout] 77 | | atlases: HashMap::new(), [INFO] [stdout] 78 | | texture_id_to_atlas: HashMap::new(), [INFO] [stdout] 79 | | } [INFO] [stdout] 80 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 74 + impl Default for AtlasManager { [INFO] [stdout] 75 + fn default() -> Self { [INFO] [stdout] 76 + Self::new() [INFO] [stdout] 77 + } [INFO] [stdout] 78 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:75:46 [INFO] [stdout] | [INFO] [stdout] 75 | if let Err(e) = File::create(&temp_json_path).and_then(|mut file| file.write_all(json_str.as_bytes())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `temp_json_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:83:35 [INFO] [stdout] | [INFO] [stdout] 83 | match json_to_bin(&temp_json_path, &bin_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `temp_json_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:83:52 [INFO] [stdout] | [INFO] [stdout] 83 | match json_to_bin(&temp_json_path, &bin_path) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `bin_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:75:46 [INFO] [stdout] | [INFO] [stdout] 75 | if let Err(e) = File::create(&temp_json_path).and_then(|mut file| file.write_all(json_str.as_bytes())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `temp_json_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:83:35 [INFO] [stdout] | [INFO] [stdout] 83 | match json_to_bin(&temp_json_path, &bin_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `temp_json_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:83:52 [INFO] [stdout] | [INFO] [stdout] 83 | match json_to_bin(&temp_json_path, &bin_path) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `bin_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `editor.celeste_assets.celeste_dir` after checking its variant with `is_none` [INFO] [stdout] --> src/ui/dialogs.rs:218:26 [INFO] [stdout] | [INFO] [stdout] 211 | if editor.celeste_assets.celeste_dir.is_none() { [INFO] [stdout] | ---------------------------------------------- help: try: `if let Some() = &editor.celeste_assets.celeste_dir` [INFO] [stdout] ... [INFO] [stdout] 218 | ui.label(editor.celeste_assets.celeste_dir.as_ref().unwrap().display().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `editor.celeste_assets.celeste_dir` after checking its variant with `is_none` [INFO] [stdout] --> src/ui/dialogs.rs:218:26 [INFO] [stdout] | [INFO] [stdout] 211 | if editor.celeste_assets.celeste_dir.is_none() { [INFO] [stdout] | ---------------------------------------------- help: try: `if let Some() = &editor.celeste_assets.celeste_dir` [INFO] [stdout] ... [INFO] [stdout] 218 | ui.label(editor.celeste_assets.celeste_dir.as_ref().unwrap().display().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ui/render.rs:128:56 [INFO] [stdout] | [INFO] [stdout] 128 | TileNeighbors::from_grid(&ld.solids, x, y, |c| is_solid_tile(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_solid_tile` [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/ui/render.rs:128:56 [INFO] [stdout] | [INFO] [stdout] 128 | TileNeighbors::from_grid(&ld.solids, x, y, |c| is_solid_tile(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_solid_tile` [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: this boolean expression can be simplified [INFO] [stdout] --> src/ui/render.rs:266:12 [INFO] [stdout] | [INFO] [stdout] 266 | if !(x + 1 < tiles[y].len() && !is_air_or_empty(tiles[y][x+1])) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x + 1 >= tiles[y].len() || is_air_or_empty(tiles[y][x+1])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ui/render.rs:266:12 [INFO] [stdout] | [INFO] [stdout] 266 | if !(x + 1 < tiles[y].len() && !is_air_or_empty(tiles[y][x+1])) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x + 1 >= tiles[y].len() || is_air_or_empty(tiles[y][x+1])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/ui/render.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | / fn render_any_tile( [INFO] [stdout] 144 | | painter: &egui::Painter, [INFO] [stdout] 145 | | ld: &LevelRenderData, [INFO] [stdout] 146 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 158 | | debug_tag: &str, [INFO] [stdout] 159 | | ) { [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 function has too many arguments (15/7) [INFO] [stdout] --> src/ui/render.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | / fn render_any_tile( [INFO] [stdout] 144 | | painter: &egui::Painter, [INFO] [stdout] 145 | | ld: &LevelRenderData, [INFO] [stdout] 146 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 158 | | debug_tag: &str, [INFO] [stdout] 159 | | ) { [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 function has too many arguments (8/7) [INFO] [stdout] --> src/ui/render.rs:273:1 [INFO] [stdout] | [INFO] [stdout] 273 | / fn render_tile( [INFO] [stdout] 274 | | painter: &egui::Painter, [INFO] [stdout] 275 | | ld: &LevelRenderData, [INFO] [stdout] 276 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 281 | | visible: bool, [INFO] [stdout] 282 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:304:1 [INFO] [stdout] | [INFO] [stdout] 304 | / fn render_bg_tile( [INFO] [stdout] 305 | | painter: &egui::Painter, [INFO] [stdout] 306 | | ld: &LevelRenderData, [INFO] [stdout] 307 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 312 | | visible: bool, [INFO] [stdout] 313 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:335:1 [INFO] [stdout] | [INFO] [stdout] 335 | / fn render_decals( [INFO] [stdout] 336 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 337 | | painter: &egui::Painter, [INFO] [stdout] 338 | | level: &serde_json::Value, [INFO] [stdout] ... | [INFO] [stdout] 343 | | filter_fn: &dyn Fn(&serde_json::Value) -> bool, [INFO] [stdout] 344 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:273:1 [INFO] [stdout] | [INFO] [stdout] 273 | / fn render_tile( [INFO] [stdout] 274 | | painter: &egui::Painter, [INFO] [stdout] 275 | | ld: &LevelRenderData, [INFO] [stdout] 276 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 281 | | visible: bool, [INFO] [stdout] 282 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:304:1 [INFO] [stdout] | [INFO] [stdout] 304 | / fn render_bg_tile( [INFO] [stdout] 305 | | painter: &egui::Painter, [INFO] [stdout] 306 | | ld: &LevelRenderData, [INFO] [stdout] 307 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 312 | | visible: bool, [INFO] [stdout] 313 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:335:1 [INFO] [stdout] | [INFO] [stdout] 335 | / fn render_decals( [INFO] [stdout] 336 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 337 | | painter: &egui::Painter, [INFO] [stdout] 338 | | level: &serde_json::Value, [INFO] [stdout] ... | [INFO] [stdout] 343 | | filter_fn: &dyn Fn(&serde_json::Value) -> bool, [INFO] [stdout] 344 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:498:5 [INFO] [stdout] | [INFO] [stdout] 498 | / fn render( [INFO] [stdout] 499 | | &self, [INFO] [stdout] 500 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 501 | | painter: &egui::Painter, [INFO] [stdout] ... | [INFO] [stdout] 506 | | ctx: &egui::Context, [INFO] [stdout] 507 | | ); [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:498:5 [INFO] [stdout] | [INFO] [stdout] 498 | / fn render( [INFO] [stdout] 499 | | &self, [INFO] [stdout] 500 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 501 | | painter: &egui::Painter, [INFO] [stdout] ... | [INFO] [stdout] 506 | | ctx: &egui::Context, [INFO] [stdout] 507 | | ); [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: you should consider adding a `Default` implementation for `LayerRegistry` [INFO] [stdout] --> src/ui/render.rs:608:5 [INFO] [stdout] | [INFO] [stdout] 608 | / pub fn new() -> Self { [INFO] [stdout] 609 | | Self { [INFO] [stdout] 610 | | layers: vec![ [INFO] [stdout] 611 | | Box::new(BgTileLayer), [INFO] [stdout] ... | [INFO] [stdout] 617 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 607 + impl Default for LayerRegistry { [INFO] [stdout] 608 + fn default() -> Self { [INFO] [stdout] 609 + Self::new() [INFO] [stdout] 610 + } [INFO] [stdout] 611 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LayerRegistry` [INFO] [stdout] --> src/ui/render.rs:608:5 [INFO] [stdout] | [INFO] [stdout] 608 | / pub fn new() -> Self { [INFO] [stdout] 609 | | Self { [INFO] [stdout] 610 | | layers: vec![ [INFO] [stdout] 611 | | Box::new(BgTileLayer), [INFO] [stdout] ... | [INFO] [stdout] 617 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 607 + impl Default for LayerRegistry { [INFO] [stdout] 608 + fn default() -> Self { [INFO] [stdout] 609 + Self::new() [INFO] [stdout] 610 + } [INFO] [stdout] 611 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/render.rs:618:5 [INFO] [stdout] | [INFO] [stdout] 618 | / pub fn render_all( [INFO] [stdout] 619 | | &self, [INFO] [stdout] 620 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 621 | | painter: &egui::Painter, [INFO] [stdout] ... | [INFO] [stdout] 626 | | ctx: &egui::Context, [INFO] [stdout] 627 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:618:5 [INFO] [stdout] | [INFO] [stdout] 618 | / pub fn render_all( [INFO] [stdout] 619 | | &self, [INFO] [stdout] 620 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 621 | | painter: &egui::Painter, [INFO] [stdout] ... | [INFO] [stdout] 626 | | ctx: &egui::Context, [INFO] [stdout] 627 | | ) { [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ui/tile_neighbors.rs:10:49 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn from_grid bool>(grid: &Vec>, x: usize, y: usize, is_filled: F) -> Self [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] 10 - pub fn from_grid bool>(grid: &Vec>, x: usize, y: usize, is_filled: F) -> Self [INFO] [stdout] 10 + pub fn from_grid bool>(grid: &[Vec], x: usize, y: usize, is_filled: F) -> Self [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/ui/tile_neighbors.rs:10:49 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn from_grid bool>(grid: &Vec>, x: usize, y: usize, is_filled: F) -> Self [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] 10 - pub fn from_grid bool>(grid: &Vec>, x: usize, y: usize, is_filled: F) -> Self [INFO] [stdout] 10 + pub fn from_grid bool>(grid: &[Vec], x: usize, y: usize, is_filled: F) -> Self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/tile_neighbors.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / if nx >= 0 && (nx as usize) < row.len() { [INFO] [stdout] 22 | | if is_filled(row[nx as usize]) { [INFO] [stdout] 23 | | mask |= 1 << i; [INFO] [stdout] 24 | | } [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 21 ~ if nx >= 0 && (nx as usize) < row.len() [INFO] [stdout] 22 ~ && is_filled(row[nx as usize]) { [INFO] [stdout] 23 | mask |= 1 << i; [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/tile_neighbors.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / if nx >= 0 && (nx as usize) < row.len() { [INFO] [stdout] 22 | | if is_filled(row[nx as usize]) { [INFO] [stdout] 23 | | mask |= 1 << i; [INFO] [stdout] 24 | | } [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 21 ~ if nx >= 0 && (nx as usize) < row.len() [INFO] [stdout] 22 ~ && is_filled(row[nx as usize]) { [INFO] [stdout] 23 | mask |= 1 << i; [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use eframe; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use eframe; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/data/celeste_atlas.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | let mut atlas_base = celeste_dir.to_path_buf(); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `levels` [INFO] [stdout] --> src/app/mod.rs:173:38 [INFO] [stdout] | [INFO] [stdout] 173 | ... for i in 0..max_levels_to_print { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 173 - for i in 0..max_levels_to_print { [INFO] [stdout] 173 + for (i, ) in levels.iter().enumerate().take(max_levels_to_print) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:75:46 [INFO] [stdout] | [INFO] [stdout] 75 | if let Err(e) = File::create(&temp_json_path).and_then(|mut file| file.write_all(json_str.as_bytes())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `temp_json_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:83:35 [INFO] [stdout] | [INFO] [stdout] 83 | match json_to_bin(&temp_json_path, &bin_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `temp_json_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:83:52 [INFO] [stdout] | [INFO] [stdout] 83 | match json_to_bin(&temp_json_path, &bin_path) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `bin_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `editor.celeste_assets.celeste_dir` after checking its variant with `is_none` [INFO] [stdout] --> src/ui/dialogs.rs:218:26 [INFO] [stdout] | [INFO] [stdout] 211 | if editor.celeste_assets.celeste_dir.is_none() { [INFO] [stdout] | ---------------------------------------------- help: try: `if let Some() = &editor.celeste_assets.celeste_dir` [INFO] [stdout] ... [INFO] [stdout] 218 | ui.label(editor.celeste_assets.celeste_dir.as_ref().unwrap().display().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ui/render.rs:128:56 [INFO] [stdout] | [INFO] [stdout] 128 | TileNeighbors::from_grid(&ld.solids, x, y, |c| is_solid_tile(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_solid_tile` [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: this boolean expression can be simplified [INFO] [stdout] --> src/ui/render.rs:266:12 [INFO] [stdout] | [INFO] [stdout] 266 | if !(x + 1 < tiles[y].len() && !is_air_or_empty(tiles[y][x+1])) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x + 1 >= tiles[y].len() || is_air_or_empty(tiles[y][x+1])` [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 function has too many arguments (15/7) [INFO] [stdout] --> src/ui/render.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | / fn render_any_tile( [INFO] [stdout] 144 | | painter: &egui::Painter, [INFO] [stdout] 145 | | ld: &LevelRenderData, [INFO] [stdout] 146 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 158 | | debug_tag: &str, [INFO] [stdout] 159 | | ) { [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: variable does not need to be mutable [INFO] [stdout] --> src/data/celeste_atlas.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | let mut atlas_base = celeste_dir.to_path_buf(); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/ui/render.rs:273:1 [INFO] [stdout] | [INFO] [stdout] 273 | / fn render_tile( [INFO] [stdout] 274 | | painter: &egui::Painter, [INFO] [stdout] 275 | | ld: &LevelRenderData, [INFO] [stdout] 276 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 281 | | visible: bool, [INFO] [stdout] 282 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:304:1 [INFO] [stdout] | [INFO] [stdout] 304 | / fn render_bg_tile( [INFO] [stdout] 305 | | painter: &egui::Painter, [INFO] [stdout] 306 | | ld: &LevelRenderData, [INFO] [stdout] 307 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 312 | | visible: bool, [INFO] [stdout] 313 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:335:1 [INFO] [stdout] | [INFO] [stdout] 335 | / fn render_decals( [INFO] [stdout] 336 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 337 | | painter: &egui::Painter, [INFO] [stdout] 338 | | level: &serde_json::Value, [INFO] [stdout] ... | [INFO] [stdout] 343 | | filter_fn: &dyn Fn(&serde_json::Value) -> bool, [INFO] [stdout] 344 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:498:5 [INFO] [stdout] | [INFO] [stdout] 498 | / fn render( [INFO] [stdout] 499 | | &self, [INFO] [stdout] 500 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 501 | | painter: &egui::Painter, [INFO] [stdout] ... | [INFO] [stdout] 506 | | ctx: &egui::Context, [INFO] [stdout] 507 | | ); [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:618:5 [INFO] [stdout] | [INFO] [stdout] 618 | / pub fn render_all( [INFO] [stdout] 619 | | &self, [INFO] [stdout] 620 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 621 | | painter: &egui::Painter, [INFO] [stdout] ... | [INFO] [stdout] 626 | | ctx: &egui::Context, [INFO] [stdout] 627 | | ) { [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ui/tile_neighbors.rs:10:49 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn from_grid bool>(grid: &Vec>, x: usize, y: usize, is_filled: F) -> Self [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] 10 - pub fn from_grid bool>(grid: &Vec>, x: usize, y: usize, is_filled: F) -> Self [INFO] [stdout] 10 + pub fn from_grid bool>(grid: &[Vec], x: usize, y: usize, is_filled: F) -> Self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/tile_neighbors.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / if nx >= 0 && (nx as usize) < row.len() { [INFO] [stdout] 22 | | if is_filled(row[nx as usize]) { [INFO] [stdout] 23 | | mask |= 1 << i; [INFO] [stdout] 24 | | } [INFO] [stdout] 25 | | } [INFO] [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] 21 ~ if nx >= 0 && (nx as usize) < row.len() [INFO] [stdout] 22 ~ && is_filled(row[nx as usize]) { [INFO] [stdout] 23 | mask |= 1 << i; [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `levels` [INFO] [stdout] --> src/app/mod.rs:173:38 [INFO] [stdout] | [INFO] [stdout] 173 | ... for i in 0..max_levels_to_print { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 173 - for i in 0..max_levels_to_print { [INFO] [stdout] 173 + for (i, ) in levels.iter().enumerate().take(max_levels_to_print) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `SeekFrom::Current` to start from current position [INFO] [stdout] --> src/data/binary_reader.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | self.reader.seek(SeekFrom::Current(0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.reader.stream_position()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current [INFO] [stdout] = note: `#[warn(clippy::seek_from_current)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:75:46 [INFO] [stdout] | [INFO] [stdout] 75 | if let Err(e) = File::create(&temp_json_path).and_then(|mut file| file.write_all(json_str.as_bytes())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `temp_json_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:83:35 [INFO] [stdout] | [INFO] [stdout] 83 | match json_to_bin(&temp_json_path, &bin_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `temp_json_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/map/loader.rs:83:52 [INFO] [stdout] | [INFO] [stdout] 83 | match json_to_bin(&temp_json_path, &bin_path) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `bin_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:360:24 [INFO] [stdout] | [INFO] [stdout] 360 | if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(oob || is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is only used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:306:20 [INFO] [stdout] | [INFO] [stdout] 306 | for row in 0..3 { [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] 306 - for row in 0..3 { [INFO] [stdout] 306 + for in neighborhood.iter().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is only used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:307:24 [INFO] [stdout] | [INFO] [stdout] 307 | for col in 0..3 { [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] 307 - for col in 0..3 { [INFO] [stdout] 307 + for in neighborhood.iter().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | for row in 0..3 { [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] 327 - for row in 0..3 { [INFO] [stdout] 327 + for (row, ) in neighborhood.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:328:24 [INFO] [stdout] | [INFO] [stdout] 328 | for col in 0..3 { [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] 328 - for col in 0..3 { [INFO] [stdout] 328 + for (col, ) in neighborhood.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/data/tile_xml.rs:354:21 [INFO] [stdout] | [INFO] [stdout] 354 | / if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [INFO] [stdout] 355 | | return false; [INFO] [stdout] 356 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 352 ~ '0' [INFO] [stdout] 353 | // Must be empty [INFO] [stdout] 354 ~ if ((is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob) => { [INFO] [stdout] 355 | return false; [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/data/tile_xml.rs:360:21 [INFO] [stdout] | [INFO] [stdout] 360 | / if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] 361 | | return false; [INFO] [stdout] 362 | | } [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] 358 ~ '1' [INFO] [stdout] 359 | // Must be solid [INFO] [stdout] 360 ~ if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob => { [INFO] [stdout] 361 | return false; [INFO] [stdout] 362 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:354:43 [INFO] [stdout] | [INFO] [stdout] 354 | if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 354 - if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [INFO] [stdout] 354 + if (is_solid(tile) && ignores.is_none_or(|ign| !ign.contains(tile))) || oob { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:360:44 [INFO] [stdout] | [INFO] [stdout] 360 | if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 360 - if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] 360 + if !(is_solid(tile) && ignores.is_none_or(|ign| !ign.contains(tile))) && !oob { [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/data/tile_xml.rs:375:33 [INFO] [stdout] | [INFO] [stdout] 375 | pub fn get_neighborhood(solids: &Vec>, x: usize, y: usize) -> [[char; 3]; 3] { [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] 375 - pub fn get_neighborhood(solids: &Vec>, x: usize, y: usize) -> [[char; 3]; 3] { [INFO] [stdout] 375 + pub fn get_neighborhood(solids: &[Vec], x: usize, y: usize) -> [[char; 3]; 3] { [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/data/tile_xml.rs:400:31 [INFO] [stdout] | [INFO] [stdout] 400 | fn has_orthogonal_air(solids: &Vec>, x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [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] 400 - fn has_orthogonal_air(solids: &Vec>, x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [INFO] [stdout] 400 + fn has_orthogonal_air(solids: &[Vec], x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:431:9 [INFO] [stdout] | [INFO] [stdout] 431 | / if rule.mask != "padding" && rule.mask != "center" { [INFO] [stdout] 432 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | | if !rule.tiles.is_empty() { [INFO] [stdout] 434 | | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] ... | [INFO] [stdout] 438 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 431 ~ if rule.mask != "padding" && rule.mask != "center" [INFO] [stdout] 432 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | if !rule.tiles.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 436 | } [INFO] [stdout] 437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:432:13 [INFO] [stdout] | [INFO] [stdout] 432 | / if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | | if !rule.tiles.is_empty() { [INFO] [stdout] 434 | | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] 435 | | return Some(rule.tiles[idx]); [INFO] [stdout] 436 | | } [INFO] [stdout] 437 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 432 ~ if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) [INFO] [stdout] 433 ~ && !rule.tiles.is_empty() { [INFO] [stdout] 434 | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] 435 | return Some(rule.tiles[idx]); [INFO] [stdout] 436 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `editor.celeste_assets.celeste_dir` after checking its variant with `is_none` [INFO] [stdout] --> src/ui/dialogs.rs:218:26 [INFO] [stdout] | [INFO] [stdout] 211 | if editor.celeste_assets.celeste_dir.is_none() { [INFO] [stdout] | ---------------------------------------------- help: try: `if let Some() = &editor.celeste_assets.celeste_dir` [INFO] [stdout] ... [INFO] [stdout] 218 | ui.label(editor.celeste_assets.celeste_dir.as_ref().unwrap().display().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:443:9 [INFO] [stdout] | [INFO] [stdout] 443 | / if rule.mask == "padding" { [INFO] [stdout] 444 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) && has_orthogonal_air(solids, x, y, is_solid) { [INFO] [stdout] 445 | | padding_rule = Some(rule); [INFO] [stdout] 446 | | break; [INFO] [stdout] 447 | | } [INFO] [stdout] 448 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 443 ~ if rule.mask == "padding" [INFO] [stdout] 444 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) && has_orthogonal_air(solids, x, y, is_solid) { [INFO] [stdout] 445 | padding_rule = Some(rule); [INFO] [stdout] 446 | break; [INFO] [stdout] 447 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:459:9 [INFO] [stdout] | [INFO] [stdout] 459 | / if rule.mask == "center" { [INFO] [stdout] 460 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 461 | | center_rule = Some(rule); [INFO] [stdout] 462 | | break; [INFO] [stdout] 463 | | } [INFO] [stdout] 464 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 459 ~ if rule.mask == "center" [INFO] [stdout] 460 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 461 | center_rule = Some(rule); [INFO] [stdout] 462 | break; [INFO] [stdout] 463 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/data/xnb_reader.rs:177:21 [INFO] [stdout] | [INFO] [stdout] 177 | let width = self.reader.read_ulong()? as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.reader.read_ulong()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/data/xnb_reader.rs:178:22 [INFO] [stdout] | [INFO] [stdout] 178 | let height = self.reader.read_ulong()? as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.reader.read_ulong()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ui/render.rs:128:56 [INFO] [stdout] | [INFO] [stdout] 128 | TileNeighbors::from_grid(&ld.solids, x, y, |c| is_solid_tile(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_solid_tile` [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: this boolean expression can be simplified [INFO] [stdout] --> src/ui/render.rs:266:12 [INFO] [stdout] | [INFO] [stdout] 266 | if !(x + 1 < tiles[y].len() && !is_air_or_empty(tiles[y][x+1])) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x + 1 >= tiles[y].len() || is_air_or_empty(tiles[y][x+1])` [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 function has too many arguments (15/7) [INFO] [stdout] --> src/ui/render.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | / fn render_any_tile( [INFO] [stdout] 144 | | painter: &egui::Painter, [INFO] [stdout] 145 | | ld: &LevelRenderData, [INFO] [stdout] 146 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 158 | | debug_tag: &str, [INFO] [stdout] 159 | | ) { [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 function has too many arguments (8/7) [INFO] [stdout] --> src/ui/render.rs:273:1 [INFO] [stdout] | [INFO] [stdout] 273 | / fn render_tile( [INFO] [stdout] 274 | | painter: &egui::Painter, [INFO] [stdout] 275 | | ld: &LevelRenderData, [INFO] [stdout] 276 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 281 | | visible: bool, [INFO] [stdout] 282 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:304:1 [INFO] [stdout] | [INFO] [stdout] 304 | / fn render_bg_tile( [INFO] [stdout] 305 | | painter: &egui::Painter, [INFO] [stdout] 306 | | ld: &LevelRenderData, [INFO] [stdout] 307 | | editor: &CelesteMapEditor, [INFO] [stdout] ... | [INFO] [stdout] 312 | | visible: bool, [INFO] [stdout] 313 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:335:1 [INFO] [stdout] | [INFO] [stdout] 335 | / fn render_decals( [INFO] [stdout] 336 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 337 | | painter: &egui::Painter, [INFO] [stdout] 338 | | level: &serde_json::Value, [INFO] [stdout] ... | [INFO] [stdout] 343 | | filter_fn: &dyn Fn(&serde_json::Value) -> bool, [INFO] [stdout] 344 | | ) { [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:498:5 [INFO] [stdout] | [INFO] [stdout] 498 | / fn render( [INFO] [stdout] 499 | | &self, [INFO] [stdout] 500 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 501 | | painter: &egui::Painter, [INFO] [stdout] ... | [INFO] [stdout] 506 | | ctx: &egui::Context, [INFO] [stdout] 507 | | ); [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 (8/7) [INFO] [stdout] --> src/ui/render.rs:618:5 [INFO] [stdout] | [INFO] [stdout] 618 | / pub fn render_all( [INFO] [stdout] 619 | | &self, [INFO] [stdout] 620 | | editor: &mut CelesteMapEditor, [INFO] [stdout] 621 | | painter: &egui::Painter, [INFO] [stdout] ... | [INFO] [stdout] 626 | | ctx: &egui::Context, [INFO] [stdout] 627 | | ) { [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ui/tile_neighbors.rs:10:49 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn from_grid bool>(grid: &Vec>, x: usize, y: usize, is_filled: F) -> Self [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] 10 - pub fn from_grid bool>(grid: &Vec>, x: usize, y: usize, is_filled: F) -> Self [INFO] [stdout] 10 + pub fn from_grid bool>(grid: &[Vec], x: usize, y: usize, is_filled: F) -> Self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/tile_neighbors.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / if nx >= 0 && (nx as usize) < row.len() { [INFO] [stdout] 22 | | if is_filled(row[nx as usize]) { [INFO] [stdout] 23 | | mask |= 1 << i; [INFO] [stdout] 24 | | } [INFO] [stdout] 25 | | } [INFO] [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] 21 ~ if nx >= 0 && (nx as usize) < row.len() [INFO] [stdout] 22 ~ && is_filled(row[nx as usize]) { [INFO] [stdout] 23 | mask |= 1 << i; [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `SeekFrom::Current` to start from current position [INFO] [stdout] --> src/data/binary_reader.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | self.reader.seek(SeekFrom::Current(0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.reader.stream_position()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current [INFO] [stdout] = note: `#[warn(clippy::seek_from_current)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:360:24 [INFO] [stdout] | [INFO] [stdout] 360 | if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(oob || is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is only used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:306:20 [INFO] [stdout] | [INFO] [stdout] 306 | for row in 0..3 { [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] 306 - for row in 0..3 { [INFO] [stdout] 306 + for in neighborhood.iter().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is only used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:307:24 [INFO] [stdout] | [INFO] [stdout] 307 | for col in 0..3 { [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] 307 - for col in 0..3 { [INFO] [stdout] 307 + for in neighborhood.iter().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | for row in 0..3 { [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] 327 - for row in 0..3 { [INFO] [stdout] 327 + for (row, ) in neighborhood.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is used to index `neighborhood` [INFO] [stdout] --> src/data/tile_xml.rs:328:24 [INFO] [stdout] | [INFO] [stdout] 328 | for col in 0..3 { [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] 328 - for col in 0..3 { [INFO] [stdout] 328 + for (col, ) in neighborhood.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/data/tile_xml.rs:354:21 [INFO] [stdout] | [INFO] [stdout] 354 | / if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [INFO] [stdout] 355 | | return false; [INFO] [stdout] 356 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 352 ~ '0' [INFO] [stdout] 353 | // Must be empty [INFO] [stdout] 354 ~ if ((is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob) => { [INFO] [stdout] 355 | return false; [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/data/tile_xml.rs:360:21 [INFO] [stdout] | [INFO] [stdout] 360 | / if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] 361 | | return false; [INFO] [stdout] 362 | | } [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] 358 ~ '1' [INFO] [stdout] 359 | // Must be solid [INFO] [stdout] 360 ~ if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob => { [INFO] [stdout] 361 | return false; [INFO] [stdout] 362 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:354:43 [INFO] [stdout] | [INFO] [stdout] 354 | if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 354 - if (is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) || oob { [INFO] [stdout] 354 + if (is_solid(tile) && ignores.is_none_or(|ign| !ign.contains(tile))) || oob { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/data/tile_xml.rs:360:44 [INFO] [stdout] | [INFO] [stdout] 360 | if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 360 - if !(is_solid(tile) && ignores.map_or(true, |ign| !ign.contains(tile))) && !oob { [INFO] [stdout] 360 + if !(is_solid(tile) && ignores.is_none_or(|ign| !ign.contains(tile))) && !oob { [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/data/tile_xml.rs:375:33 [INFO] [stdout] | [INFO] [stdout] 375 | pub fn get_neighborhood(solids: &Vec>, x: usize, y: usize) -> [[char; 3]; 3] { [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] 375 - pub fn get_neighborhood(solids: &Vec>, x: usize, y: usize) -> [[char; 3]; 3] { [INFO] [stdout] 375 + pub fn get_neighborhood(solids: &[Vec], x: usize, y: usize) -> [[char; 3]; 3] { [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/data/tile_xml.rs:400:31 [INFO] [stdout] | [INFO] [stdout] 400 | fn has_orthogonal_air(solids: &Vec>, x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [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] 400 - fn has_orthogonal_air(solids: &Vec>, x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [INFO] [stdout] 400 + fn has_orthogonal_air(solids: &[Vec], x: usize, y: usize, is_solid: &dyn Fn(char) -> bool) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:431:9 [INFO] [stdout] | [INFO] [stdout] 431 | / if rule.mask != "padding" && rule.mask != "center" { [INFO] [stdout] 432 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | | if !rule.tiles.is_empty() { [INFO] [stdout] 434 | | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] ... | [INFO] [stdout] 438 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 431 ~ if rule.mask != "padding" && rule.mask != "center" [INFO] [stdout] 432 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | if !rule.tiles.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 436 | } [INFO] [stdout] 437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:432:13 [INFO] [stdout] | [INFO] [stdout] 432 | / if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 433 | | if !rule.tiles.is_empty() { [INFO] [stdout] 434 | | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] 435 | | return Some(rule.tiles[idx]); [INFO] [stdout] 436 | | } [INFO] [stdout] 437 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 432 ~ if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) [INFO] [stdout] 433 ~ && !rule.tiles.is_empty() { [INFO] [stdout] 434 | let idx = ((x as u64 * 31 + y as u64 * 17) % rule.tiles.len() as u64) as usize; [INFO] [stdout] 435 | return Some(rule.tiles[idx]); [INFO] [stdout] 436 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:443:9 [INFO] [stdout] | [INFO] [stdout] 443 | / if rule.mask == "padding" { [INFO] [stdout] 444 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) && has_orthogonal_air(solids, x, y, is_solid) { [INFO] [stdout] 445 | | padding_rule = Some(rule); [INFO] [stdout] 446 | | break; [INFO] [stdout] 447 | | } [INFO] [stdout] 448 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 443 ~ if rule.mask == "padding" [INFO] [stdout] 444 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) && has_orthogonal_air(solids, x, y, is_solid) { [INFO] [stdout] 445 | padding_rule = Some(rule); [INFO] [stdout] 446 | break; [INFO] [stdout] 447 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data/tile_xml.rs:459:9 [INFO] [stdout] | [INFO] [stdout] 459 | / if rule.mask == "center" { [INFO] [stdout] 460 | | if mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 461 | | center_rule = Some(rule); [INFO] [stdout] 462 | | break; [INFO] [stdout] 463 | | } [INFO] [stdout] 464 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 459 ~ if rule.mask == "center" [INFO] [stdout] 460 ~ && mask_matches(&n, &rule.mask, is_solid, tileset.ignores.as_deref()) { [INFO] [stdout] 461 | center_rule = Some(rule); [INFO] [stdout] 462 | break; [INFO] [stdout] 463 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/data/xnb_reader.rs:177:21 [INFO] [stdout] | [INFO] [stdout] 177 | let width = self.reader.read_ulong()? as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.reader.read_ulong()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/data/xnb_reader.rs:178:22 [INFO] [stdout] | [INFO] [stdout] 178 | let height = self.reader.read_ulong()? as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.reader.read_ulong()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 22s [INFO] running `Command { std: "docker" "inspect" "a2683e3d965a6377b436234b9a2178d023b1f4a7a2402082658694ee1cfd292a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a2683e3d965a6377b436234b9a2178d023b1f4a7a2402082658694ee1cfd292a", kill_on_drop: false }` [INFO] [stdout] a2683e3d965a6377b436234b9a2178d023b1f4a7a2402082658694ee1cfd292a