[INFO] cloning repository https://github.com/matt-k-wong/aetheris_doom [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/matt-k-wong/aetheris_doom" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmatt-k-wong%2Faetheris_doom", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmatt-k-wong%2Faetheris_doom'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fb36ca5fcffcceab72c79b8276d1ee17326558a2 [INFO] linting matt-k-wong/aetheris_doom against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmatt-k-wong%2Faetheris_doom" "/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/matt-k-wong/aetheris_doom [INFO] finished tweaking git repo https://github.com/matt-k-wong/aetheris_doom [INFO] tweaked toml for git repo https://github.com/matt-k-wong/aetheris_doom written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/matt-k-wong/aetheris_doom 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/matt-k-wong/aetheris_doom 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/matt-k-wong/aetheris_game_engine.git` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded midly v0.5.3 [INFO] [stderr] Downloaded pixels v0.13.0 [INFO] [stderr] Downloaded binrw_derive v0.13.3 [INFO] [stderr] Downloaded binrw v0.13.3 [INFO] [stderr] Downloaded opl-emu v0.4.2 [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] f558c02bf00bbafd0d0d008c4c1a0dda87dbf446566a8e52d2b49f3100787737 [INFO] running `Command { std: "docker" "start" "-a" "f558c02bf00bbafd0d0d008c4c1a0dda87dbf446566a8e52d2b49f3100787737", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f558c02bf00bbafd0d0d008c4c1a0dda87dbf446566a8e52d2b49f3100787737", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f558c02bf00bbafd0d0d008c4c1a0dda87dbf446566a8e52d2b49f3100787737", kill_on_drop: false }` [INFO] [stdout] f558c02bf00bbafd0d0d008c4c1a0dda87dbf446566a8e52d2b49f3100787737 [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] dfc7aaa444f58a6911c1af23520b1ce1bcfbd839453c9ea729b48f32cc2f8815 [INFO] running `Command { std: "docker" "start" "-a" "dfc7aaa444f58a6911c1af23520b1ce1bcfbd839453c9ea729b48f32cc2f8815", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Compiling zerocopy v0.8.40 [INFO] [stderr] Compiling xml-rs v0.8.28 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Compiling wayland-sys v0.29.5 [INFO] [stderr] Checking dlib v0.5.3 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Checking libloading v0.7.4 [INFO] [stderr] Compiling slotmap v1.1.1 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Checking spirv v0.2.0+1.5.4 [INFO] [stderr] Compiling alsa-sys v0.3.1 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Compiling smithay-client-toolkit v0.16.1 [INFO] [stderr] Checking regex-syntax v0.8.10 [INFO] [stderr] Checking gpu-descriptor-types v0.1.2 [INFO] [stderr] Checking wgpu-types v0.16.1 [INFO] [stderr] Compiling cpal v0.15.3 [INFO] [stderr] Compiling binrw_derive v0.13.3 [INFO] [stderr] Checking ash v0.37.3+1.3.251 [INFO] [stderr] Compiling zmij v1.0.21 [INFO] [stderr] Checking ab_glyph v0.2.32 [INFO] [stderr] Checking ogg v0.8.0 [INFO] [stderr] Compiling anyhow v1.0.102 [INFO] [stderr] Checking dasp_sample v0.11.0 [INFO] [stderr] Compiling getrandom v0.4.1 [INFO] [stderr] Compiling binrw v0.13.3 [INFO] [stderr] Compiling owo-colors v3.5.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking lewton v0.10.2 [INFO] [stderr] Checking gif v0.13.3 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Checking claxon v0.4.3 [INFO] [stderr] Checking hound v3.5.1 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking ringbuf v0.3.3 [INFO] [stderr] Compiling quote v1.0.44 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling wayland-scanner v0.29.5 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking regex-automata v0.4.14 [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] Checking nix v0.24.3 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking nix v0.25.1 [INFO] [stderr] Checking khronos-egl v4.1.0 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Checking memmap2 v0.5.10 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking jpeg-decoder v0.3.2 [INFO] [stderr] Checking alsa v0.9.1 [INFO] [stderr] Checking is-terminal v0.4.17 [INFO] [stderr] Checking midly v0.5.3 [INFO] [stderr] Checking rand v0.10.0 [INFO] [stderr] Checking tiff v0.9.1 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking wayland-commons v0.29.5 [INFO] [stderr] Checking env_logger v0.10.2 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Compiling zerocopy-derive v0.8.40 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking wayland-cursor v0.29.5 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking symphonia-core v0.5.5 [INFO] [stderr] Checking safe_arch v0.7.4 [INFO] [stderr] Checking tiny-skia-path v0.8.4 [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Checking naga v0.12.3 [INFO] [stderr] Checking calloop v0.10.6 [INFO] [stderr] Checking wide v0.7.33 [INFO] [stderr] Checking tiny-skia v0.8.4 [INFO] [stderr] Checking symphonia-metadata v0.5.5 [INFO] [stderr] Checking symphonia-bundle-mp3 v0.5.5 [INFO] [stderr] Checking ultraviolet v0.9.2 [INFO] [stderr] Checking symphonia v0.5.5 [INFO] [stderr] Checking rodio v0.17.3 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking glam v0.24.2 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking exr v1.74.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking gpu-descriptor v0.2.4 [INFO] [stderr] Checking wgpu-hal v0.16.2 [INFO] [stderr] Checking wgpu-core v0.16.1 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking wgpu v0.16.3 [INFO] [stderr] Checking pixels v0.13.0 [INFO] [stderr] Checking sctk-adwaita v0.5.4 [INFO] [stderr] Checking aetheris v0.1.0 (https://github.com/matt-k-wong/aetheris_game_engine.git#80a14fd5) [INFO] [stderr] Checking aetheris_doom v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/doom.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `aetheris::simulation::*` [INFO] [stdout] --> src/doom.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | use aetheris::simulation::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/doom.rs:394:1 [INFO] [stdout] | [INFO] [stdout] 394 | / /// Higher = more likely to enter pain state when hit [INFO] [stdout] 395 | | // Helper removed in favor of Thing::pain_chance [INFO] [stdout] 396 | | /* [INFO] [stdout] 397 | | pub fn pain_chance_for_kind(kind: u16) -> u8 { [INFO] [stdout] ... | [INFO] [stdout] 409 | | */ [INFO] [stdout] 410 | | [INFO] [stdout] | |_^ [INFO] [stdout] 411 | // Doom-specific Thing methods [INFO] [stdout] 412 | pub trait DoomThingExt { [INFO] [stdout] | ---------------------- the comment documents this trait [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document trait `DoomThingExt` then comment it out [INFO] [stdout] | [INFO] [stdout] 393 ~ // /// Pain chance values (0-255) for each monster type [INFO] [stdout] 394 ~ // /// Higher = more likely to enter pain state when hit [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/doom.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `aetheris::simulation::*` [INFO] [stdout] --> src/doom.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | use aetheris::simulation::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/doom.rs:394:1 [INFO] [stdout] | [INFO] [stdout] 394 | / /// Higher = more likely to enter pain state when hit [INFO] [stdout] 395 | | // Helper removed in favor of Thing::pain_chance [INFO] [stdout] 396 | | /* [INFO] [stdout] 397 | | pub fn pain_chance_for_kind(kind: u16) -> u8 { [INFO] [stdout] ... | [INFO] [stdout] 409 | | */ [INFO] [stdout] 410 | | [INFO] [stdout] | |_^ [INFO] [stdout] 411 | // Doom-specific Thing methods [INFO] [stdout] 412 | pub trait DoomThingExt { [INFO] [stdout] | ---------------------- the comment documents this trait [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document trait `DoomThingExt` then comment it out [INFO] [stdout] | [INFO] [stdout] 393 ~ // /// Pain chance values (0-255) for each monster type [INFO] [stdout] 394 ~ // /// Higher = more likely to enter pain state when hit [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/bridge.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | world: &aetheris::simulation::WorldState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/bridge.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | world: &aetheris::simulation::WorldState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/doom.rs:4229:25 [INFO] [stdout] | [INFO] [stdout] 4229 | let mut push_dir = if d < 0.001 { [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/doom.rs:4229:25 [INFO] [stdout] | [INFO] [stdout] 4229 | let mut push_dir = if d < 0.001 { [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: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/doom.rs:139:34 [INFO] [stdout] | [INFO] [stdout] 139 | ... .map(|idx| world.things.get(idx).map(|t| t.position)) [INFO] [stdout] | ________________________^ [INFO] [stdout] 140 | | ... .flatten() [INFO] [stdout] | |________________________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|idx| world.things.get(idx).map(|t| t.position))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:227:21 [INFO] [stdout] | [INFO] [stdout] 227 | / if let Some(owner) = self.owner_thing_idx { [INFO] [stdout] 228 | | if i == owner { [INFO] [stdout] 229 | | continue; [INFO] [stdout] 230 | | } [INFO] [stdout] 231 | | } [INFO] [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] 227 ~ if let Some(owner) = self.owner_thing_idx [INFO] [stdout] 228 ~ && i == owner { [INFO] [stdout] 229 | continue; [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/doom.rs:442:29 [INFO] [stdout] | [INFO] [stdout] 442 | matches!(self.kind, 9997 | 9998 | 9999) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `9997..=9999` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/doom.rs:139:34 [INFO] [stdout] | [INFO] [stdout] 139 | ... .map(|idx| world.things.get(idx).map(|t| t.position)) [INFO] [stdout] | ________________________^ [INFO] [stdout] 140 | | ... .flatten() [INFO] [stdout] | |________________________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|idx| world.things.get(idx).map(|t| t.position))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:227:21 [INFO] [stdout] | [INFO] [stdout] 227 | / if let Some(owner) = self.owner_thing_idx { [INFO] [stdout] 228 | | if i == owner { [INFO] [stdout] 229 | | continue; [INFO] [stdout] 230 | | } [INFO] [stdout] 231 | | } [INFO] [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] 227 ~ if let Some(owner) = self.owner_thing_idx [INFO] [stdout] 228 ~ && i == owner { [INFO] [stdout] 229 | continue; [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/doom.rs:442:29 [INFO] [stdout] | [INFO] [stdout] 442 | matches!(self.kind, 9997 | 9998 | 9999) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `9997..=9999` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3553:13 [INFO] [stdout] | [INFO] [stdout] 3553 | / if (trial - other.position).length() < radius + other_radius { [INFO] [stdout] 3554 | | if (trial - other.position).length() [INFO] [stdout] 3555 | | < (monster.position - other.position).length() - 0.01 [INFO] [stdout] ... | [INFO] [stdout] 3559 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3553 ~ if (trial - other.position).length() < radius + other_radius [INFO] [stdout] 3554 ~ && (trial - other.position).length() [INFO] [stdout] 3555 | < (monster.position - other.position).length() - 0.01 [INFO] [stdout] 3556 | { [INFO] [stdout] 3557 | return false; [INFO] [stdout] 3558 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3576:21 [INFO] [stdout] | [INFO] [stdout] 3576 | / if line.is_portal() { [INFO] [stdout] 3577 | | if let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 3578 | | let front = &world.sectors[fs]; [INFO] [stdout] 3579 | | let back = &world.sectors[bs]; [INFO] [stdout] ... | [INFO] [stdout] 3589 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3576 ~ if line.is_portal() [INFO] [stdout] 3577 ~ && let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 3578 | let front = &world.sectors[fs]; [INFO] [stdout] ... [INFO] [stdout] 3587 | } [INFO] [stdout] 3588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3642:17 [INFO] [stdout] | [INFO] [stdout] 3642 | / if let Some(inflictor) = inflictor_idx { [INFO] [stdout] 3643 | | if inflictor != self.thing_idx { [INFO] [stdout] 3644 | | self.target_thing_idx = Some(inflictor); [INFO] [stdout] 3645 | | } [INFO] [stdout] 3646 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3642 ~ if let Some(inflictor) = inflictor_idx [INFO] [stdout] 3643 ~ && inflictor != self.thing_idx { [INFO] [stdout] 3644 | self.target_thing_idx = Some(inflictor); [INFO] [stdout] 3645 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3724:9 [INFO] [stdout] | [INFO] [stdout] 3724 | / if self.tics == 0 { [INFO] [stdout] 3725 | | if self.state_idx < STATES.len() { [INFO] [stdout] 3726 | | let next = STATES[self.state_idx].next_state; [INFO] [stdout] 3727 | | self.set_state(next, STATES); [INFO] [stdout] 3728 | | } [INFO] [stdout] 3729 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3724 ~ if self.tics == 0 [INFO] [stdout] 3725 ~ && self.state_idx < STATES.len() { [INFO] [stdout] 3726 | let next = STATES[self.state_idx].next_state; [INFO] [stdout] 3727 | self.set_state(next, STATES); [INFO] [stdout] 3728 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3735:13 [INFO] [stdout] | [INFO] [stdout] 3735 | / if self.state_idx < STATES.len() { [INFO] [stdout] 3736 | | if let Some(action) = STATES[self.state_idx].action { [INFO] [stdout] 3737 | | self.execute_action(action, world, &mut commands); [INFO] [stdout] 3738 | | } [INFO] [stdout] 3739 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3735 ~ if self.state_idx < STATES.len() [INFO] [stdout] 3736 ~ && let Some(action) = STATES[self.state_idx].action { [INFO] [stdout] 3737 | self.execute_action(action, world, &mut commands); [INFO] [stdout] 3738 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3753:9 [INFO] [stdout] | [INFO] [stdout] 3753 | / if !monster.is_flying() { [INFO] [stdout] 3754 | | if let Some(s_idx) = world.find_sector_at(monster.position) { [INFO] [stdout] 3755 | | let floor_z = world.sectors[s_idx].floor_height; [INFO] [stdout] 3756 | | let mut z_snap = 0.0; [INFO] [stdout] ... | [INFO] [stdout] 3777 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3753 ~ if !monster.is_flying() [INFO] [stdout] 3754 ~ && let Some(s_idx) = world.find_sector_at(monster.position) { [INFO] [stdout] 3755 | let floor_z = world.sectors[s_idx].floor_height; [INFO] [stdout] ... [INFO] [stdout] 3775 | } [INFO] [stdout] 3776 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4041:21 [INFO] [stdout] | [INFO] [stdout] 4041 | / if let Some(ss) = self.subsectors.get(sidx) { [INFO] [stdout] 4042 | | if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | if tsid == sid { [INFO] [stdout] ... | [INFO] [stdout] 4053 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4041 ~ if let Some(ss) = self.subsectors.get(sidx) [INFO] [stdout] 4042 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] ... [INFO] [stdout] 4051 | } [INFO] [stdout] 4052 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4042:25 [INFO] [stdout] | [INFO] [stdout] 4042 | / if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | if tsid == sid { [INFO] [stdout] 4045 | | for i in 0..self.thinkers.len() { [INFO] [stdout] ... | [INFO] [stdout] 4052 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4042 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 4043 ~ && let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | if tsid == sid { [INFO] [stdout] ... [INFO] [stdout] 4050 | } [INFO] [stdout] 4051 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4043:29 [INFO] [stdout] | [INFO] [stdout] 4043 | / ... if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | ... if tsid == sid { [INFO] [stdout] 4045 | | ... for i in 0..self.thinkers.len() { [INFO] [stdout] 4046 | | ... let mut thinker = self.thinkers.remove(i); [INFO] [stdout] ... | [INFO] [stdout] 4051 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4043 ~ if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 4044 ~ && tsid == sid { [INFO] [stdout] 4045 | for i in 0..self.thinkers.len() { [INFO] [stdout] ... [INFO] [stdout] 4049 | } [INFO] [stdout] 4050 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4057:13 [INFO] [stdout] | [INFO] [stdout] 4057 | / if h > 0 { [INFO] [stdout] 4058 | | if let Some(neighbors) = self.adjacent_sectors.get(sid) { [INFO] [stdout] 4059 | | for &neighbor in neighbors { [INFO] [stdout] 4060 | | queue.push((neighbor, h - 1)); [INFO] [stdout] ... | [INFO] [stdout] 4063 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4057 ~ if h > 0 [INFO] [stdout] 4058 ~ && let Some(neighbors) = self.adjacent_sectors.get(sid) { [INFO] [stdout] 4059 | for &neighbor in neighbors { [INFO] [stdout] 4060 | queue.push((neighbor, h - 1)); [INFO] [stdout] 4061 | } [INFO] [stdout] 4062 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/doom.rs:4081:50 [INFO] [stdout] | [INFO] [stdout] 4081 | if self.menu_state != MenuState::None && self.frame_count % 35 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.frame_count.is_multiple_of(35)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4165:21 [INFO] [stdout] | [INFO] [stdout] 4165 | / if line.is_portal() { [INFO] [stdout] 4166 | | if let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 4167 | | let front = &self.sectors[fs]; [INFO] [stdout] 4168 | | let back = &self.sectors[bs]; [INFO] [stdout] ... | [INFO] [stdout] 4178 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4165 ~ if line.is_portal() [INFO] [stdout] 4166 ~ && let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 4167 | let front = &self.sectors[fs]; [INFO] [stdout] ... [INFO] [stdout] 4176 | } [INFO] [stdout] 4177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4254:9 [INFO] [stdout] | [INFO] [stdout] 4254 | / if !self.nodes.is_empty() { [INFO] [stdout] 4255 | | if let Some(sid) = self.find_sector_at(next_pos) { [INFO] [stdout] 4256 | | let sector = &mut self.sectors[sid]; [INFO] [stdout] ... | [INFO] [stdout] 4282 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4254 ~ if !self.nodes.is_empty() [INFO] [stdout] 4255 ~ && let Some(sid) = self.find_sector_at(next_pos) { [INFO] [stdout] 4256 | let sector = &mut self.sectors[sid]; [INFO] [stdout] ... [INFO] [stdout] 4280 | } [INFO] [stdout] 4281 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3553:13 [INFO] [stdout] | [INFO] [stdout] 3553 | / if (trial - other.position).length() < radius + other_radius { [INFO] [stdout] 3554 | | if (trial - other.position).length() [INFO] [stdout] 3555 | | < (monster.position - other.position).length() - 0.01 [INFO] [stdout] ... | [INFO] [stdout] 3559 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3553 ~ if (trial - other.position).length() < radius + other_radius [INFO] [stdout] 3554 ~ && (trial - other.position).length() [INFO] [stdout] 3555 | < (monster.position - other.position).length() - 0.01 [INFO] [stdout] 3556 | { [INFO] [stdout] 3557 | return false; [INFO] [stdout] 3558 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4584:17 [INFO] [stdout] | [INFO] [stdout] 4584 | / if next_cooldown == 0 { [INFO] [stdout] 4585 | | next_cooldown = 10; [INFO] [stdout] 4586 | | final_weapon = next_weapon; [INFO] [stdout] 4587 | | next_weapon_state = WeaponState::Raising; [INFO] [stdout] 4588 | | } [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] 4583 ~ WeaponState::Lowering [INFO] [stdout] 4584 ~ if next_cooldown == 0 => { [INFO] [stdout] 4585 | next_cooldown = 10; [INFO] [stdout] 4586 | final_weapon = next_weapon; [INFO] [stdout] 4587 | next_weapon_state = WeaponState::Raising; [INFO] [stdout] 4588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4591:17 [INFO] [stdout] | [INFO] [stdout] 4591 | / if next_cooldown == 0 { [INFO] [stdout] 4592 | | next_weapon_state = WeaponState::Ready; [INFO] [stdout] 4593 | | } [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] 4590 ~ WeaponState::Raising [INFO] [stdout] 4591 ~ if next_cooldown == 0 => { [INFO] [stdout] 4592 | next_weapon_state = WeaponState::Ready; [INFO] [stdout] 4593 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4338:17 [INFO] [stdout] | [INFO] [stdout] 4338 | / if let Some(idx) = current_ammo_idx { [INFO] [stdout] 4339 | | if self.player.ammo[idx] == 0 { [INFO] [stdout] 4340 | | for next_w in [ [INFO] [stdout] 4341 | | WeaponType::BFG9000, [INFO] [stdout] ... | [INFO] [stdout] 4361 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4338 ~ if let Some(idx) = current_ammo_idx [INFO] [stdout] 4339 ~ && self.player.ammo[idx] == 0 { [INFO] [stdout] 4340 | for next_w in [ [INFO] [stdout] ... [INFO] [stdout] 4359 | } [INFO] [stdout] 4360 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3576:21 [INFO] [stdout] | [INFO] [stdout] 3576 | / if line.is_portal() { [INFO] [stdout] 3577 | | if let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 3578 | | let front = &world.sectors[fs]; [INFO] [stdout] 3579 | | let back = &world.sectors[bs]; [INFO] [stdout] ... | [INFO] [stdout] 3589 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3576 ~ if line.is_portal() [INFO] [stdout] 3577 ~ && let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 3578 | let front = &world.sectors[fs]; [INFO] [stdout] ... [INFO] [stdout] 3587 | } [INFO] [stdout] 3588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3642:17 [INFO] [stdout] | [INFO] [stdout] 3642 | / if let Some(inflictor) = inflictor_idx { [INFO] [stdout] 3643 | | if inflictor != self.thing_idx { [INFO] [stdout] 3644 | | self.target_thing_idx = Some(inflictor); [INFO] [stdout] 3645 | | } [INFO] [stdout] 3646 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3642 ~ if let Some(inflictor) = inflictor_idx [INFO] [stdout] 3643 ~ && inflictor != self.thing_idx { [INFO] [stdout] 3644 | self.target_thing_idx = Some(inflictor); [INFO] [stdout] 3645 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3724:9 [INFO] [stdout] | [INFO] [stdout] 3724 | / if self.tics == 0 { [INFO] [stdout] 3725 | | if self.state_idx < STATES.len() { [INFO] [stdout] 3726 | | let next = STATES[self.state_idx].next_state; [INFO] [stdout] 3727 | | self.set_state(next, STATES); [INFO] [stdout] 3728 | | } [INFO] [stdout] 3729 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3724 ~ if self.tics == 0 [INFO] [stdout] 3725 ~ && self.state_idx < STATES.len() { [INFO] [stdout] 3726 | let next = STATES[self.state_idx].next_state; [INFO] [stdout] 3727 | self.set_state(next, STATES); [INFO] [stdout] 3728 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3735:13 [INFO] [stdout] | [INFO] [stdout] 3735 | / if self.state_idx < STATES.len() { [INFO] [stdout] 3736 | | if let Some(action) = STATES[self.state_idx].action { [INFO] [stdout] 3737 | | self.execute_action(action, world, &mut commands); [INFO] [stdout] 3738 | | } [INFO] [stdout] 3739 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3735 ~ if self.state_idx < STATES.len() [INFO] [stdout] 3736 ~ && let Some(action) = STATES[self.state_idx].action { [INFO] [stdout] 3737 | self.execute_action(action, world, &mut commands); [INFO] [stdout] 3738 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3753:9 [INFO] [stdout] | [INFO] [stdout] 3753 | / if !monster.is_flying() { [INFO] [stdout] 3754 | | if let Some(s_idx) = world.find_sector_at(monster.position) { [INFO] [stdout] 3755 | | let floor_z = world.sectors[s_idx].floor_height; [INFO] [stdout] 3756 | | let mut z_snap = 0.0; [INFO] [stdout] ... | [INFO] [stdout] 3777 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3753 ~ if !monster.is_flying() [INFO] [stdout] 3754 ~ && let Some(s_idx) = world.find_sector_at(monster.position) { [INFO] [stdout] 3755 | let floor_z = world.sectors[s_idx].floor_height; [INFO] [stdout] ... [INFO] [stdout] 3775 | } [INFO] [stdout] 3776 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/doom.rs:4663:24 [INFO] [stdout] | [INFO] [stdout] 4663 | if t >= -0.1 && t <= 1.1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-0.1..=1.1).contains(&t)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4720:17 [INFO] [stdout] | [INFO] [stdout] 4720 | / if let Some(sid) = sector_ids[i] { [INFO] [stdout] 4721 | | if sid < self.sectors.len() { [INFO] [stdout] 4722 | | let floor_z = self.sectors[sid].floor_height; [INFO] [stdout] 4723 | | if t.z > floor_z + 0.1 { [INFO] [stdout] ... | [INFO] [stdout] 4733 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4720 ~ if let Some(sid) = sector_ids[i] [INFO] [stdout] 4721 ~ && sid < self.sectors.len() { [INFO] [stdout] 4722 | let floor_z = self.sectors[sid].floor_height; [INFO] [stdout] ... [INFO] [stdout] 4731 | } [INFO] [stdout] 4732 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/doom.rs:5371:28 [INFO] [stdout] | [INFO] [stdout] 5371 | if !thing.is_monster() && !thing.is_barrel() && !(owner_is_player && i == 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(thing.is_monster() || thing.is_barrel() || owner_is_player && i == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4041:21 [INFO] [stdout] | [INFO] [stdout] 4041 | / if let Some(ss) = self.subsectors.get(sidx) { [INFO] [stdout] 4042 | | if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | if tsid == sid { [INFO] [stdout] ... | [INFO] [stdout] 4053 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4041 ~ if let Some(ss) = self.subsectors.get(sidx) [INFO] [stdout] 4042 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] ... [INFO] [stdout] 4051 | } [INFO] [stdout] 4052 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4042:25 [INFO] [stdout] | [INFO] [stdout] 4042 | / if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | if tsid == sid { [INFO] [stdout] 4045 | | for i in 0..self.thinkers.len() { [INFO] [stdout] ... | [INFO] [stdout] 4052 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4042 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 4043 ~ && let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | if tsid == sid { [INFO] [stdout] ... [INFO] [stdout] 4050 | } [INFO] [stdout] 4051 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4043:29 [INFO] [stdout] | [INFO] [stdout] 4043 | / ... if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | ... if tsid == sid { [INFO] [stdout] 4045 | | ... for i in 0..self.thinkers.len() { [INFO] [stdout] 4046 | | ... let mut thinker = self.thinkers.remove(i); [INFO] [stdout] ... | [INFO] [stdout] 4051 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4043 ~ if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 4044 ~ && tsid == sid { [INFO] [stdout] 4045 | for i in 0..self.thinkers.len() { [INFO] [stdout] ... [INFO] [stdout] 4049 | } [INFO] [stdout] 4050 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4842:45 [INFO] [stdout] | [INFO] [stdout] 4842 | / ... if *state == DoorState::Closing { [INFO] [stdout] 4843 | | ... reverse_door = true; [INFO] [stdout] 4844 | | ... final_ceil_delta = 0.0; // Stop movement [INFO] [stdout] 4845 | | ... } [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] 4841 ~ SectorAction::Door { state, .. } [INFO] [stdout] 4842 ~ if *state == DoorState::Closing => { [INFO] [stdout] 4843 | reverse_door = true; [INFO] [stdout] 4844 | final_ceil_delta = 0.0; // Stop movement [INFO] [stdout] 4845 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4848:45 [INFO] [stdout] | [INFO] [stdout] 4848 | / ... if health > 0.0 { [INFO] [stdout] 4849 | | ... crush_damage = *damage; [INFO] [stdout] 4850 | | ... // Clamp to thing top [INFO] [stdout] 4851 | | ... let clamp_delta = (z + height) - s.ceiling_height; [INFO] [stdout] ... | [INFO] [stdout] 4856 | | ... } [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] 4847 ~ SectorAction::Crusher { damage, .. } [INFO] [stdout] 4848 ~ if health > 0.0 => { [INFO] [stdout] 4849 | crush_damage = *damage; [INFO] [stdout] ... [INFO] [stdout] 4855 | } [INFO] [stdout] 4856 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4057:13 [INFO] [stdout] | [INFO] [stdout] 4057 | / if h > 0 { [INFO] [stdout] 4058 | | if let Some(neighbors) = self.adjacent_sectors.get(sid) { [INFO] [stdout] 4059 | | for &neighbor in neighbors { [INFO] [stdout] 4060 | | queue.push((neighbor, h - 1)); [INFO] [stdout] ... | [INFO] [stdout] 4063 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4057 ~ if h > 0 [INFO] [stdout] 4058 ~ && let Some(neighbors) = self.adjacent_sectors.get(sid) { [INFO] [stdout] 4059 | for &neighbor in neighbors { [INFO] [stdout] 4060 | queue.push((neighbor, h - 1)); [INFO] [stdout] 4061 | } [INFO] [stdout] 4062 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4870:25 [INFO] [stdout] | [INFO] [stdout] 4870 | / if reverse_door { [INFO] [stdout] 4871 | | if let SectorAction::Door { state, .. } = &mut s.action { [INFO] [stdout] 4872 | | *state = DoorState::Opening; [INFO] [stdout] 4873 | | } [INFO] [stdout] 4874 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4870 ~ if reverse_door [INFO] [stdout] 4871 ~ && let SectorAction::Door { state, .. } = &mut s.action { [INFO] [stdout] 4872 | *state = DoorState::Opening; [INFO] [stdout] 4873 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/doom.rs:4081:50 [INFO] [stdout] | [INFO] [stdout] 4081 | if self.menu_state != MenuState::None && self.frame_count % 35 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.frame_count.is_multiple_of(35)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4165:21 [INFO] [stdout] | [INFO] [stdout] 4165 | / if line.is_portal() { [INFO] [stdout] 4166 | | if let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 4167 | | let front = &self.sectors[fs]; [INFO] [stdout] 4168 | | let back = &self.sectors[bs]; [INFO] [stdout] ... | [INFO] [stdout] 4178 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4165 ~ if line.is_portal() [INFO] [stdout] 4166 ~ && let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 4167 | let front = &self.sectors[fs]; [INFO] [stdout] ... [INFO] [stdout] 4176 | } [INFO] [stdout] 4177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4254:9 [INFO] [stdout] | [INFO] [stdout] 4254 | / if !self.nodes.is_empty() { [INFO] [stdout] 4255 | | if let Some(sid) = self.find_sector_at(next_pos) { [INFO] [stdout] 4256 | | let sector = &mut self.sectors[sid]; [INFO] [stdout] ... | [INFO] [stdout] 4282 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4254 ~ if !self.nodes.is_empty() [INFO] [stdout] 4255 ~ && let Some(sid) = self.find_sector_at(next_pos) { [INFO] [stdout] 4256 | let sector = &mut self.sectors[sid]; [INFO] [stdout] ... [INFO] [stdout] 4280 | } [INFO] [stdout] 4281 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4584:17 [INFO] [stdout] | [INFO] [stdout] 4584 | / if next_cooldown == 0 { [INFO] [stdout] 4585 | | next_cooldown = 10; [INFO] [stdout] 4586 | | final_weapon = next_weapon; [INFO] [stdout] 4587 | | next_weapon_state = WeaponState::Raising; [INFO] [stdout] 4588 | | } [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] 4583 ~ WeaponState::Lowering [INFO] [stdout] 4584 ~ if next_cooldown == 0 => { [INFO] [stdout] 4585 | next_cooldown = 10; [INFO] [stdout] 4586 | final_weapon = next_weapon; [INFO] [stdout] 4587 | next_weapon_state = WeaponState::Raising; [INFO] [stdout] 4588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4591:17 [INFO] [stdout] | [INFO] [stdout] 4591 | / if next_cooldown == 0 { [INFO] [stdout] 4592 | | next_weapon_state = WeaponState::Ready; [INFO] [stdout] 4593 | | } [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] 4590 ~ WeaponState::Raising [INFO] [stdout] 4591 ~ if next_cooldown == 0 => { [INFO] [stdout] 4592 | next_weapon_state = WeaponState::Ready; [INFO] [stdout] 4593 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4338:17 [INFO] [stdout] | [INFO] [stdout] 4338 | / if let Some(idx) = current_ammo_idx { [INFO] [stdout] 4339 | | if self.player.ammo[idx] == 0 { [INFO] [stdout] 4340 | | for next_w in [ [INFO] [stdout] 4341 | | WeaponType::BFG9000, [INFO] [stdout] ... | [INFO] [stdout] 4361 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4338 ~ if let Some(idx) = current_ammo_idx [INFO] [stdout] 4339 ~ && self.player.ammo[idx] == 0 { [INFO] [stdout] 4340 | for next_w in [ [INFO] [stdout] ... [INFO] [stdout] 4359 | } [INFO] [stdout] 4360 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5319:21 [INFO] [stdout] | [INFO] [stdout] 5319 | / if let Some(sid) = self.find_sector_at(self.player.position) { [INFO] [stdout] 5320 | | if sid == sector_idx { [INFO] [stdout] 5321 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] ... | [INFO] [stdout] 5330 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5319 ~ if let Some(sid) = self.find_sector_at(self.player.position) [INFO] [stdout] 5320 ~ && sid == sector_idx { [INFO] [stdout] 5321 | if self.player.invuln_timer == 0 { [INFO] [stdout] ... [INFO] [stdout] 5328 | } [INFO] [stdout] 5329 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5320:25 [INFO] [stdout] | [INFO] [stdout] 5320 | / if sid == sector_idx { [INFO] [stdout] 5321 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] 5323 | | self.player.armor -= absorbed; [INFO] [stdout] ... | [INFO] [stdout] 5329 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5320 ~ if sid == sector_idx [INFO] [stdout] 5321 ~ && self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] ... [INFO] [stdout] 5327 | } [INFO] [stdout] 5328 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5338:25 [INFO] [stdout] | [INFO] [stdout] 5338 | / if let Some(sid) = self.find_sector_at(t.position) { [INFO] [stdout] 5339 | | if sid == sector_idx { [INFO] [stdout] 5340 | | impacts.push((i, t.kind)); [INFO] [stdout] 5341 | | } [INFO] [stdout] 5342 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5338 ~ if let Some(sid) = self.find_sector_at(t.position) [INFO] [stdout] 5339 ~ && sid == sector_idx { [INFO] [stdout] 5340 | impacts.push((i, t.kind)); [INFO] [stdout] 5341 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5412:25 [INFO] [stdout] | [INFO] [stdout] 5412 | / if p_dmg > 0.0 { [INFO] [stdout] 5413 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5414 | | let absorbed = (p_dmg * 0.333).min(self.player.armor); [INFO] [stdout] 5415 | | self.player.armor -= absorbed; [INFO] [stdout] ... | [INFO] [stdout] 5420 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5412 ~ if p_dmg > 0.0 [INFO] [stdout] 5413 ~ && self.player.invuln_timer == 0 { [INFO] [stdout] 5414 | let absorbed = (p_dmg * 0.333).min(self.player.armor); [INFO] [stdout] ... [INFO] [stdout] 5418 | (self.player.damage_flash + 0.5).min(1.0); [INFO] [stdout] 5419 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/doom.rs:4663:24 [INFO] [stdout] | [INFO] [stdout] 4663 | if t >= -0.1 && t <= 1.1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-0.1..=1.1).contains(&t)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5502:25 [INFO] [stdout] | [INFO] [stdout] 5502 | / if let Some(ss) = self.subsectors.get(sidx) { [INFO] [stdout] 5503 | | if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | | if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] ... | [INFO] [stdout] 5508 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5502 ~ if let Some(ss) = self.subsectors.get(sidx) [INFO] [stdout] 5503 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 | } [INFO] [stdout] 5507 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5503:29 [INFO] [stdout] | [INFO] [stdout] 5503 | / ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | | ... if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | | ... self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 | | ... } [INFO] [stdout] 5507 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5503 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 5504 ~ && let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4720:17 [INFO] [stdout] | [INFO] [stdout] 4720 | / if let Some(sid) = sector_ids[i] { [INFO] [stdout] 4721 | | if sid < self.sectors.len() { [INFO] [stdout] 4722 | | let floor_z = self.sectors[sid].floor_height; [INFO] [stdout] 4723 | | if t.z > floor_z + 0.1 { [INFO] [stdout] ... | [INFO] [stdout] 4733 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4720 ~ if let Some(sid) = sector_ids[i] [INFO] [stdout] 4721 ~ && sid < self.sectors.len() { [INFO] [stdout] 4722 | let floor_z = self.sectors[sid].floor_height; [INFO] [stdout] ... [INFO] [stdout] 4731 | } [INFO] [stdout] 4732 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5616:21 [INFO] [stdout] | [INFO] [stdout] 5616 | / if let Some(sid) = sector_back { [INFO] [stdout] 5617 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5618 | | let sound = if speed > 4.0 { "DSBDOPN" } else { "DSDOROPN" }; [INFO] [stdout] 5619 | | self.audio_events.push(AudioEvent { [INFO] [stdout] ... | [INFO] [stdout] 5625 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5616 ~ if let Some(sid) = sector_back [INFO] [stdout] 5617 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5618 | let sound = if speed > 4.0 { "DSBDOPN" } else { "DSDOROPN" }; [INFO] [stdout] ... [INFO] [stdout] 5623 | }); [INFO] [stdout] 5624 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/doom.rs:5371:28 [INFO] [stdout] | [INFO] [stdout] 5371 | if !thing.is_monster() && !thing.is_barrel() && !(owner_is_player && i == 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(thing.is_monster() || thing.is_barrel() || owner_is_player && i == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5652:25 [INFO] [stdout] | [INFO] [stdout] 5652 | / if let Some(sid) = sector_back { [INFO] [stdout] 5653 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5654 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5655 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5660 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5652 ~ if let Some(sid) = sector_back [INFO] [stdout] 5653 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5654 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5658 | }); [INFO] [stdout] 5659 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4842:45 [INFO] [stdout] | [INFO] [stdout] 4842 | / ... if *state == DoorState::Closing { [INFO] [stdout] 4843 | | ... reverse_door = true; [INFO] [stdout] 4844 | | ... final_ceil_delta = 0.0; // Stop movement [INFO] [stdout] 4845 | | ... } [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] 4841 ~ SectorAction::Door { state, .. } [INFO] [stdout] 4842 ~ if *state == DoorState::Closing => { [INFO] [stdout] 4843 | reverse_door = true; [INFO] [stdout] 4844 | final_ceil_delta = 0.0; // Stop movement [INFO] [stdout] 4845 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5683:25 [INFO] [stdout] | [INFO] [stdout] 5683 | / if let Some(sid) = sector_back { [INFO] [stdout] 5684 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5685 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5686 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5691 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5683 ~ if let Some(sid) = sector_back [INFO] [stdout] 5684 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5685 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5689 | }); [INFO] [stdout] 5690 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4848:45 [INFO] [stdout] | [INFO] [stdout] 4848 | / ... if health > 0.0 { [INFO] [stdout] 4849 | | ... crush_damage = *damage; [INFO] [stdout] 4850 | | ... // Clamp to thing top [INFO] [stdout] 4851 | | ... let clamp_delta = (z + height) - s.ceiling_height; [INFO] [stdout] ... | [INFO] [stdout] 4856 | | ... } [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] 4847 ~ SectorAction::Crusher { damage, .. } [INFO] [stdout] 4848 ~ if health > 0.0 => { [INFO] [stdout] 4849 | crush_damage = *damage; [INFO] [stdout] ... [INFO] [stdout] 4855 | } [INFO] [stdout] 4856 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4870:25 [INFO] [stdout] | [INFO] [stdout] 4870 | / if reverse_door { [INFO] [stdout] 4871 | | if let SectorAction::Door { state, .. } = &mut s.action { [INFO] [stdout] 4872 | | *state = DoorState::Opening; [INFO] [stdout] 4873 | | } [INFO] [stdout] 4874 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4870 ~ if reverse_door [INFO] [stdout] 4871 ~ && let SectorAction::Door { state, .. } = &mut s.action { [INFO] [stdout] 4872 | *state = DoorState::Opening; [INFO] [stdout] 4873 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5714:25 [INFO] [stdout] | [INFO] [stdout] 5714 | / if let Some(sid) = sector_back { [INFO] [stdout] 5715 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5716 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5717 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5722 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5714 ~ if let Some(sid) = sector_back [INFO] [stdout] 5715 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5716 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5720 | }); [INFO] [stdout] 5721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5757:33 [INFO] [stdout] | [INFO] [stdout] 5757 | / ... if let Some(ss) = self.subsectors.get(ss_idx) { [INFO] [stdout] 5758 | | ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | | ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... | [INFO] [stdout] 5768 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5757 ~ if let Some(ss) = self.subsectors.get(ss_idx) [INFO] [stdout] 5758 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | if let Some(sid) = [INFO] [stdout] ... [INFO] [stdout] 5766 | } [INFO] [stdout] 5767 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5758:37 [INFO] [stdout] | [INFO] [stdout] 5758 | / ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | | ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... | [INFO] [stdout] 5767 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5758 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 5759 ~ && let Some(sid) = [INFO] [stdout] 5760 | self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... [INFO] [stdout] 5765 | } [INFO] [stdout] 5766 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5759:41 [INFO] [stdout] | [INFO] [stdout] 5759 | / ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 5761 | | ... { [INFO] [stdout] 5762 | | ... if sid == s_idx { [INFO] [stdout] ... | [INFO] [stdout] 5766 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5760 ~ self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 5761 ~ && sid == s_idx { [INFO] [stdout] 5762 | best_dest = Some(t); [INFO] [stdout] 5763 | break; [INFO] [stdout] 5764 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5906:21 [INFO] [stdout] | [INFO] [stdout] 5906 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5906 - return true; [INFO] [stdout] 5906 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5917:21 [INFO] [stdout] | [INFO] [stdout] 5917 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5917 - return true; [INFO] [stdout] 5917 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5935:21 [INFO] [stdout] | [INFO] [stdout] 5935 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5935 - return true; [INFO] [stdout] 5935 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5946:21 [INFO] [stdout] | [INFO] [stdout] 5946 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5946 - return true; [INFO] [stdout] 5946 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5319:21 [INFO] [stdout] | [INFO] [stdout] 5319 | / if let Some(sid) = self.find_sector_at(self.player.position) { [INFO] [stdout] 5320 | | if sid == sector_idx { [INFO] [stdout] 5321 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] ... | [INFO] [stdout] 5330 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5319 ~ if let Some(sid) = self.find_sector_at(self.player.position) [INFO] [stdout] 5320 ~ && sid == sector_idx { [INFO] [stdout] 5321 | if self.player.invuln_timer == 0 { [INFO] [stdout] ... [INFO] [stdout] 5328 | } [INFO] [stdout] 5329 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5320:25 [INFO] [stdout] | [INFO] [stdout] 5320 | / if sid == sector_idx { [INFO] [stdout] 5321 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] 5323 | | self.player.armor -= absorbed; [INFO] [stdout] ... | [INFO] [stdout] 5329 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5320 ~ if sid == sector_idx [INFO] [stdout] 5321 ~ && self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] ... [INFO] [stdout] 5327 | } [INFO] [stdout] 5328 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5338:25 [INFO] [stdout] | [INFO] [stdout] 5338 | / if let Some(sid) = self.find_sector_at(t.position) { [INFO] [stdout] 5339 | | if sid == sector_idx { [INFO] [stdout] 5340 | | impacts.push((i, t.kind)); [INFO] [stdout] 5341 | | } [INFO] [stdout] 5342 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5338 ~ if let Some(sid) = self.find_sector_at(t.position) [INFO] [stdout] 5339 ~ && sid == sector_idx { [INFO] [stdout] 5340 | impacts.push((i, t.kind)); [INFO] [stdout] 5341 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5971:13 [INFO] [stdout] | [INFO] [stdout] 5971 | / if self.sectors[i].tag == tag as i16 { [INFO] [stdout] 5972 | | if self.trigger_door(i, speed, wait) { [INFO] [stdout] 5973 | | triggered = true; [INFO] [stdout] 5974 | | } [INFO] [stdout] 5975 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5971 ~ if self.sectors[i].tag == tag as i16 [INFO] [stdout] 5972 ~ && self.trigger_door(i, speed, wait) { [INFO] [stdout] 5973 | triggered = true; [INFO] [stdout] 5974 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5982:13 [INFO] [stdout] | [INFO] [stdout] 5982 | / if s.tag == tag as i16 { [INFO] [stdout] 5983 | | if let SectorAction::None = s.action { [INFO] [stdout] 5984 | | let target = s.floor_height - 72.0; [INFO] [stdout] 5985 | | s.action = SectorAction::Lift { [INFO] [stdout] ... | [INFO] [stdout] 5993 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5982 ~ if s.tag == tag as i16 [INFO] [stdout] 5983 ~ && let SectorAction::None = s.action { [INFO] [stdout] 5984 | let target = s.floor_height - 72.0; [INFO] [stdout] ... [INFO] [stdout] 5991 | }; [INFO] [stdout] 5992 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5999:13 [INFO] [stdout] | [INFO] [stdout] 5999 | / if s.tag == tag as i16 { [INFO] [stdout] 6000 | | if let SectorAction::None = s.action { [INFO] [stdout] 6001 | | s.action = SectorAction::Crusher { [INFO] [stdout] 6002 | | state: CrusherState::GoingDown, [INFO] [stdout] ... | [INFO] [stdout] 6009 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5999 ~ if s.tag == tag as i16 [INFO] [stdout] 6000 ~ && let SectorAction::None = s.action { [INFO] [stdout] 6001 | s.action = SectorAction::Crusher { [INFO] [stdout] ... [INFO] [stdout] 6007 | }; [INFO] [stdout] 6008 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5412:25 [INFO] [stdout] | [INFO] [stdout] 5412 | / if p_dmg > 0.0 { [INFO] [stdout] 5413 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5414 | | let absorbed = (p_dmg * 0.333).min(self.player.armor); [INFO] [stdout] 5415 | | self.player.armor -= absorbed; [INFO] [stdout] ... | [INFO] [stdout] 5420 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5412 ~ if p_dmg > 0.0 [INFO] [stdout] 5413 ~ && self.player.invuln_timer == 0 { [INFO] [stdout] 5414 | let absorbed = (p_dmg * 0.333).min(self.player.armor); [INFO] [stdout] ... [INFO] [stdout] 5418 | (self.player.damage_flash + 0.5).min(1.0); [INFO] [stdout] 5419 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6076:9 [INFO] [stdout] | [INFO] [stdout] 6076 | / if let Some(s_idx) = self.find_sector_at(self.player.position) { [INFO] [stdout] 6077 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6078 | | let sector = &mut self.sectors[s_idx]; [INFO] [stdout] 6079 | | if sector.special_type == 9 && !sector.secret_found { [INFO] [stdout] ... | [INFO] [stdout] 6095 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6076 ~ if let Some(s_idx) = self.find_sector_at(self.player.position) [INFO] [stdout] 6077 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6078 | let sector = &mut self.sectors[s_idx]; [INFO] [stdout] ... [INFO] [stdout] 6093 | } [INFO] [stdout] 6094 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5502:25 [INFO] [stdout] | [INFO] [stdout] 5502 | / if let Some(ss) = self.subsectors.get(sidx) { [INFO] [stdout] 5503 | | if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | | if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] ... | [INFO] [stdout] 5508 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5502 ~ if let Some(ss) = self.subsectors.get(sidx) [INFO] [stdout] 5503 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 | } [INFO] [stdout] 5507 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5503:29 [INFO] [stdout] | [INFO] [stdout] 5503 | / ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | | ... if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | | ... self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 | | ... } [INFO] [stdout] 5507 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5503 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 5504 ~ && let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/doom.rs:6098:12 [INFO] [stdout] | [INFO] [stdout] 6098 | if self.frame_count % 32 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!self.frame_count.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6105:9 [INFO] [stdout] | [INFO] [stdout] 6105 | / if let Some(s_idx) = self.find_sector_at(self.player.position) { [INFO] [stdout] 6106 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6107 | | let special = self.sectors[s_idx].special_type; [INFO] [stdout] 6108 | | let damage = match special { [INFO] [stdout] ... | [INFO] [stdout] 6128 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6105 ~ if let Some(s_idx) = self.find_sector_at(self.player.position) [INFO] [stdout] 6106 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6107 | let special = self.sectors[s_idx].special_type; [INFO] [stdout] ... [INFO] [stdout] 6126 | } [INFO] [stdout] 6127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6117:17 [INFO] [stdout] | [INFO] [stdout] 6117 | / if damage > 0 { [INFO] [stdout] 6118 | | if self.player.radsuit_timer == 0 { [INFO] [stdout] 6119 | | log::info!( [INFO] [stdout] 6120 | | "Player taking slime damage: {} (Sector Special {})", [INFO] [stdout] ... | [INFO] [stdout] 6126 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6117 ~ if damage > 0 [INFO] [stdout] 6118 ~ && self.player.radsuit_timer == 0 { [INFO] [stdout] 6119 | log::info!( [INFO] [stdout] ... [INFO] [stdout] 6124 | damage_targets.push((true, 0, damage as f32)); [INFO] [stdout] 6125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6135:13 [INFO] [stdout] | [INFO] [stdout] 6135 | / if let Some(s_idx) = self.find_sector_at(t.position) { [INFO] [stdout] 6136 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6137 | | let special = self.sectors[s_idx].special_type; [INFO] [stdout] 6138 | | let damage = match special { [INFO] [stdout] ... | [INFO] [stdout] 6152 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6135 ~ if let Some(s_idx) = self.find_sector_at(t.position) [INFO] [stdout] 6136 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6137 | let special = self.sectors[s_idx].special_type; [INFO] [stdout] ... [INFO] [stdout] 6150 | } [INFO] [stdout] 6151 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5616:21 [INFO] [stdout] | [INFO] [stdout] 5616 | / if let Some(sid) = sector_back { [INFO] [stdout] 5617 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5618 | | let sound = if speed > 4.0 { "DSBDOPN" } else { "DSDOROPN" }; [INFO] [stdout] 5619 | | self.audio_events.push(AudioEvent { [INFO] [stdout] ... | [INFO] [stdout] 5625 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5616 ~ if let Some(sid) = sector_back [INFO] [stdout] 5617 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5618 | let sound = if speed > 4.0 { "DSBDOPN" } else { "DSDOROPN" }; [INFO] [stdout] ... [INFO] [stdout] 5623 | }); [INFO] [stdout] 5624 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5652:25 [INFO] [stdout] | [INFO] [stdout] 5652 | / if let Some(sid) = sector_back { [INFO] [stdout] 5653 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5654 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5655 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5660 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5652 ~ if let Some(sid) = sector_back [INFO] [stdout] 5653 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5654 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5658 | }); [INFO] [stdout] 5659 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5683:25 [INFO] [stdout] | [INFO] [stdout] 5683 | / if let Some(sid) = sector_back { [INFO] [stdout] 5684 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5685 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5686 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5691 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5683 ~ if let Some(sid) = sector_back [INFO] [stdout] 5684 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5685 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5689 | }); [INFO] [stdout] 5690 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5714:25 [INFO] [stdout] | [INFO] [stdout] 5714 | / if let Some(sid) = sector_back { [INFO] [stdout] 5715 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5716 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5717 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5722 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5714 ~ if let Some(sid) = sector_back [INFO] [stdout] 5715 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5716 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5720 | }); [INFO] [stdout] 5721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5757:33 [INFO] [stdout] | [INFO] [stdout] 5757 | / ... if let Some(ss) = self.subsectors.get(ss_idx) { [INFO] [stdout] 5758 | | ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | | ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... | [INFO] [stdout] 5768 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5757 ~ if let Some(ss) = self.subsectors.get(ss_idx) [INFO] [stdout] 5758 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | if let Some(sid) = [INFO] [stdout] ... [INFO] [stdout] 5766 | } [INFO] [stdout] 5767 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5758:37 [INFO] [stdout] | [INFO] [stdout] 5758 | / ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | | ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... | [INFO] [stdout] 5767 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5758 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 5759 ~ && let Some(sid) = [INFO] [stdout] 5760 | self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... [INFO] [stdout] 5765 | } [INFO] [stdout] 5766 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5759:41 [INFO] [stdout] | [INFO] [stdout] 5759 | / ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 5761 | | ... { [INFO] [stdout] 5762 | | ... if sid == s_idx { [INFO] [stdout] ... | [INFO] [stdout] 5766 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5760 ~ self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 5761 ~ && sid == s_idx { [INFO] [stdout] 5762 | best_dest = Some(t); [INFO] [stdout] 5763 | break; [INFO] [stdout] 5764 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5906:21 [INFO] [stdout] | [INFO] [stdout] 5906 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5906 - return true; [INFO] [stdout] 5906 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5917:21 [INFO] [stdout] | [INFO] [stdout] 5917 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5917 - return true; [INFO] [stdout] 5917 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5935:21 [INFO] [stdout] | [INFO] [stdout] 5935 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5935 - return true; [INFO] [stdout] 5935 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5946:21 [INFO] [stdout] | [INFO] [stdout] 5946 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5946 - return true; [INFO] [stdout] 5946 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5971:13 [INFO] [stdout] | [INFO] [stdout] 5971 | / if self.sectors[i].tag == tag as i16 { [INFO] [stdout] 5972 | | if self.trigger_door(i, speed, wait) { [INFO] [stdout] 5973 | | triggered = true; [INFO] [stdout] 5974 | | } [INFO] [stdout] 5975 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5971 ~ if self.sectors[i].tag == tag as i16 [INFO] [stdout] 5972 ~ && self.trigger_door(i, speed, wait) { [INFO] [stdout] 5973 | triggered = true; [INFO] [stdout] 5974 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5982:13 [INFO] [stdout] | [INFO] [stdout] 5982 | / if s.tag == tag as i16 { [INFO] [stdout] 5983 | | if let SectorAction::None = s.action { [INFO] [stdout] 5984 | | let target = s.floor_height - 72.0; [INFO] [stdout] 5985 | | s.action = SectorAction::Lift { [INFO] [stdout] ... | [INFO] [stdout] 5993 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5982 ~ if s.tag == tag as i16 [INFO] [stdout] 5983 ~ && let SectorAction::None = s.action { [INFO] [stdout] 5984 | let target = s.floor_height - 72.0; [INFO] [stdout] ... [INFO] [stdout] 5991 | }; [INFO] [stdout] 5992 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5999:13 [INFO] [stdout] | [INFO] [stdout] 5999 | / if s.tag == tag as i16 { [INFO] [stdout] 6000 | | if let SectorAction::None = s.action { [INFO] [stdout] 6001 | | s.action = SectorAction::Crusher { [INFO] [stdout] 6002 | | state: CrusherState::GoingDown, [INFO] [stdout] ... | [INFO] [stdout] 6009 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5999 ~ if s.tag == tag as i16 [INFO] [stdout] 6000 ~ && let SectorAction::None = s.action { [INFO] [stdout] 6001 | s.action = SectorAction::Crusher { [INFO] [stdout] ... [INFO] [stdout] 6007 | }; [INFO] [stdout] 6008 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6076:9 [INFO] [stdout] | [INFO] [stdout] 6076 | / if let Some(s_idx) = self.find_sector_at(self.player.position) { [INFO] [stdout] 6077 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6078 | | let sector = &mut self.sectors[s_idx]; [INFO] [stdout] 6079 | | if sector.special_type == 9 && !sector.secret_found { [INFO] [stdout] ... | [INFO] [stdout] 6095 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6076 ~ if let Some(s_idx) = self.find_sector_at(self.player.position) [INFO] [stdout] 6077 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6078 | let sector = &mut self.sectors[s_idx]; [INFO] [stdout] ... [INFO] [stdout] 6093 | } [INFO] [stdout] 6094 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/doom.rs:6098:12 [INFO] [stdout] | [INFO] [stdout] 6098 | if self.frame_count % 32 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!self.frame_count.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6105:9 [INFO] [stdout] | [INFO] [stdout] 6105 | / if let Some(s_idx) = self.find_sector_at(self.player.position) { [INFO] [stdout] 6106 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6107 | | let special = self.sectors[s_idx].special_type; [INFO] [stdout] 6108 | | let damage = match special { [INFO] [stdout] ... | [INFO] [stdout] 6128 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6105 ~ if let Some(s_idx) = self.find_sector_at(self.player.position) [INFO] [stdout] 6106 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6107 | let special = self.sectors[s_idx].special_type; [INFO] [stdout] ... [INFO] [stdout] 6126 | } [INFO] [stdout] 6127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6117:17 [INFO] [stdout] | [INFO] [stdout] 6117 | / if damage > 0 { [INFO] [stdout] 6118 | | if self.player.radsuit_timer == 0 { [INFO] [stdout] 6119 | | log::info!( [INFO] [stdout] 6120 | | "Player taking slime damage: {} (Sector Special {})", [INFO] [stdout] ... | [INFO] [stdout] 6126 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6117 ~ if damage > 0 [INFO] [stdout] 6118 ~ && self.player.radsuit_timer == 0 { [INFO] [stdout] 6119 | log::info!( [INFO] [stdout] ... [INFO] [stdout] 6124 | damage_targets.push((true, 0, damage as f32)); [INFO] [stdout] 6125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6135:13 [INFO] [stdout] | [INFO] [stdout] 6135 | / if let Some(s_idx) = self.find_sector_at(t.position) { [INFO] [stdout] 6136 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6137 | | let special = self.sectors[s_idx].special_type; [INFO] [stdout] 6138 | | let damage = match special { [INFO] [stdout] ... | [INFO] [stdout] 6152 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6135 ~ if let Some(s_idx) = self.find_sector_at(t.position) [INFO] [stdout] 6136 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6137 | let special = self.sectors[s_idx].special_type; [INFO] [stdout] ... [INFO] [stdout] 6150 | } [INFO] [stdout] 6151 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/doom.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `aetheris::simulation::*` [INFO] [stdout] --> src/doom.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | use aetheris::simulation::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/doom.rs:394:1 [INFO] [stdout] | [INFO] [stdout] 394 | / /// Higher = more likely to enter pain state when hit [INFO] [stdout] 395 | | // Helper removed in favor of Thing::pain_chance [INFO] [stdout] 396 | | /* [INFO] [stdout] 397 | | pub fn pain_chance_for_kind(kind: u16) -> u8 { [INFO] [stdout] ... | [INFO] [stdout] 409 | | */ [INFO] [stdout] 410 | | [INFO] [stdout] | |_^ [INFO] [stdout] 411 | // Doom-specific Thing methods [INFO] [stdout] 412 | pub trait DoomThingExt { [INFO] [stdout] | ---------------------- the comment documents this trait [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document trait `DoomThingExt` then comment it out [INFO] [stdout] | [INFO] [stdout] 393 ~ // /// Pain chance values (0-255) for each monster type [INFO] [stdout] 394 ~ // /// Higher = more likely to enter pain state when hit [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/doom.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `aetheris::simulation::*` [INFO] [stdout] --> src/doom.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | use aetheris::simulation::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/doom.rs:394:1 [INFO] [stdout] | [INFO] [stdout] 394 | / /// Higher = more likely to enter pain state when hit [INFO] [stdout] 395 | | // Helper removed in favor of Thing::pain_chance [INFO] [stdout] 396 | | /* [INFO] [stdout] 397 | | pub fn pain_chance_for_kind(kind: u16) -> u8 { [INFO] [stdout] ... | [INFO] [stdout] 409 | | */ [INFO] [stdout] 410 | | [INFO] [stdout] | |_^ [INFO] [stdout] 411 | // Doom-specific Thing methods [INFO] [stdout] 412 | pub trait DoomThingExt { [INFO] [stdout] | ---------------------- the comment documents this trait [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document trait `DoomThingExt` then comment it out [INFO] [stdout] | [INFO] [stdout] 393 ~ // /// Pain chance values (0-255) for each monster type [INFO] [stdout] 394 ~ // /// Higher = more likely to enter pain state when hit [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/bridge.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | world: &aetheris::simulation::WorldState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/bridge.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | world: &aetheris::simulation::WorldState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/doom.rs:4229:25 [INFO] [stdout] | [INFO] [stdout] 4229 | let mut push_dir = if d < 0.001 { [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/doom.rs:4229:25 [INFO] [stdout] | [INFO] [stdout] 4229 | let mut push_dir = if d < 0.001 { [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: multiple variants are never constructed [INFO] [stdout] --> src/doom.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub enum MonsterAction { [INFO] [stdout] | ------------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 14 | HeadAttack, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 15 | BruisAttack, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 16 | SkelMissile, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 17 | FatAttack, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 18 | VileChase, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 19 | VileAttack, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 20 | PainAttack, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | Raise, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MonsterAction` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `health`, `damage`, `reaction_time`, and `mass` are never read [INFO] [stdout] --> src/doom.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 39 | pub struct ThingDef { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 40 | pub health: f32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub damage: i32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 45 | pub reaction_time: i32, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 46 | pub pain_chance: u8, [INFO] [stdout] 47 | pub mass: i32, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ThingDef` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `position` is never read [INFO] [stdout] --> src/doom.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 50 | pub struct PuffThinker { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 51 | pub position: glam::Vec2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_IMP` is never used [INFO] [stdout] --> src/doom.rs:302:11 [INFO] [stdout] | [INFO] [stdout] 302 | pub const MONSTER_IMP: u16 = 3001; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_DEMON` is never used [INFO] [stdout] --> src/doom.rs:303:11 [INFO] [stdout] | [INFO] [stdout] 303 | pub const MONSTER_DEMON: u16 = 3002; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_BARON` is never used [INFO] [stdout] --> src/doom.rs:304:11 [INFO] [stdout] | [INFO] [stdout] 304 | pub const MONSTER_BARON: u16 = 3003; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_ZOMBIEMAN` is never used [INFO] [stdout] --> src/doom.rs:305:11 [INFO] [stdout] | [INFO] [stdout] 305 | pub const MONSTER_ZOMBIEMAN: u16 = 3004; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_CACODEMON` is never used [INFO] [stdout] --> src/doom.rs:306:11 [INFO] [stdout] | [INFO] [stdout] 306 | pub const MONSTER_CACODEMON: u16 = 3005; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_LOST_SOUL` is never used [INFO] [stdout] --> src/doom.rs:307:11 [INFO] [stdout] | [INFO] [stdout] 307 | pub const MONSTER_LOST_SOUL: u16 = 3006; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_SERGEANT` is never used [INFO] [stdout] --> src/doom.rs:308:11 [INFO] [stdout] | [INFO] [stdout] 308 | pub const MONSTER_SERGEANT: u16 = 9; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_SHOTGUN` is never used [INFO] [stdout] --> src/doom.rs:311:11 [INFO] [stdout] | [INFO] [stdout] 311 | pub const ITEM_SHOTGUN: u16 = 2001; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_CHAINGUN` is never used [INFO] [stdout] --> src/doom.rs:312:11 [INFO] [stdout] | [INFO] [stdout] 312 | pub const ITEM_CHAINGUN: u16 = 2002; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_ROCKET_LAUNCHER` is never used [INFO] [stdout] --> src/doom.rs:313:11 [INFO] [stdout] | [INFO] [stdout] 313 | pub const ITEM_ROCKET_LAUNCHER: u16 = 2003; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_PLASMA_RIFLE` is never used [INFO] [stdout] --> src/doom.rs:314:11 [INFO] [stdout] | [INFO] [stdout] 314 | pub const ITEM_PLASMA_RIFLE: u16 = 2004; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_CHAINSAW` is never used [INFO] [stdout] --> src/doom.rs:315:11 [INFO] [stdout] | [INFO] [stdout] 315 | pub const ITEM_CHAINSAW: u16 = 2005; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_BFG9000` is never used [INFO] [stdout] --> src/doom.rs:316:11 [INFO] [stdout] | [INFO] [stdout] 316 | pub const ITEM_BFG9000: u16 = 2006; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_CLIP` is never used [INFO] [stdout] --> src/doom.rs:317:11 [INFO] [stdout] | [INFO] [stdout] 317 | pub const ITEM_CLIP: u16 = 2007; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_SHELLS` is never used [INFO] [stdout] --> src/doom.rs:318:11 [INFO] [stdout] | [INFO] [stdout] 318 | pub const ITEM_SHELLS: u16 = 2008; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_ROCKETS` is never used [INFO] [stdout] --> src/doom.rs:319:11 [INFO] [stdout] | [INFO] [stdout] 319 | pub const ITEM_ROCKETS: u16 = 2010; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_STIMPACK` is never used [INFO] [stdout] --> src/doom.rs:320:11 [INFO] [stdout] | [INFO] [stdout] 320 | pub const ITEM_STIMPACK: u16 = 2011; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_MEDIKIT` is never used [INFO] [stdout] --> src/doom.rs:321:11 [INFO] [stdout] | [INFO] [stdout] 321 | pub const ITEM_MEDIKIT: u16 = 2012; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_SOULSPHERE` is never used [INFO] [stdout] --> src/doom.rs:322:11 [INFO] [stdout] | [INFO] [stdout] 322 | pub const ITEM_SOULSPHERE: u16 = 2013; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_HEALTH_BONUS` is never used [INFO] [stdout] --> src/doom.rs:323:11 [INFO] [stdout] | [INFO] [stdout] 323 | pub const ITEM_HEALTH_BONUS: u16 = 2014; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_ARMOR_BONUS` is never used [INFO] [stdout] --> src/doom.rs:324:11 [INFO] [stdout] | [INFO] [stdout] 324 | pub const ITEM_ARMOR_BONUS: u16 = 2015; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_GREEN_ARMOR` is never used [INFO] [stdout] --> src/doom.rs:325:11 [INFO] [stdout] | [INFO] [stdout] 325 | pub const ITEM_GREEN_ARMOR: u16 = 2018; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_BLUE_ARMOR` is never used [INFO] [stdout] --> src/doom.rs:326:11 [INFO] [stdout] | [INFO] [stdout] 326 | pub const ITEM_BLUE_ARMOR: u16 = 2019; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_INVULN` is never used [INFO] [stdout] --> src/doom.rs:327:11 [INFO] [stdout] | [INFO] [stdout] 327 | pub const ITEM_INVULN: u16 = 2022; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_BERSERK` is never used [INFO] [stdout] --> src/doom.rs:328:11 [INFO] [stdout] | [INFO] [stdout] 328 | pub const ITEM_BERSERK: u16 = 2023; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_INVIS` is never used [INFO] [stdout] --> src/doom.rs:329:11 [INFO] [stdout] | [INFO] [stdout] 329 | pub const ITEM_INVIS: u16 = 2024; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_RADSUIT` is never used [INFO] [stdout] --> src/doom.rs:330:11 [INFO] [stdout] | [INFO] [stdout] 330 | pub const ITEM_RADSUIT: u16 = 2025; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_MAP` is never used [INFO] [stdout] --> src/doom.rs:331:11 [INFO] [stdout] | [INFO] [stdout] 331 | pub const ITEM_MAP: u16 = 2026; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_BLUE` is never used [INFO] [stdout] --> src/doom.rs:334:11 [INFO] [stdout] | [INFO] [stdout] 334 | pub const KEY_BLUE: u16 = 5; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_YELLOW` is never used [INFO] [stdout] --> src/doom.rs:335:11 [INFO] [stdout] | [INFO] [stdout] 335 | pub const KEY_YELLOW: u16 = 6; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_RED` is never used [INFO] [stdout] --> src/doom.rs:336:11 [INFO] [stdout] | [INFO] [stdout] 336 | pub const KEY_RED: u16 = 13; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_BLUE_SKULL` is never used [INFO] [stdout] --> src/doom.rs:337:11 [INFO] [stdout] | [INFO] [stdout] 337 | pub const KEY_BLUE_SKULL: u16 = 40; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_YELLOW_SKULL` is never used [INFO] [stdout] --> src/doom.rs:338:11 [INFO] [stdout] | [INFO] [stdout] 338 | pub const KEY_YELLOW_SKULL: u16 = 39; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_RED_SKULL` is never used [INFO] [stdout] --> src/doom.rs:339:11 [INFO] [stdout] | [INFO] [stdout] 339 | pub const KEY_RED_SKULL: u16 = 38; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EFFECT_BLOOD` is never used [INFO] [stdout] --> src/doom.rs:342:11 [INFO] [stdout] | [INFO] [stdout] 342 | pub const EFFECT_BLOOD: u16 = 9999; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EFFECT_BLOOD_GREEN` is never used [INFO] [stdout] --> src/doom.rs:343:11 [INFO] [stdout] | [INFO] [stdout] 343 | pub const EFFECT_BLOOD_GREEN: u16 = 9997; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EFFECT_PUFF` is never used [INFO] [stdout] --> src/doom.rs:344:11 [INFO] [stdout] | [INFO] [stdout] 344 | pub const EFFECT_PUFF: u16 = 9998; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reset_rng` is never used [INFO] [stdout] --> src/doom.rs:380:8 [INFO] [stdout] | [INFO] [stdout] 380 | pub fn reset_rng() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reset_rng_to` is never used [INFO] [stdout] --> src/doom.rs:387:8 [INFO] [stdout] | [INFO] [stdout] 387 | pub fn reset_rng_to(index: usize) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `initial_health`, `pain_chance`, `sprite_name`, and `frame_char` are never used [INFO] [stdout] --> src/doom.rs:418:8 [INFO] [stdout] | [INFO] [stdout] 412 | pub trait DoomThingExt { [INFO] [stdout] | ------------ associated items in this trait [INFO] [stdout] ... [INFO] [stdout] 418 | fn initial_health(k: u16, world: &WorldState) -> f32; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 419 | fn pain_chance(k: u16, world: &WorldState) -> u8; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 420 | fn sprite_name<'a>(&self, world: &'a WorldState) -> &'a str; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 421 | fn frame_char(&self, world: &WorldState) -> char; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `S_NULL` is never used [INFO] [stdout] --> src/doom.rs:486:11 [INFO] [stdout] | [INFO] [stdout] 486 | pub const S_NULL: usize = 0; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `init_world` is never used [INFO] [stdout] --> src/doom.rs:6416:8 [INFO] [stdout] | [INFO] [stdout] 6416 | pub fn init_world(_world: &mut WorldState) {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple variants are never constructed [INFO] [stdout] --> src/doom.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub enum MonsterAction { [INFO] [stdout] | ------------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 14 | HeadAttack, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 15 | BruisAttack, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 16 | SkelMissile, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 17 | FatAttack, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 18 | VileChase, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 19 | VileAttack, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 20 | PainAttack, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | Raise, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MonsterAction` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `health`, `damage`, `reaction_time`, and `mass` are never read [INFO] [stdout] --> src/doom.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 39 | pub struct ThingDef { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 40 | pub health: f32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub damage: i32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 45 | pub reaction_time: i32, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 46 | pub pain_chance: u8, [INFO] [stdout] 47 | pub mass: i32, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ThingDef` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `position` is never read [INFO] [stdout] --> src/doom.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 50 | pub struct PuffThinker { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 51 | pub position: glam::Vec2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_IMP` is never used [INFO] [stdout] --> src/doom.rs:302:11 [INFO] [stdout] | [INFO] [stdout] 302 | pub const MONSTER_IMP: u16 = 3001; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/doom.rs:139:34 [INFO] [stdout] | [INFO] [stdout] 139 | ... .map(|idx| world.things.get(idx).map(|t| t.position)) [INFO] [stdout] | ________________________^ [INFO] [stdout] 140 | | ... .flatten() [INFO] [stdout] | |________________________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|idx| world.things.get(idx).map(|t| t.position))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_DEMON` is never used [INFO] [stdout] --> src/doom.rs:303:11 [INFO] [stdout] | [INFO] [stdout] 303 | pub const MONSTER_DEMON: u16 = 3002; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_BARON` is never used [INFO] [stdout] --> src/doom.rs:304:11 [INFO] [stdout] | [INFO] [stdout] 304 | pub const MONSTER_BARON: u16 = 3003; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_ZOMBIEMAN` is never used [INFO] [stdout] --> src/doom.rs:305:11 [INFO] [stdout] | [INFO] [stdout] 305 | pub const MONSTER_ZOMBIEMAN: u16 = 3004; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_CACODEMON` is never used [INFO] [stdout] --> src/doom.rs:306:11 [INFO] [stdout] | [INFO] [stdout] 306 | pub const MONSTER_CACODEMON: u16 = 3005; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_LOST_SOUL` is never used [INFO] [stdout] --> src/doom.rs:307:11 [INFO] [stdout] | [INFO] [stdout] 307 | pub const MONSTER_LOST_SOUL: u16 = 3006; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MONSTER_SERGEANT` is never used [INFO] [stdout] --> src/doom.rs:308:11 [INFO] [stdout] | [INFO] [stdout] 308 | pub const MONSTER_SERGEANT: u16 = 9; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_SHOTGUN` is never used [INFO] [stdout] --> src/doom.rs:311:11 [INFO] [stdout] | [INFO] [stdout] 311 | pub const ITEM_SHOTGUN: u16 = 2001; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_CHAINGUN` is never used [INFO] [stdout] --> src/doom.rs:312:11 [INFO] [stdout] | [INFO] [stdout] 312 | pub const ITEM_CHAINGUN: u16 = 2002; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_ROCKET_LAUNCHER` is never used [INFO] [stdout] --> src/doom.rs:313:11 [INFO] [stdout] | [INFO] [stdout] 313 | pub const ITEM_ROCKET_LAUNCHER: u16 = 2003; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_PLASMA_RIFLE` is never used [INFO] [stdout] --> src/doom.rs:314:11 [INFO] [stdout] | [INFO] [stdout] 314 | pub const ITEM_PLASMA_RIFLE: u16 = 2004; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_CHAINSAW` is never used [INFO] [stdout] --> src/doom.rs:315:11 [INFO] [stdout] | [INFO] [stdout] 315 | pub const ITEM_CHAINSAW: u16 = 2005; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_BFG9000` is never used [INFO] [stdout] --> src/doom.rs:316:11 [INFO] [stdout] | [INFO] [stdout] 316 | pub const ITEM_BFG9000: u16 = 2006; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_CLIP` is never used [INFO] [stdout] --> src/doom.rs:317:11 [INFO] [stdout] | [INFO] [stdout] 317 | pub const ITEM_CLIP: u16 = 2007; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_SHELLS` is never used [INFO] [stdout] --> src/doom.rs:318:11 [INFO] [stdout] | [INFO] [stdout] 318 | pub const ITEM_SHELLS: u16 = 2008; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_ROCKETS` is never used [INFO] [stdout] --> src/doom.rs:319:11 [INFO] [stdout] | [INFO] [stdout] 319 | pub const ITEM_ROCKETS: u16 = 2010; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_STIMPACK` is never used [INFO] [stdout] --> src/doom.rs:320:11 [INFO] [stdout] | [INFO] [stdout] 320 | pub const ITEM_STIMPACK: u16 = 2011; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_MEDIKIT` is never used [INFO] [stdout] --> src/doom.rs:321:11 [INFO] [stdout] | [INFO] [stdout] 321 | pub const ITEM_MEDIKIT: u16 = 2012; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_SOULSPHERE` is never used [INFO] [stdout] --> src/doom.rs:322:11 [INFO] [stdout] | [INFO] [stdout] 322 | pub const ITEM_SOULSPHERE: u16 = 2013; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_HEALTH_BONUS` is never used [INFO] [stdout] --> src/doom.rs:323:11 [INFO] [stdout] | [INFO] [stdout] 323 | pub const ITEM_HEALTH_BONUS: u16 = 2014; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_ARMOR_BONUS` is never used [INFO] [stdout] --> src/doom.rs:324:11 [INFO] [stdout] | [INFO] [stdout] 324 | pub const ITEM_ARMOR_BONUS: u16 = 2015; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_GREEN_ARMOR` is never used [INFO] [stdout] --> src/doom.rs:325:11 [INFO] [stdout] | [INFO] [stdout] 325 | pub const ITEM_GREEN_ARMOR: u16 = 2018; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_BLUE_ARMOR` is never used [INFO] [stdout] --> src/doom.rs:326:11 [INFO] [stdout] | [INFO] [stdout] 326 | pub const ITEM_BLUE_ARMOR: u16 = 2019; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_INVULN` is never used [INFO] [stdout] --> src/doom.rs:327:11 [INFO] [stdout] | [INFO] [stdout] 327 | pub const ITEM_INVULN: u16 = 2022; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_BERSERK` is never used [INFO] [stdout] --> src/doom.rs:328:11 [INFO] [stdout] | [INFO] [stdout] 328 | pub const ITEM_BERSERK: u16 = 2023; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_INVIS` is never used [INFO] [stdout] --> src/doom.rs:329:11 [INFO] [stdout] | [INFO] [stdout] 329 | pub const ITEM_INVIS: u16 = 2024; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_RADSUIT` is never used [INFO] [stdout] --> src/doom.rs:330:11 [INFO] [stdout] | [INFO] [stdout] 330 | pub const ITEM_RADSUIT: u16 = 2025; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ITEM_MAP` is never used [INFO] [stdout] --> src/doom.rs:331:11 [INFO] [stdout] | [INFO] [stdout] 331 | pub const ITEM_MAP: u16 = 2026; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_BLUE` is never used [INFO] [stdout] --> src/doom.rs:334:11 [INFO] [stdout] | [INFO] [stdout] 334 | pub const KEY_BLUE: u16 = 5; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_YELLOW` is never used [INFO] [stdout] --> src/doom.rs:335:11 [INFO] [stdout] | [INFO] [stdout] 335 | pub const KEY_YELLOW: u16 = 6; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_RED` is never used [INFO] [stdout] --> src/doom.rs:336:11 [INFO] [stdout] | [INFO] [stdout] 336 | pub const KEY_RED: u16 = 13; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_BLUE_SKULL` is never used [INFO] [stdout] --> src/doom.rs:337:11 [INFO] [stdout] | [INFO] [stdout] 337 | pub const KEY_BLUE_SKULL: u16 = 40; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_YELLOW_SKULL` is never used [INFO] [stdout] --> src/doom.rs:338:11 [INFO] [stdout] | [INFO] [stdout] 338 | pub const KEY_YELLOW_SKULL: u16 = 39; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEY_RED_SKULL` is never used [INFO] [stdout] --> src/doom.rs:339:11 [INFO] [stdout] | [INFO] [stdout] 339 | pub const KEY_RED_SKULL: u16 = 38; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EFFECT_BLOOD` is never used [INFO] [stdout] --> src/doom.rs:342:11 [INFO] [stdout] | [INFO] [stdout] 342 | pub const EFFECT_BLOOD: u16 = 9999; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EFFECT_BLOOD_GREEN` is never used [INFO] [stdout] --> src/doom.rs:343:11 [INFO] [stdout] | [INFO] [stdout] 343 | pub const EFFECT_BLOOD_GREEN: u16 = 9997; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EFFECT_PUFF` is never used [INFO] [stdout] --> src/doom.rs:344:11 [INFO] [stdout] | [INFO] [stdout] 344 | pub const EFFECT_PUFF: u16 = 9998; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reset_rng` is never used [INFO] [stdout] --> src/doom.rs:380:8 [INFO] [stdout] | [INFO] [stdout] 380 | pub fn reset_rng() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reset_rng_to` is never used [INFO] [stdout] --> src/doom.rs:387:8 [INFO] [stdout] | [INFO] [stdout] 387 | pub fn reset_rng_to(index: usize) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `initial_health`, `pain_chance`, `sprite_name`, and `frame_char` are never used [INFO] [stdout] --> src/doom.rs:418:8 [INFO] [stdout] | [INFO] [stdout] 412 | pub trait DoomThingExt { [INFO] [stdout] | ------------ associated items in this trait [INFO] [stdout] ... [INFO] [stdout] 418 | fn initial_health(k: u16, world: &WorldState) -> f32; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 419 | fn pain_chance(k: u16, world: &WorldState) -> u8; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 420 | fn sprite_name<'a>(&self, world: &'a WorldState) -> &'a str; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 421 | fn frame_char(&self, world: &WorldState) -> char; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `S_NULL` is never used [INFO] [stdout] --> src/doom.rs:486:11 [INFO] [stdout] | [INFO] [stdout] 486 | pub const S_NULL: usize = 0; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `init_world` is never used [INFO] [stdout] --> src/doom.rs:6416:8 [INFO] [stdout] | [INFO] [stdout] 6416 | pub fn init_world(_world: &mut WorldState) {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:227:21 [INFO] [stdout] | [INFO] [stdout] 227 | / if let Some(owner) = self.owner_thing_idx { [INFO] [stdout] 228 | | if i == owner { [INFO] [stdout] 229 | | continue; [INFO] [stdout] 230 | | } [INFO] [stdout] 231 | | } [INFO] [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] 227 ~ if let Some(owner) = self.owner_thing_idx [INFO] [stdout] 228 ~ && i == owner { [INFO] [stdout] 229 | continue; [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/doom.rs:442:29 [INFO] [stdout] | [INFO] [stdout] 442 | matches!(self.kind, 9997 | 9998 | 9999) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `9997..=9999` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/doom.rs:139:34 [INFO] [stdout] | [INFO] [stdout] 139 | ... .map(|idx| world.things.get(idx).map(|t| t.position)) [INFO] [stdout] | ________________________^ [INFO] [stdout] 140 | | ... .flatten() [INFO] [stdout] | |________________________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|idx| world.things.get(idx).map(|t| t.position))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:227:21 [INFO] [stdout] | [INFO] [stdout] 227 | / if let Some(owner) = self.owner_thing_idx { [INFO] [stdout] 228 | | if i == owner { [INFO] [stdout] 229 | | continue; [INFO] [stdout] 230 | | } [INFO] [stdout] 231 | | } [INFO] [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] 227 ~ if let Some(owner) = self.owner_thing_idx [INFO] [stdout] 228 ~ && i == owner { [INFO] [stdout] 229 | continue; [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/doom.rs:442:29 [INFO] [stdout] | [INFO] [stdout] 442 | matches!(self.kind, 9997 | 9998 | 9999) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `9997..=9999` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3553:13 [INFO] [stdout] | [INFO] [stdout] 3553 | / if (trial - other.position).length() < radius + other_radius { [INFO] [stdout] 3554 | | if (trial - other.position).length() [INFO] [stdout] 3555 | | < (monster.position - other.position).length() - 0.01 [INFO] [stdout] ... | [INFO] [stdout] 3559 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3553 ~ if (trial - other.position).length() < radius + other_radius [INFO] [stdout] 3554 ~ && (trial - other.position).length() [INFO] [stdout] 3555 | < (monster.position - other.position).length() - 0.01 [INFO] [stdout] 3556 | { [INFO] [stdout] 3557 | return false; [INFO] [stdout] 3558 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3576:21 [INFO] [stdout] | [INFO] [stdout] 3576 | / if line.is_portal() { [INFO] [stdout] 3577 | | if let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 3578 | | let front = &world.sectors[fs]; [INFO] [stdout] 3579 | | let back = &world.sectors[bs]; [INFO] [stdout] ... | [INFO] [stdout] 3589 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3576 ~ if line.is_portal() [INFO] [stdout] 3577 ~ && let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 3578 | let front = &world.sectors[fs]; [INFO] [stdout] ... [INFO] [stdout] 3587 | } [INFO] [stdout] 3588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3642:17 [INFO] [stdout] | [INFO] [stdout] 3642 | / if let Some(inflictor) = inflictor_idx { [INFO] [stdout] 3643 | | if inflictor != self.thing_idx { [INFO] [stdout] 3644 | | self.target_thing_idx = Some(inflictor); [INFO] [stdout] 3645 | | } [INFO] [stdout] 3646 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3642 ~ if let Some(inflictor) = inflictor_idx [INFO] [stdout] 3643 ~ && inflictor != self.thing_idx { [INFO] [stdout] 3644 | self.target_thing_idx = Some(inflictor); [INFO] [stdout] 3645 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3724:9 [INFO] [stdout] | [INFO] [stdout] 3724 | / if self.tics == 0 { [INFO] [stdout] 3725 | | if self.state_idx < STATES.len() { [INFO] [stdout] 3726 | | let next = STATES[self.state_idx].next_state; [INFO] [stdout] 3727 | | self.set_state(next, STATES); [INFO] [stdout] 3728 | | } [INFO] [stdout] 3729 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3724 ~ if self.tics == 0 [INFO] [stdout] 3725 ~ && self.state_idx < STATES.len() { [INFO] [stdout] 3726 | let next = STATES[self.state_idx].next_state; [INFO] [stdout] 3727 | self.set_state(next, STATES); [INFO] [stdout] 3728 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3735:13 [INFO] [stdout] | [INFO] [stdout] 3735 | / if self.state_idx < STATES.len() { [INFO] [stdout] 3736 | | if let Some(action) = STATES[self.state_idx].action { [INFO] [stdout] 3737 | | self.execute_action(action, world, &mut commands); [INFO] [stdout] 3738 | | } [INFO] [stdout] 3739 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3735 ~ if self.state_idx < STATES.len() [INFO] [stdout] 3736 ~ && let Some(action) = STATES[self.state_idx].action { [INFO] [stdout] 3737 | self.execute_action(action, world, &mut commands); [INFO] [stdout] 3738 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3753:9 [INFO] [stdout] | [INFO] [stdout] 3753 | / if !monster.is_flying() { [INFO] [stdout] 3754 | | if let Some(s_idx) = world.find_sector_at(monster.position) { [INFO] [stdout] 3755 | | let floor_z = world.sectors[s_idx].floor_height; [INFO] [stdout] 3756 | | let mut z_snap = 0.0; [INFO] [stdout] ... | [INFO] [stdout] 3777 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3753 ~ if !monster.is_flying() [INFO] [stdout] 3754 ~ && let Some(s_idx) = world.find_sector_at(monster.position) { [INFO] [stdout] 3755 | let floor_z = world.sectors[s_idx].floor_height; [INFO] [stdout] ... [INFO] [stdout] 3775 | } [INFO] [stdout] 3776 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3553:13 [INFO] [stdout] | [INFO] [stdout] 3553 | / if (trial - other.position).length() < radius + other_radius { [INFO] [stdout] 3554 | | if (trial - other.position).length() [INFO] [stdout] 3555 | | < (monster.position - other.position).length() - 0.01 [INFO] [stdout] ... | [INFO] [stdout] 3559 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3553 ~ if (trial - other.position).length() < radius + other_radius [INFO] [stdout] 3554 ~ && (trial - other.position).length() [INFO] [stdout] 3555 | < (monster.position - other.position).length() - 0.01 [INFO] [stdout] 3556 | { [INFO] [stdout] 3557 | return false; [INFO] [stdout] 3558 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3576:21 [INFO] [stdout] | [INFO] [stdout] 3576 | / if line.is_portal() { [INFO] [stdout] 3577 | | if let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 3578 | | let front = &world.sectors[fs]; [INFO] [stdout] 3579 | | let back = &world.sectors[bs]; [INFO] [stdout] ... | [INFO] [stdout] 3589 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3576 ~ if line.is_portal() [INFO] [stdout] 3577 ~ && let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 3578 | let front = &world.sectors[fs]; [INFO] [stdout] ... [INFO] [stdout] 3587 | } [INFO] [stdout] 3588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3642:17 [INFO] [stdout] | [INFO] [stdout] 3642 | / if let Some(inflictor) = inflictor_idx { [INFO] [stdout] 3643 | | if inflictor != self.thing_idx { [INFO] [stdout] 3644 | | self.target_thing_idx = Some(inflictor); [INFO] [stdout] 3645 | | } [INFO] [stdout] 3646 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3642 ~ if let Some(inflictor) = inflictor_idx [INFO] [stdout] 3643 ~ && inflictor != self.thing_idx { [INFO] [stdout] 3644 | self.target_thing_idx = Some(inflictor); [INFO] [stdout] 3645 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4041:21 [INFO] [stdout] | [INFO] [stdout] 4041 | / if let Some(ss) = self.subsectors.get(sidx) { [INFO] [stdout] 4042 | | if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | if tsid == sid { [INFO] [stdout] ... | [INFO] [stdout] 4053 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4041 ~ if let Some(ss) = self.subsectors.get(sidx) [INFO] [stdout] 4042 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] ... [INFO] [stdout] 4051 | } [INFO] [stdout] 4052 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4042:25 [INFO] [stdout] | [INFO] [stdout] 4042 | / if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | if tsid == sid { [INFO] [stdout] 4045 | | for i in 0..self.thinkers.len() { [INFO] [stdout] ... | [INFO] [stdout] 4052 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4042 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 4043 ~ && let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | if tsid == sid { [INFO] [stdout] ... [INFO] [stdout] 4050 | } [INFO] [stdout] 4051 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4043:29 [INFO] [stdout] | [INFO] [stdout] 4043 | / ... if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | ... if tsid == sid { [INFO] [stdout] 4045 | | ... for i in 0..self.thinkers.len() { [INFO] [stdout] 4046 | | ... let mut thinker = self.thinkers.remove(i); [INFO] [stdout] ... | [INFO] [stdout] 4051 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4043 ~ if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 4044 ~ && tsid == sid { [INFO] [stdout] 4045 | for i in 0..self.thinkers.len() { [INFO] [stdout] ... [INFO] [stdout] 4049 | } [INFO] [stdout] 4050 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3724:9 [INFO] [stdout] | [INFO] [stdout] 3724 | / if self.tics == 0 { [INFO] [stdout] 3725 | | if self.state_idx < STATES.len() { [INFO] [stdout] 3726 | | let next = STATES[self.state_idx].next_state; [INFO] [stdout] 3727 | | self.set_state(next, STATES); [INFO] [stdout] 3728 | | } [INFO] [stdout] 3729 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3724 ~ if self.tics == 0 [INFO] [stdout] 3725 ~ && self.state_idx < STATES.len() { [INFO] [stdout] 3726 | let next = STATES[self.state_idx].next_state; [INFO] [stdout] 3727 | self.set_state(next, STATES); [INFO] [stdout] 3728 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4057:13 [INFO] [stdout] | [INFO] [stdout] 4057 | / if h > 0 { [INFO] [stdout] 4058 | | if let Some(neighbors) = self.adjacent_sectors.get(sid) { [INFO] [stdout] 4059 | | for &neighbor in neighbors { [INFO] [stdout] 4060 | | queue.push((neighbor, h - 1)); [INFO] [stdout] ... | [INFO] [stdout] 4063 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4057 ~ if h > 0 [INFO] [stdout] 4058 ~ && let Some(neighbors) = self.adjacent_sectors.get(sid) { [INFO] [stdout] 4059 | for &neighbor in neighbors { [INFO] [stdout] 4060 | queue.push((neighbor, h - 1)); [INFO] [stdout] 4061 | } [INFO] [stdout] 4062 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3735:13 [INFO] [stdout] | [INFO] [stdout] 3735 | / if self.state_idx < STATES.len() { [INFO] [stdout] 3736 | | if let Some(action) = STATES[self.state_idx].action { [INFO] [stdout] 3737 | | self.execute_action(action, world, &mut commands); [INFO] [stdout] 3738 | | } [INFO] [stdout] 3739 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3735 ~ if self.state_idx < STATES.len() [INFO] [stdout] 3736 ~ && let Some(action) = STATES[self.state_idx].action { [INFO] [stdout] 3737 | self.execute_action(action, world, &mut commands); [INFO] [stdout] 3738 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/doom.rs:4081:50 [INFO] [stdout] | [INFO] [stdout] 4081 | if self.menu_state != MenuState::None && self.frame_count % 35 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.frame_count.is_multiple_of(35)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:3753:9 [INFO] [stdout] | [INFO] [stdout] 3753 | / if !monster.is_flying() { [INFO] [stdout] 3754 | | if let Some(s_idx) = world.find_sector_at(monster.position) { [INFO] [stdout] 3755 | | let floor_z = world.sectors[s_idx].floor_height; [INFO] [stdout] 3756 | | let mut z_snap = 0.0; [INFO] [stdout] ... | [INFO] [stdout] 3777 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3753 ~ if !monster.is_flying() [INFO] [stdout] 3754 ~ && let Some(s_idx) = world.find_sector_at(monster.position) { [INFO] [stdout] 3755 | let floor_z = world.sectors[s_idx].floor_height; [INFO] [stdout] ... [INFO] [stdout] 3775 | } [INFO] [stdout] 3776 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4165:21 [INFO] [stdout] | [INFO] [stdout] 4165 | / if line.is_portal() { [INFO] [stdout] 4166 | | if let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 4167 | | let front = &self.sectors[fs]; [INFO] [stdout] 4168 | | let back = &self.sectors[bs]; [INFO] [stdout] ... | [INFO] [stdout] 4178 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4165 ~ if line.is_portal() [INFO] [stdout] 4166 ~ && let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 4167 | let front = &self.sectors[fs]; [INFO] [stdout] ... [INFO] [stdout] 4176 | } [INFO] [stdout] 4177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4254:9 [INFO] [stdout] | [INFO] [stdout] 4254 | / if !self.nodes.is_empty() { [INFO] [stdout] 4255 | | if let Some(sid) = self.find_sector_at(next_pos) { [INFO] [stdout] 4256 | | let sector = &mut self.sectors[sid]; [INFO] [stdout] ... | [INFO] [stdout] 4282 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4254 ~ if !self.nodes.is_empty() [INFO] [stdout] 4255 ~ && let Some(sid) = self.find_sector_at(next_pos) { [INFO] [stdout] 4256 | let sector = &mut self.sectors[sid]; [INFO] [stdout] ... [INFO] [stdout] 4280 | } [INFO] [stdout] 4281 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4041:21 [INFO] [stdout] | [INFO] [stdout] 4041 | / if let Some(ss) = self.subsectors.get(sidx) { [INFO] [stdout] 4042 | | if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | if tsid == sid { [INFO] [stdout] ... | [INFO] [stdout] 4053 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4041 ~ if let Some(ss) = self.subsectors.get(sidx) [INFO] [stdout] 4042 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] ... [INFO] [stdout] 4051 | } [INFO] [stdout] 4052 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4584:17 [INFO] [stdout] | [INFO] [stdout] 4584 | / if next_cooldown == 0 { [INFO] [stdout] 4585 | | next_cooldown = 10; [INFO] [stdout] 4586 | | final_weapon = next_weapon; [INFO] [stdout] 4587 | | next_weapon_state = WeaponState::Raising; [INFO] [stdout] 4588 | | } [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] 4583 ~ WeaponState::Lowering [INFO] [stdout] 4584 ~ if next_cooldown == 0 => { [INFO] [stdout] 4585 | next_cooldown = 10; [INFO] [stdout] 4586 | final_weapon = next_weapon; [INFO] [stdout] 4587 | next_weapon_state = WeaponState::Raising; [INFO] [stdout] 4588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4042:25 [INFO] [stdout] | [INFO] [stdout] 4042 | / if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 4043 | | if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | if tsid == sid { [INFO] [stdout] 4045 | | for i in 0..self.thinkers.len() { [INFO] [stdout] ... | [INFO] [stdout] 4052 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4042 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 4043 ~ && let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | if tsid == sid { [INFO] [stdout] ... [INFO] [stdout] 4050 | } [INFO] [stdout] 4051 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4591:17 [INFO] [stdout] | [INFO] [stdout] 4591 | / if next_cooldown == 0 { [INFO] [stdout] 4592 | | next_weapon_state = WeaponState::Ready; [INFO] [stdout] 4593 | | } [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] 4590 ~ WeaponState::Raising [INFO] [stdout] 4591 ~ if next_cooldown == 0 => { [INFO] [stdout] 4592 | next_weapon_state = WeaponState::Ready; [INFO] [stdout] 4593 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4043:29 [INFO] [stdout] | [INFO] [stdout] 4043 | / ... if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 4044 | | ... if tsid == sid { [INFO] [stdout] 4045 | | ... for i in 0..self.thinkers.len() { [INFO] [stdout] 4046 | | ... let mut thinker = self.thinkers.remove(i); [INFO] [stdout] ... | [INFO] [stdout] 4051 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4043 ~ if let Some(tsid) = self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 4044 ~ && tsid == sid { [INFO] [stdout] 4045 | for i in 0..self.thinkers.len() { [INFO] [stdout] ... [INFO] [stdout] 4049 | } [INFO] [stdout] 4050 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4057:13 [INFO] [stdout] | [INFO] [stdout] 4057 | / if h > 0 { [INFO] [stdout] 4058 | | if let Some(neighbors) = self.adjacent_sectors.get(sid) { [INFO] [stdout] 4059 | | for &neighbor in neighbors { [INFO] [stdout] 4060 | | queue.push((neighbor, h - 1)); [INFO] [stdout] ... | [INFO] [stdout] 4063 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4057 ~ if h > 0 [INFO] [stdout] 4058 ~ && let Some(neighbors) = self.adjacent_sectors.get(sid) { [INFO] [stdout] 4059 | for &neighbor in neighbors { [INFO] [stdout] 4060 | queue.push((neighbor, h - 1)); [INFO] [stdout] 4061 | } [INFO] [stdout] 4062 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4338:17 [INFO] [stdout] | [INFO] [stdout] 4338 | / if let Some(idx) = current_ammo_idx { [INFO] [stdout] 4339 | | if self.player.ammo[idx] == 0 { [INFO] [stdout] 4340 | | for next_w in [ [INFO] [stdout] 4341 | | WeaponType::BFG9000, [INFO] [stdout] ... | [INFO] [stdout] 4361 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4338 ~ if let Some(idx) = current_ammo_idx [INFO] [stdout] 4339 ~ && self.player.ammo[idx] == 0 { [INFO] [stdout] 4340 | for next_w in [ [INFO] [stdout] ... [INFO] [stdout] 4359 | } [INFO] [stdout] 4360 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/doom.rs:4081:50 [INFO] [stdout] | [INFO] [stdout] 4081 | if self.menu_state != MenuState::None && self.frame_count % 35 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.frame_count.is_multiple_of(35)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4165:21 [INFO] [stdout] | [INFO] [stdout] 4165 | / if line.is_portal() { [INFO] [stdout] 4166 | | if let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 4167 | | let front = &self.sectors[fs]; [INFO] [stdout] 4168 | | let back = &self.sectors[bs]; [INFO] [stdout] ... | [INFO] [stdout] 4178 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4165 ~ if line.is_portal() [INFO] [stdout] 4166 ~ && let (Some(fs), Some(bs)) = (line.sector_front, line.sector_back) { [INFO] [stdout] 4167 | let front = &self.sectors[fs]; [INFO] [stdout] ... [INFO] [stdout] 4176 | } [INFO] [stdout] 4177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4254:9 [INFO] [stdout] | [INFO] [stdout] 4254 | / if !self.nodes.is_empty() { [INFO] [stdout] 4255 | | if let Some(sid) = self.find_sector_at(next_pos) { [INFO] [stdout] 4256 | | let sector = &mut self.sectors[sid]; [INFO] [stdout] ... | [INFO] [stdout] 4282 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4254 ~ if !self.nodes.is_empty() [INFO] [stdout] 4255 ~ && let Some(sid) = self.find_sector_at(next_pos) { [INFO] [stdout] 4256 | let sector = &mut self.sectors[sid]; [INFO] [stdout] ... [INFO] [stdout] 4280 | } [INFO] [stdout] 4281 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/doom.rs:4663:24 [INFO] [stdout] | [INFO] [stdout] 4663 | if t >= -0.1 && t <= 1.1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-0.1..=1.1).contains(&t)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4584:17 [INFO] [stdout] | [INFO] [stdout] 4584 | / if next_cooldown == 0 { [INFO] [stdout] 4585 | | next_cooldown = 10; [INFO] [stdout] 4586 | | final_weapon = next_weapon; [INFO] [stdout] 4587 | | next_weapon_state = WeaponState::Raising; [INFO] [stdout] 4588 | | } [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] 4583 ~ WeaponState::Lowering [INFO] [stdout] 4584 ~ if next_cooldown == 0 => { [INFO] [stdout] 4585 | next_cooldown = 10; [INFO] [stdout] 4586 | final_weapon = next_weapon; [INFO] [stdout] 4587 | next_weapon_state = WeaponState::Raising; [INFO] [stdout] 4588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4591:17 [INFO] [stdout] | [INFO] [stdout] 4591 | / if next_cooldown == 0 { [INFO] [stdout] 4592 | | next_weapon_state = WeaponState::Ready; [INFO] [stdout] 4593 | | } [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] 4590 ~ WeaponState::Raising [INFO] [stdout] 4591 ~ if next_cooldown == 0 => { [INFO] [stdout] 4592 | next_weapon_state = WeaponState::Ready; [INFO] [stdout] 4593 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4338:17 [INFO] [stdout] | [INFO] [stdout] 4338 | / if let Some(idx) = current_ammo_idx { [INFO] [stdout] 4339 | | if self.player.ammo[idx] == 0 { [INFO] [stdout] 4340 | | for next_w in [ [INFO] [stdout] 4341 | | WeaponType::BFG9000, [INFO] [stdout] ... | [INFO] [stdout] 4361 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4338 ~ if let Some(idx) = current_ammo_idx [INFO] [stdout] 4339 ~ && self.player.ammo[idx] == 0 { [INFO] [stdout] 4340 | for next_w in [ [INFO] [stdout] ... [INFO] [stdout] 4359 | } [INFO] [stdout] 4360 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4720:17 [INFO] [stdout] | [INFO] [stdout] 4720 | / if let Some(sid) = sector_ids[i] { [INFO] [stdout] 4721 | | if sid < self.sectors.len() { [INFO] [stdout] 4722 | | let floor_z = self.sectors[sid].floor_height; [INFO] [stdout] 4723 | | if t.z > floor_z + 0.1 { [INFO] [stdout] ... | [INFO] [stdout] 4733 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4720 ~ if let Some(sid) = sector_ids[i] [INFO] [stdout] 4721 ~ && sid < self.sectors.len() { [INFO] [stdout] 4722 | let floor_z = self.sectors[sid].floor_height; [INFO] [stdout] ... [INFO] [stdout] 4731 | } [INFO] [stdout] 4732 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/doom.rs:5371:28 [INFO] [stdout] | [INFO] [stdout] 5371 | if !thing.is_monster() && !thing.is_barrel() && !(owner_is_player && i == 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(thing.is_monster() || thing.is_barrel() || owner_is_player && i == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4842:45 [INFO] [stdout] | [INFO] [stdout] 4842 | / ... if *state == DoorState::Closing { [INFO] [stdout] 4843 | | ... reverse_door = true; [INFO] [stdout] 4844 | | ... final_ceil_delta = 0.0; // Stop movement [INFO] [stdout] 4845 | | ... } [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] 4841 ~ SectorAction::Door { state, .. } [INFO] [stdout] 4842 ~ if *state == DoorState::Closing => { [INFO] [stdout] 4843 | reverse_door = true; [INFO] [stdout] 4844 | final_ceil_delta = 0.0; // Stop movement [INFO] [stdout] 4845 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4848:45 [INFO] [stdout] | [INFO] [stdout] 4848 | / ... if health > 0.0 { [INFO] [stdout] 4849 | | ... crush_damage = *damage; [INFO] [stdout] 4850 | | ... // Clamp to thing top [INFO] [stdout] 4851 | | ... let clamp_delta = (z + height) - s.ceiling_height; [INFO] [stdout] ... | [INFO] [stdout] 4856 | | ... } [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] 4847 ~ SectorAction::Crusher { damage, .. } [INFO] [stdout] 4848 ~ if health > 0.0 => { [INFO] [stdout] 4849 | crush_damage = *damage; [INFO] [stdout] ... [INFO] [stdout] 4855 | } [INFO] [stdout] 4856 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4870:25 [INFO] [stdout] | [INFO] [stdout] 4870 | / if reverse_door { [INFO] [stdout] 4871 | | if let SectorAction::Door { state, .. } = &mut s.action { [INFO] [stdout] 4872 | | *state = DoorState::Opening; [INFO] [stdout] 4873 | | } [INFO] [stdout] 4874 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4870 ~ if reverse_door [INFO] [stdout] 4871 ~ && let SectorAction::Door { state, .. } = &mut s.action { [INFO] [stdout] 4872 | *state = DoorState::Opening; [INFO] [stdout] 4873 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/doom.rs:4663:24 [INFO] [stdout] | [INFO] [stdout] 4663 | if t >= -0.1 && t <= 1.1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-0.1..=1.1).contains(&t)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4720:17 [INFO] [stdout] | [INFO] [stdout] 4720 | / if let Some(sid) = sector_ids[i] { [INFO] [stdout] 4721 | | if sid < self.sectors.len() { [INFO] [stdout] 4722 | | let floor_z = self.sectors[sid].floor_height; [INFO] [stdout] 4723 | | if t.z > floor_z + 0.1 { [INFO] [stdout] ... | [INFO] [stdout] 4733 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4720 ~ if let Some(sid) = sector_ids[i] [INFO] [stdout] 4721 ~ && sid < self.sectors.len() { [INFO] [stdout] 4722 | let floor_z = self.sectors[sid].floor_height; [INFO] [stdout] ... [INFO] [stdout] 4731 | } [INFO] [stdout] 4732 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/doom.rs:5371:28 [INFO] [stdout] | [INFO] [stdout] 5371 | if !thing.is_monster() && !thing.is_barrel() && !(owner_is_player && i == 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(thing.is_monster() || thing.is_barrel() || owner_is_player && i == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4842:45 [INFO] [stdout] | [INFO] [stdout] 4842 | / ... if *state == DoorState::Closing { [INFO] [stdout] 4843 | | ... reverse_door = true; [INFO] [stdout] 4844 | | ... final_ceil_delta = 0.0; // Stop movement [INFO] [stdout] 4845 | | ... } [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] 4841 ~ SectorAction::Door { state, .. } [INFO] [stdout] 4842 ~ if *state == DoorState::Closing => { [INFO] [stdout] 4843 | reverse_door = true; [INFO] [stdout] 4844 | final_ceil_delta = 0.0; // Stop movement [INFO] [stdout] 4845 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/doom.rs:4848:45 [INFO] [stdout] | [INFO] [stdout] 4848 | / ... if health > 0.0 { [INFO] [stdout] 4849 | | ... crush_damage = *damage; [INFO] [stdout] 4850 | | ... // Clamp to thing top [INFO] [stdout] 4851 | | ... let clamp_delta = (z + height) - s.ceiling_height; [INFO] [stdout] ... | [INFO] [stdout] 4856 | | ... } [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] 4847 ~ SectorAction::Crusher { damage, .. } [INFO] [stdout] 4848 ~ if health > 0.0 => { [INFO] [stdout] 4849 | crush_damage = *damage; [INFO] [stdout] ... [INFO] [stdout] 4855 | } [INFO] [stdout] 4856 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:4870:25 [INFO] [stdout] | [INFO] [stdout] 4870 | / if reverse_door { [INFO] [stdout] 4871 | | if let SectorAction::Door { state, .. } = &mut s.action { [INFO] [stdout] 4872 | | *state = DoorState::Opening; [INFO] [stdout] 4873 | | } [INFO] [stdout] 4874 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 4870 ~ if reverse_door [INFO] [stdout] 4871 ~ && let SectorAction::Door { state, .. } = &mut s.action { [INFO] [stdout] 4872 | *state = DoorState::Opening; [INFO] [stdout] 4873 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5319:21 [INFO] [stdout] | [INFO] [stdout] 5319 | / if let Some(sid) = self.find_sector_at(self.player.position) { [INFO] [stdout] 5320 | | if sid == sector_idx { [INFO] [stdout] 5321 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] ... | [INFO] [stdout] 5330 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5319 ~ if let Some(sid) = self.find_sector_at(self.player.position) [INFO] [stdout] 5320 ~ && sid == sector_idx { [INFO] [stdout] 5321 | if self.player.invuln_timer == 0 { [INFO] [stdout] ... [INFO] [stdout] 5328 | } [INFO] [stdout] 5329 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5320:25 [INFO] [stdout] | [INFO] [stdout] 5320 | / if sid == sector_idx { [INFO] [stdout] 5321 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] 5323 | | self.player.armor -= absorbed; [INFO] [stdout] ... | [INFO] [stdout] 5329 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5320 ~ if sid == sector_idx [INFO] [stdout] 5321 ~ && self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] ... [INFO] [stdout] 5327 | } [INFO] [stdout] 5328 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5338:25 [INFO] [stdout] | [INFO] [stdout] 5338 | / if let Some(sid) = self.find_sector_at(t.position) { [INFO] [stdout] 5339 | | if sid == sector_idx { [INFO] [stdout] 5340 | | impacts.push((i, t.kind)); [INFO] [stdout] 5341 | | } [INFO] [stdout] 5342 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5338 ~ if let Some(sid) = self.find_sector_at(t.position) [INFO] [stdout] 5339 ~ && sid == sector_idx { [INFO] [stdout] 5340 | impacts.push((i, t.kind)); [INFO] [stdout] 5341 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5412:25 [INFO] [stdout] | [INFO] [stdout] 5412 | / if p_dmg > 0.0 { [INFO] [stdout] 5413 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5414 | | let absorbed = (p_dmg * 0.333).min(self.player.armor); [INFO] [stdout] 5415 | | self.player.armor -= absorbed; [INFO] [stdout] ... | [INFO] [stdout] 5420 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5412 ~ if p_dmg > 0.0 [INFO] [stdout] 5413 ~ && self.player.invuln_timer == 0 { [INFO] [stdout] 5414 | let absorbed = (p_dmg * 0.333).min(self.player.armor); [INFO] [stdout] ... [INFO] [stdout] 5418 | (self.player.damage_flash + 0.5).min(1.0); [INFO] [stdout] 5419 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5502:25 [INFO] [stdout] | [INFO] [stdout] 5502 | / if let Some(ss) = self.subsectors.get(sidx) { [INFO] [stdout] 5503 | | if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | | if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] ... | [INFO] [stdout] 5508 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5502 ~ if let Some(ss) = self.subsectors.get(sidx) [INFO] [stdout] 5503 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 | } [INFO] [stdout] 5507 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5503:29 [INFO] [stdout] | [INFO] [stdout] 5503 | / ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | | ... if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | | ... self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 | | ... } [INFO] [stdout] 5507 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5503 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 5504 ~ && let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5319:21 [INFO] [stdout] | [INFO] [stdout] 5319 | / if let Some(sid) = self.find_sector_at(self.player.position) { [INFO] [stdout] 5320 | | if sid == sector_idx { [INFO] [stdout] 5321 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] ... | [INFO] [stdout] 5330 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5319 ~ if let Some(sid) = self.find_sector_at(self.player.position) [INFO] [stdout] 5320 ~ && sid == sector_idx { [INFO] [stdout] 5321 | if self.player.invuln_timer == 0 { [INFO] [stdout] ... [INFO] [stdout] 5328 | } [INFO] [stdout] 5329 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5320:25 [INFO] [stdout] | [INFO] [stdout] 5320 | / if sid == sector_idx { [INFO] [stdout] 5321 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] 5323 | | self.player.armor -= absorbed; [INFO] [stdout] ... | [INFO] [stdout] 5329 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5320 ~ if sid == sector_idx [INFO] [stdout] 5321 ~ && self.player.invuln_timer == 0 { [INFO] [stdout] 5322 | let absorbed = (amount * 0.333).min(self.player.armor); [INFO] [stdout] ... [INFO] [stdout] 5327 | } [INFO] [stdout] 5328 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5338:25 [INFO] [stdout] | [INFO] [stdout] 5338 | / if let Some(sid) = self.find_sector_at(t.position) { [INFO] [stdout] 5339 | | if sid == sector_idx { [INFO] [stdout] 5340 | | impacts.push((i, t.kind)); [INFO] [stdout] 5341 | | } [INFO] [stdout] 5342 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5338 ~ if let Some(sid) = self.find_sector_at(t.position) [INFO] [stdout] 5339 ~ && sid == sector_idx { [INFO] [stdout] 5340 | impacts.push((i, t.kind)); [INFO] [stdout] 5341 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5616:21 [INFO] [stdout] | [INFO] [stdout] 5616 | / if let Some(sid) = sector_back { [INFO] [stdout] 5617 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5618 | | let sound = if speed > 4.0 { "DSBDOPN" } else { "DSDOROPN" }; [INFO] [stdout] 5619 | | self.audio_events.push(AudioEvent { [INFO] [stdout] ... | [INFO] [stdout] 5625 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5616 ~ if let Some(sid) = sector_back [INFO] [stdout] 5617 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5618 | let sound = if speed > 4.0 { "DSBDOPN" } else { "DSDOROPN" }; [INFO] [stdout] ... [INFO] [stdout] 5623 | }); [INFO] [stdout] 5624 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5412:25 [INFO] [stdout] | [INFO] [stdout] 5412 | / if p_dmg > 0.0 { [INFO] [stdout] 5413 | | if self.player.invuln_timer == 0 { [INFO] [stdout] 5414 | | let absorbed = (p_dmg * 0.333).min(self.player.armor); [INFO] [stdout] 5415 | | self.player.armor -= absorbed; [INFO] [stdout] ... | [INFO] [stdout] 5420 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5412 ~ if p_dmg > 0.0 [INFO] [stdout] 5413 ~ && self.player.invuln_timer == 0 { [INFO] [stdout] 5414 | let absorbed = (p_dmg * 0.333).min(self.player.armor); [INFO] [stdout] ... [INFO] [stdout] 5418 | (self.player.damage_flash + 0.5).min(1.0); [INFO] [stdout] 5419 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5652:25 [INFO] [stdout] | [INFO] [stdout] 5652 | / if let Some(sid) = sector_back { [INFO] [stdout] 5653 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5654 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5655 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5660 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5652 ~ if let Some(sid) = sector_back [INFO] [stdout] 5653 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5654 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5658 | }); [INFO] [stdout] 5659 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5683:25 [INFO] [stdout] | [INFO] [stdout] 5683 | / if let Some(sid) = sector_back { [INFO] [stdout] 5684 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5685 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5686 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5691 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5683 ~ if let Some(sid) = sector_back [INFO] [stdout] 5684 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5685 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5689 | }); [INFO] [stdout] 5690 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5502:25 [INFO] [stdout] | [INFO] [stdout] 5502 | / if let Some(ss) = self.subsectors.get(sidx) { [INFO] [stdout] 5503 | | if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | | if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] ... | [INFO] [stdout] 5508 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5502 ~ if let Some(ss) = self.subsectors.get(sidx) [INFO] [stdout] 5503 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 | } [INFO] [stdout] 5507 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5503:29 [INFO] [stdout] | [INFO] [stdout] 5503 | / ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5504 | | ... if let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | | ... self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 | | ... } [INFO] [stdout] 5507 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5503 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 5504 ~ && let Some(sid) = self.linedefs[seg.linedef_idx].sector_front { [INFO] [stdout] 5505 | self.player.z = self.sectors[sid].floor_height; [INFO] [stdout] 5506 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5714:25 [INFO] [stdout] | [INFO] [stdout] 5714 | / if let Some(sid) = sector_back { [INFO] [stdout] 5715 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5716 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5717 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5722 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5714 ~ if let Some(sid) = sector_back [INFO] [stdout] 5715 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5716 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5720 | }); [INFO] [stdout] 5721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5757:33 [INFO] [stdout] | [INFO] [stdout] 5757 | / ... if let Some(ss) = self.subsectors.get(ss_idx) { [INFO] [stdout] 5758 | | ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | | ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... | [INFO] [stdout] 5768 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5757 ~ if let Some(ss) = self.subsectors.get(ss_idx) [INFO] [stdout] 5758 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | if let Some(sid) = [INFO] [stdout] ... [INFO] [stdout] 5766 | } [INFO] [stdout] 5767 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5758:37 [INFO] [stdout] | [INFO] [stdout] 5758 | / ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | | ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... | [INFO] [stdout] 5767 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5758 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 5759 ~ && let Some(sid) = [INFO] [stdout] 5760 | self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... [INFO] [stdout] 5765 | } [INFO] [stdout] 5766 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5759:41 [INFO] [stdout] | [INFO] [stdout] 5759 | / ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 5761 | | ... { [INFO] [stdout] 5762 | | ... if sid == s_idx { [INFO] [stdout] ... | [INFO] [stdout] 5766 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5760 ~ self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 5761 ~ && sid == s_idx { [INFO] [stdout] 5762 | best_dest = Some(t); [INFO] [stdout] 5763 | break; [INFO] [stdout] 5764 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5616:21 [INFO] [stdout] | [INFO] [stdout] 5616 | / if let Some(sid) = sector_back { [INFO] [stdout] 5617 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5618 | | let sound = if speed > 4.0 { "DSBDOPN" } else { "DSDOROPN" }; [INFO] [stdout] 5619 | | self.audio_events.push(AudioEvent { [INFO] [stdout] ... | [INFO] [stdout] 5625 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5616 ~ if let Some(sid) = sector_back [INFO] [stdout] 5617 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5618 | let sound = if speed > 4.0 { "DSBDOPN" } else { "DSDOROPN" }; [INFO] [stdout] ... [INFO] [stdout] 5623 | }); [INFO] [stdout] 5624 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5652:25 [INFO] [stdout] | [INFO] [stdout] 5652 | / if let Some(sid) = sector_back { [INFO] [stdout] 5653 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5654 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5655 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5660 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5652 ~ if let Some(sid) = sector_back [INFO] [stdout] 5653 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5654 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5658 | }); [INFO] [stdout] 5659 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5683:25 [INFO] [stdout] | [INFO] [stdout] 5683 | / if let Some(sid) = sector_back { [INFO] [stdout] 5684 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5685 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5686 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5691 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5683 ~ if let Some(sid) = sector_back [INFO] [stdout] 5684 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5685 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5689 | }); [INFO] [stdout] 5690 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5906:21 [INFO] [stdout] | [INFO] [stdout] 5906 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5906 - return true; [INFO] [stdout] 5906 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5714:25 [INFO] [stdout] | [INFO] [stdout] 5714 | / if let Some(sid) = sector_back { [INFO] [stdout] 5715 | | if self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5716 | | self.audio_events.push(AudioEvent { [INFO] [stdout] 5717 | | sound_id: "DSDOROPN".into(), [INFO] [stdout] ... | [INFO] [stdout] 5722 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5714 ~ if let Some(sid) = sector_back [INFO] [stdout] 5715 ~ && self.trigger_door(sid, speed, wait) { [INFO] [stdout] 5716 | self.audio_events.push(AudioEvent { [INFO] [stdout] ... [INFO] [stdout] 5720 | }); [INFO] [stdout] 5721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5917:21 [INFO] [stdout] | [INFO] [stdout] 5917 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5917 - return true; [INFO] [stdout] 5917 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5935:21 [INFO] [stdout] | [INFO] [stdout] 5935 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5935 - return true; [INFO] [stdout] 5935 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5946:21 [INFO] [stdout] | [INFO] [stdout] 5946 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5946 - return true; [INFO] [stdout] 5946 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5757:33 [INFO] [stdout] | [INFO] [stdout] 5757 | / ... if let Some(ss) = self.subsectors.get(ss_idx) { [INFO] [stdout] 5758 | | ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | | ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... | [INFO] [stdout] 5768 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5757 ~ if let Some(ss) = self.subsectors.get(ss_idx) [INFO] [stdout] 5758 ~ && let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | if let Some(sid) = [INFO] [stdout] ... [INFO] [stdout] 5766 | } [INFO] [stdout] 5767 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5758:37 [INFO] [stdout] | [INFO] [stdout] 5758 | / ... if let Some(seg) = self.segs.get(ss.first_seg_idx) { [INFO] [stdout] 5759 | | ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... | [INFO] [stdout] 5767 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5758 ~ if let Some(seg) = self.segs.get(ss.first_seg_idx) [INFO] [stdout] 5759 ~ && let Some(sid) = [INFO] [stdout] 5760 | self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] ... [INFO] [stdout] 5765 | } [INFO] [stdout] 5766 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5759:41 [INFO] [stdout] | [INFO] [stdout] 5759 | / ... if let Some(sid) = [INFO] [stdout] 5760 | | ... self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 5761 | | ... { [INFO] [stdout] 5762 | | ... if sid == s_idx { [INFO] [stdout] ... | [INFO] [stdout] 5766 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5760 ~ self.linedefs[seg.linedef_idx].sector_front [INFO] [stdout] 5761 ~ && sid == s_idx { [INFO] [stdout] 5762 | best_dest = Some(t); [INFO] [stdout] 5763 | break; [INFO] [stdout] 5764 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5971:13 [INFO] [stdout] | [INFO] [stdout] 5971 | / if self.sectors[i].tag == tag as i16 { [INFO] [stdout] 5972 | | if self.trigger_door(i, speed, wait) { [INFO] [stdout] 5973 | | triggered = true; [INFO] [stdout] 5974 | | } [INFO] [stdout] 5975 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5971 ~ if self.sectors[i].tag == tag as i16 [INFO] [stdout] 5972 ~ && self.trigger_door(i, speed, wait) { [INFO] [stdout] 5973 | triggered = true; [INFO] [stdout] 5974 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5906:21 [INFO] [stdout] | [INFO] [stdout] 5906 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5906 - return true; [INFO] [stdout] 5906 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5917:21 [INFO] [stdout] | [INFO] [stdout] 5917 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5917 - return true; [INFO] [stdout] 5917 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5982:13 [INFO] [stdout] | [INFO] [stdout] 5982 | / if s.tag == tag as i16 { [INFO] [stdout] 5983 | | if let SectorAction::None = s.action { [INFO] [stdout] 5984 | | let target = s.floor_height - 72.0; [INFO] [stdout] 5985 | | s.action = SectorAction::Lift { [INFO] [stdout] ... | [INFO] [stdout] 5993 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5982 ~ if s.tag == tag as i16 [INFO] [stdout] 5983 ~ && let SectorAction::None = s.action { [INFO] [stdout] 5984 | let target = s.floor_height - 72.0; [INFO] [stdout] ... [INFO] [stdout] 5991 | }; [INFO] [stdout] 5992 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5935:21 [INFO] [stdout] | [INFO] [stdout] 5935 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5935 - return true; [INFO] [stdout] 5935 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/doom.rs:5946:21 [INFO] [stdout] | [INFO] [stdout] 5946 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 5946 - return true; [INFO] [stdout] 5946 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5999:13 [INFO] [stdout] | [INFO] [stdout] 5999 | / if s.tag == tag as i16 { [INFO] [stdout] 6000 | | if let SectorAction::None = s.action { [INFO] [stdout] 6001 | | s.action = SectorAction::Crusher { [INFO] [stdout] 6002 | | state: CrusherState::GoingDown, [INFO] [stdout] ... | [INFO] [stdout] 6009 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5999 ~ if s.tag == tag as i16 [INFO] [stdout] 6000 ~ && let SectorAction::None = s.action { [INFO] [stdout] 6001 | s.action = SectorAction::Crusher { [INFO] [stdout] ... [INFO] [stdout] 6007 | }; [INFO] [stdout] 6008 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6076:9 [INFO] [stdout] | [INFO] [stdout] 6076 | / if let Some(s_idx) = self.find_sector_at(self.player.position) { [INFO] [stdout] 6077 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6078 | | let sector = &mut self.sectors[s_idx]; [INFO] [stdout] 6079 | | if sector.special_type == 9 && !sector.secret_found { [INFO] [stdout] ... | [INFO] [stdout] 6095 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6076 ~ if let Some(s_idx) = self.find_sector_at(self.player.position) [INFO] [stdout] 6077 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6078 | let sector = &mut self.sectors[s_idx]; [INFO] [stdout] ... [INFO] [stdout] 6093 | } [INFO] [stdout] 6094 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5971:13 [INFO] [stdout] | [INFO] [stdout] 5971 | / if self.sectors[i].tag == tag as i16 { [INFO] [stdout] 5972 | | if self.trigger_door(i, speed, wait) { [INFO] [stdout] 5973 | | triggered = true; [INFO] [stdout] 5974 | | } [INFO] [stdout] 5975 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5971 ~ if self.sectors[i].tag == tag as i16 [INFO] [stdout] 5972 ~ && self.trigger_door(i, speed, wait) { [INFO] [stdout] 5973 | triggered = true; [INFO] [stdout] 5974 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/doom.rs:6098:12 [INFO] [stdout] | [INFO] [stdout] 6098 | if self.frame_count % 32 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!self.frame_count.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6105:9 [INFO] [stdout] | [INFO] [stdout] 6105 | / if let Some(s_idx) = self.find_sector_at(self.player.position) { [INFO] [stdout] 6106 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6107 | | let special = self.sectors[s_idx].special_type; [INFO] [stdout] 6108 | | let damage = match special { [INFO] [stdout] ... | [INFO] [stdout] 6128 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6105 ~ if let Some(s_idx) = self.find_sector_at(self.player.position) [INFO] [stdout] 6106 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6107 | let special = self.sectors[s_idx].special_type; [INFO] [stdout] ... [INFO] [stdout] 6126 | } [INFO] [stdout] 6127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5982:13 [INFO] [stdout] | [INFO] [stdout] 5982 | / if s.tag == tag as i16 { [INFO] [stdout] 5983 | | if let SectorAction::None = s.action { [INFO] [stdout] 5984 | | let target = s.floor_height - 72.0; [INFO] [stdout] 5985 | | s.action = SectorAction::Lift { [INFO] [stdout] ... | [INFO] [stdout] 5993 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5982 ~ if s.tag == tag as i16 [INFO] [stdout] 5983 ~ && let SectorAction::None = s.action { [INFO] [stdout] 5984 | let target = s.floor_height - 72.0; [INFO] [stdout] ... [INFO] [stdout] 5991 | }; [INFO] [stdout] 5992 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6117:17 [INFO] [stdout] | [INFO] [stdout] 6117 | / if damage > 0 { [INFO] [stdout] 6118 | | if self.player.radsuit_timer == 0 { [INFO] [stdout] 6119 | | log::info!( [INFO] [stdout] 6120 | | "Player taking slime damage: {} (Sector Special {})", [INFO] [stdout] ... | [INFO] [stdout] 6126 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6117 ~ if damage > 0 [INFO] [stdout] 6118 ~ && self.player.radsuit_timer == 0 { [INFO] [stdout] 6119 | log::info!( [INFO] [stdout] ... [INFO] [stdout] 6124 | damage_targets.push((true, 0, damage as f32)); [INFO] [stdout] 6125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:5999:13 [INFO] [stdout] | [INFO] [stdout] 5999 | / if s.tag == tag as i16 { [INFO] [stdout] 6000 | | if let SectorAction::None = s.action { [INFO] [stdout] 6001 | | s.action = SectorAction::Crusher { [INFO] [stdout] 6002 | | state: CrusherState::GoingDown, [INFO] [stdout] ... | [INFO] [stdout] 6009 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 5999 ~ if s.tag == tag as i16 [INFO] [stdout] 6000 ~ && let SectorAction::None = s.action { [INFO] [stdout] 6001 | s.action = SectorAction::Crusher { [INFO] [stdout] ... [INFO] [stdout] 6007 | }; [INFO] [stdout] 6008 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6135:13 [INFO] [stdout] | [INFO] [stdout] 6135 | / if let Some(s_idx) = self.find_sector_at(t.position) { [INFO] [stdout] 6136 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6137 | | let special = self.sectors[s_idx].special_type; [INFO] [stdout] 6138 | | let damage = match special { [INFO] [stdout] ... | [INFO] [stdout] 6152 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6135 ~ if let Some(s_idx) = self.find_sector_at(t.position) [INFO] [stdout] 6136 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6137 | let special = self.sectors[s_idx].special_type; [INFO] [stdout] ... [INFO] [stdout] 6150 | } [INFO] [stdout] 6151 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6076:9 [INFO] [stdout] | [INFO] [stdout] 6076 | / if let Some(s_idx) = self.find_sector_at(self.player.position) { [INFO] [stdout] 6077 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6078 | | let sector = &mut self.sectors[s_idx]; [INFO] [stdout] 6079 | | if sector.special_type == 9 && !sector.secret_found { [INFO] [stdout] ... | [INFO] [stdout] 6095 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6076 ~ if let Some(s_idx) = self.find_sector_at(self.player.position) [INFO] [stdout] 6077 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6078 | let sector = &mut self.sectors[s_idx]; [INFO] [stdout] ... [INFO] [stdout] 6093 | } [INFO] [stdout] 6094 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/doom.rs:6098:12 [INFO] [stdout] | [INFO] [stdout] 6098 | if self.frame_count % 32 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!self.frame_count.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6105:9 [INFO] [stdout] | [INFO] [stdout] 6105 | / if let Some(s_idx) = self.find_sector_at(self.player.position) { [INFO] [stdout] 6106 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6107 | | let special = self.sectors[s_idx].special_type; [INFO] [stdout] 6108 | | let damage = match special { [INFO] [stdout] ... | [INFO] [stdout] 6128 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6105 ~ if let Some(s_idx) = self.find_sector_at(self.player.position) [INFO] [stdout] 6106 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6107 | let special = self.sectors[s_idx].special_type; [INFO] [stdout] ... [INFO] [stdout] 6126 | } [INFO] [stdout] 6127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6117:17 [INFO] [stdout] | [INFO] [stdout] 6117 | / if damage > 0 { [INFO] [stdout] 6118 | | if self.player.radsuit_timer == 0 { [INFO] [stdout] 6119 | | log::info!( [INFO] [stdout] 6120 | | "Player taking slime damage: {} (Sector Special {})", [INFO] [stdout] ... | [INFO] [stdout] 6126 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6117 ~ if damage > 0 [INFO] [stdout] 6118 ~ && self.player.radsuit_timer == 0 { [INFO] [stdout] 6119 | log::info!( [INFO] [stdout] ... [INFO] [stdout] 6124 | damage_targets.push((true, 0, damage as f32)); [INFO] [stdout] 6125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/doom.rs:6135:13 [INFO] [stdout] | [INFO] [stdout] 6135 | / if let Some(s_idx) = self.find_sector_at(t.position) { [INFO] [stdout] 6136 | | if s_idx < self.sectors.len() { [INFO] [stdout] 6137 | | let special = self.sectors[s_idx].special_type; [INFO] [stdout] 6138 | | let damage = match special { [INFO] [stdout] ... | [INFO] [stdout] 6152 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6135 ~ if let Some(s_idx) = self.find_sector_at(t.position) [INFO] [stdout] 6136 ~ && s_idx < self.sectors.len() { [INFO] [stdout] 6137 | let special = self.sectors[s_idx].special_type; [INFO] [stdout] ... [INFO] [stdout] 6150 | } [INFO] [stdout] 6151 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / if let Some(idx) = args.iter().position(|a| a == "--wad") { [INFO] [stdout] 99 | | if idx + 1 < args.len() { [INFO] [stdout] 100 | | target_wad = args[idx + 1].clone(); [INFO] [stdout] 101 | | } [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ if let Some(idx) = args.iter().position(|a| a == "--wad") [INFO] [stdout] 99 ~ && idx + 1 < args.len() { [INFO] [stdout] 100 | target_wad = args[idx + 1].clone(); [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / if let Some(idx) = args.iter().position(|a| a == "--wad") { [INFO] [stdout] 99 | | if idx + 1 < args.len() { [INFO] [stdout] 100 | | target_wad = args[idx + 1].clone(); [INFO] [stdout] 101 | | } [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ if let Some(idx) = args.iter().position(|a| a == "--wad") [INFO] [stdout] 99 ~ && idx + 1 < args.len() { [INFO] [stdout] 100 | target_wad = args[idx + 1].clone(); [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:317:25 [INFO] [stdout] | [INFO] [stdout] 317 | / match keyboard_input.scancode { [INFO] [stdout] 318 | | 1 => mapped_key = Some(VirtualKeyCode::Escape), // Generic fallback [INFO] [stdout] 319 | | _ => {} [INFO] [stdout] 320 | | } [INFO] [stdout] | |_________________________^ help: try: `if keyboard_input.scancode == 1 { mapped_key = Some(VirtualKeyCode::Escape) }` [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:317:25 [INFO] [stdout] | [INFO] [stdout] 317 | / match keyboard_input.scancode { [INFO] [stdout] 318 | | 1 => mapped_key = Some(VirtualKeyCode::Escape), // Generic fallback [INFO] [stdout] 319 | | _ => {} [INFO] [stdout] 320 | | } [INFO] [stdout] | |_________________________^ help: try: `if keyboard_input.scancode == 1 { mapped_key = Some(VirtualKeyCode::Escape) }` [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:410:29 [INFO] [stdout] | [INFO] [stdout] 410 | / ... if key == VirtualKeyCode::Up || key == VirtualKeyCode::W { [INFO] [stdout] 411 | | ... if world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] 412 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 410 ~ if (key == VirtualKeyCode::Up || key == VirtualKeyCode::W) { [INFO] [stdout] 411 ~ && world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:413:29 [INFO] [stdout] | [INFO] [stdout] 413 | / ... if key == VirtualKeyCode::Down || key == VirtualKeyCode::S { [INFO] [stdout] 414 | | ... if world.menu_selection < main_options.len() - 1 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] 415 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 413 ~ if (key == VirtualKeyCode::Down || key == VirtualKeyCode::S) { [INFO] [stdout] 414 ~ && world.menu_selection < main_options.len() - 1 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:431:29 [INFO] [stdout] | [INFO] [stdout] 431 | / ... if key == VirtualKeyCode::Up || key == VirtualKeyCode::W { [INFO] [stdout] 432 | | ... if world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] 433 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 (key == VirtualKeyCode::Up || key == VirtualKeyCode::W) { [INFO] [stdout] 432 ~ && world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:434:29 [INFO] [stdout] | [INFO] [stdout] 434 | / ... if key == VirtualKeyCode::Down || key == VirtualKeyCode::S { [INFO] [stdout] 435 | | ... if world.menu_selection < 3 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] 436 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 434 ~ if (key == VirtualKeyCode::Down || key == VirtualKeyCode::S) { [INFO] [stdout] 435 ~ && world.menu_selection < 3 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:410:29 [INFO] [stdout] | [INFO] [stdout] 410 | / ... if key == VirtualKeyCode::Up || key == VirtualKeyCode::W { [INFO] [stdout] 411 | | ... if world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] 412 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 410 ~ if (key == VirtualKeyCode::Up || key == VirtualKeyCode::W) { [INFO] [stdout] 411 ~ && world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:413:29 [INFO] [stdout] | [INFO] [stdout] 413 | / ... if key == VirtualKeyCode::Down || key == VirtualKeyCode::S { [INFO] [stdout] 414 | | ... if world.menu_selection < main_options.len() - 1 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] 415 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 413 ~ if (key == VirtualKeyCode::Down || key == VirtualKeyCode::S) { [INFO] [stdout] 414 ~ && world.menu_selection < main_options.len() - 1 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:447:29 [INFO] [stdout] | [INFO] [stdout] 447 | / ... if key == VirtualKeyCode::Up || key == VirtualKeyCode::W { [INFO] [stdout] 448 | | ... if world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] 449 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 447 ~ if (key == VirtualKeyCode::Up || key == VirtualKeyCode::W) { [INFO] [stdout] 448 ~ && world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:450:29 [INFO] [stdout] | [INFO] [stdout] 450 | / ... if key == VirtualKeyCode::Down || key == VirtualKeyCode::S { [INFO] [stdout] 451 | | ... if world.menu_selection < 4 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] 452 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 450 ~ if (key == VirtualKeyCode::Down || key == VirtualKeyCode::S) { [INFO] [stdout] 451 ~ && world.menu_selection < 4 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:431:29 [INFO] [stdout] | [INFO] [stdout] 431 | / ... if key == VirtualKeyCode::Up || key == VirtualKeyCode::W { [INFO] [stdout] 432 | | ... if world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] 433 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 (key == VirtualKeyCode::Up || key == VirtualKeyCode::W) { [INFO] [stdout] 432 ~ && world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:434:29 [INFO] [stdout] | [INFO] [stdout] 434 | / ... if key == VirtualKeyCode::Down || key == VirtualKeyCode::S { [INFO] [stdout] 435 | | ... if world.menu_selection < 3 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] 436 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 434 ~ if (key == VirtualKeyCode::Down || key == VirtualKeyCode::S) { [INFO] [stdout] 435 ~ && world.menu_selection < 3 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:447:29 [INFO] [stdout] | [INFO] [stdout] 447 | / ... if key == VirtualKeyCode::Up || key == VirtualKeyCode::W { [INFO] [stdout] 448 | | ... if world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] 449 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 447 ~ if (key == VirtualKeyCode::Up || key == VirtualKeyCode::W) { [INFO] [stdout] 448 ~ && world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:450:29 [INFO] [stdout] | [INFO] [stdout] 450 | / ... if key == VirtualKeyCode::Down || key == VirtualKeyCode::S { [INFO] [stdout] 451 | | ... if world.menu_selection < 4 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] 452 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 450 ~ if (key == VirtualKeyCode::Down || key == VirtualKeyCode::S) { [INFO] [stdout] 451 ~ && world.menu_selection < 4 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:498:29 [INFO] [stdout] | [INFO] [stdout] 498 | / ... if key == VirtualKeyCode::Up || key == VirtualKeyCode::W { [INFO] [stdout] 499 | | ... if world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] 500 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 498 ~ if (key == VirtualKeyCode::Up || key == VirtualKeyCode::W) { [INFO] [stdout] 499 ~ && world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:501:29 [INFO] [stdout] | [INFO] [stdout] 501 | / ... if key == VirtualKeyCode::Down || key == VirtualKeyCode::S { [INFO] [stdout] 502 | | ... if world.menu_selection < 5 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] 503 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 501 ~ if (key == VirtualKeyCode::Down || key == VirtualKeyCode::S) { [INFO] [stdout] 502 ~ && world.menu_selection < 5 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:498:29 [INFO] [stdout] | [INFO] [stdout] 498 | / ... if key == VirtualKeyCode::Up || key == VirtualKeyCode::W { [INFO] [stdout] 499 | | ... if world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] 500 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 498 ~ if (key == VirtualKeyCode::Up || key == VirtualKeyCode::W) { [INFO] [stdout] 499 ~ && world.menu_selection > 0 { world.menu_selection -= 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:501:29 [INFO] [stdout] | [INFO] [stdout] 501 | / ... if key == VirtualKeyCode::Down || key == VirtualKeyCode::S { [INFO] [stdout] 502 | | ... if world.menu_selection < 5 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] 503 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 501 ~ if (key == VirtualKeyCode::Down || key == VirtualKeyCode::S) { [INFO] [stdout] 502 ~ && world.menu_selection < 5 { world.menu_selection += 1; _menu_cooldown = 10; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:545:21 [INFO] [stdout] | [INFO] [stdout] 545 | / if key == VirtualKeyCode::F9 { [INFO] [stdout] 546 | | if let Ok(json) = aetheris::infrastructure::savegame::io::quick_load() { [INFO] [stdout] 547 | | if let Ok(mut loaded_world) = serde_json::from_str::(&json) { [INFO] [stdout] 548 | | loaded_world.textures = world.textures.clone(); [INFO] [stdout] ... | [INFO] [stdout] 556 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 545 ~ if key == VirtualKeyCode::F9 [INFO] [stdout] 546 ~ && let Ok(json) = aetheris::infrastructure::savegame::io::quick_load() { [INFO] [stdout] 547 | if let Ok(mut loaded_world) = serde_json::from_str::(&json) { [INFO] [stdout] ... [INFO] [stdout] 554 | } [INFO] [stdout] 555 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:546:25 [INFO] [stdout] | [INFO] [stdout] 546 | / if let Ok(json) = aetheris::infrastructure::savegame::io::quick_load() { [INFO] [stdout] 547 | | if let Ok(mut loaded_world) = serde_json::from_str::(&json) { [INFO] [stdout] 548 | | loaded_world.textures = world.textures.clone(); [INFO] [stdout] 549 | | loaded_world.thinkers.clear(); [INFO] [stdout] ... | [INFO] [stdout] 555 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 546 ~ if let Ok(json) = aetheris::infrastructure::savegame::io::quick_load() [INFO] [stdout] 547 ~ && let Ok(mut loaded_world) = serde_json::from_str::(&json) { [INFO] [stdout] 548 | loaded_world.textures = world.textures.clone(); [INFO] [stdout] ... [INFO] [stdout] 553 | intermission_timer = 0.0; [INFO] [stdout] 554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:545:21 [INFO] [stdout] | [INFO] [stdout] 545 | / if key == VirtualKeyCode::F9 { [INFO] [stdout] 546 | | if let Ok(json) = aetheris::infrastructure::savegame::io::quick_load() { [INFO] [stdout] 547 | | if let Ok(mut loaded_world) = serde_json::from_str::(&json) { [INFO] [stdout] 548 | | loaded_world.textures = world.textures.clone(); [INFO] [stdout] ... | [INFO] [stdout] 556 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 545 ~ if key == VirtualKeyCode::F9 [INFO] [stdout] 546 ~ && let Ok(json) = aetheris::infrastructure::savegame::io::quick_load() { [INFO] [stdout] 547 | if let Ok(mut loaded_world) = serde_json::from_str::(&json) { [INFO] [stdout] ... [INFO] [stdout] 554 | } [INFO] [stdout] 555 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:546:25 [INFO] [stdout] | [INFO] [stdout] 546 | / if let Ok(json) = aetheris::infrastructure::savegame::io::quick_load() { [INFO] [stdout] 547 | | if let Ok(mut loaded_world) = serde_json::from_str::(&json) { [INFO] [stdout] 548 | | loaded_world.textures = world.textures.clone(); [INFO] [stdout] 549 | | loaded_world.thinkers.clear(); [INFO] [stdout] ... | [INFO] [stdout] 555 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 546 ~ if let Ok(json) = aetheris::infrastructure::savegame::io::quick_load() [INFO] [stdout] 547 ~ && let Ok(mut loaded_world) = serde_json::from_str::(&json) { [INFO] [stdout] 548 | loaded_world.textures = world.textures.clone(); [INFO] [stdout] ... [INFO] [stdout] 553 | intermission_timer = 0.0; [INFO] [stdout] 554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 13s [INFO] running `Command { std: "docker" "inspect" "dfc7aaa444f58a6911c1af23520b1ce1bcfbd839453c9ea729b48f32cc2f8815", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dfc7aaa444f58a6911c1af23520b1ce1bcfbd839453c9ea729b48f32cc2f8815", kill_on_drop: false }` [INFO] [stdout] dfc7aaa444f58a6911c1af23520b1ce1bcfbd839453c9ea729b48f32cc2f8815