[INFO] cloning repository https://github.com/windlikeyou/sokoban [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/windlikeyou/sokoban" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwindlikeyou%2Fsokoban", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwindlikeyou%2Fsokoban'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7a884d95b945f67bda5365773644c8724399b51d [INFO] linting windlikeyou/sokoban against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwindlikeyou%2Fsokoban" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-0-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/windlikeyou/sokoban [INFO] finished tweaking git repo https://github.com/windlikeyou/sokoban [INFO] tweaked toml for git repo https://github.com/windlikeyou/sokoban written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/windlikeyou/sokoban 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/windlikeyou/sokoban 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 crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded symphonia v0.5.5 [INFO] [stderr] Downloaded smart-default v0.7.1 [INFO] [stderr] Downloaded wgpu-types v0.16.1 [INFO] [stderr] Downloaded hecs v0.10.5 [INFO] [stderr] Downloaded crevice-derive v0.10.0 [INFO] [stderr] Downloaded lyon v1.0.16 [INFO] [stderr] Downloaded ordered-float v3.9.2 [INFO] [stderr] Downloaded crevice v0.13.0 [INFO] [stderr] Downloaded symphonia-bundle-mp3 v0.5.5 [INFO] [stderr] Downloaded glyph_brush_draw_cache v0.1.6 [INFO] [stderr] Downloaded lyon_geom v1.0.18 [INFO] [stderr] Downloaded glyph_brush v0.7.12 [INFO] [stderr] Downloaded symphonia-metadata v0.5.5 [INFO] [stderr] Downloaded symphonia-core v0.5.5 [INFO] [stderr] Downloaded wgpu v0.16.3 [INFO] [stderr] Downloaded lyon_tessellation v1.0.16 [INFO] [stderr] Downloaded wgpu-core v0.16.1 [INFO] [stderr] Downloaded wgpu-hal v0.16.2 [INFO] [stderr] Downloaded ggez v0.9.3 [INFO] [stderr] Downloaded naga v0.12.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 82b3984c3d5f9aee8978b000db6c67c3264c3a51212510f27fc4046d08c65856 [INFO] running `Command { std: "docker" "start" "-a" "82b3984c3d5f9aee8978b000db6c67c3264c3a51212510f27fc4046d08c65856", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "82b3984c3d5f9aee8978b000db6c67c3264c3a51212510f27fc4046d08c65856", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "82b3984c3d5f9aee8978b000db6c67c3264c3a51212510f27fc4046d08c65856", kill_on_drop: false }` [INFO] [stdout] 82b3984c3d5f9aee8978b000db6c67c3264c3a51212510f27fc4046d08c65856 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 1b0ca5db0e063accae78df63c7792e474b7771b8af91116074491aa7b3f901ce [INFO] running `Command { std: "docker" "start" "-a" "1b0ca5db0e063accae78df63c7792e474b7771b8af91116074491aa7b3f901ce", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.104 [INFO] [stderr] Compiling zerocopy v0.8.31 [INFO] [stderr] Compiling xml-rs v0.8.28 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Compiling find-msvc-tools v0.1.6 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling wayland-sys v0.29.5 [INFO] [stderr] Compiling zmij v1.0.2 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling slotmap v1.1.1 [INFO] [stderr] Compiling camino v1.2.2 [INFO] [stderr] Compiling serde_json v1.0.148 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Checking euclid v0.22.11 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking fdeflate v0.3.7 [INFO] [stderr] Compiling error-chain v0.12.4 [INFO] [stderr] Compiling cc v1.2.51 [INFO] [stderr] Compiling khronos-egl v4.1.0 [INFO] [stderr] Checking nix v0.24.3 [INFO] [stderr] Compiling linux-raw-sys v0.11.0 [INFO] [stderr] Compiling pulldown-cmark v0.9.6 [INFO] [stderr] Compiling itoa v1.0.17 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking nix v0.25.1 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Checking gpu-descriptor-types v0.1.2 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking spirv v0.2.0+1.5.4 [INFO] [stderr] Compiling smithay-client-toolkit v0.16.1 [INFO] [stderr] Checking gpu-alloc-types v0.2.0 [INFO] [stderr] Checking raw-window-handle v0.5.2 [INFO] [stderr] Compiling unicase v2.8.1 [INFO] [stderr] Compiling once_cell v1.21.3 [INFO] [stderr] Compiling same-file v1.0.6 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Compiling quote v1.0.42 [INFO] [stderr] Compiling zstd-safe v5.0.2+zstd.1.5.2 [INFO] [stderr] Compiling fastrand v2.3.0 [INFO] [stderr] Compiling walkdir v2.5.0 [INFO] [stderr] Checking lyon_geom v1.0.18 [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Compiling wayland-scanner v0.29.5 [INFO] [stderr] Checking gpu-alloc v0.5.4 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking ash v0.37.3+1.3.251 [INFO] [stderr] Checking wgpu-types v0.16.1 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking memmap2 v0.5.10 [INFO] [stderr] Checking lyon_path v1.0.16 [INFO] [stderr] Checking glow v0.12.3 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking weezl v0.1.12 [INFO] [stderr] Compiling bytecount v0.6.9 [INFO] [stderr] Compiling tempfile v3.24.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking inotify v0.10.2 [INFO] [stderr] Checking alsa v0.9.1 [INFO] [stderr] Checking wayland-commons v0.29.5 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Compiling memoffset v0.8.0 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Checking float_next_after v1.0.0 [INFO] [stderr] Checking jpeg-decoder v0.3.2 [INFO] [stderr] Checking xi-unicode v0.3.0 [INFO] [stderr] Compiling gilrs v0.10.10 [INFO] [stderr] Checking gpu-descriptor v0.2.4 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Compiling wayland-client v0.29.5 [INFO] [stderr] Compiling wayland-protocols v0.29.5 [INFO] [stderr] Compiling winit v0.28.7 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Compiling bzip2-sys v0.1.13+1.0.8 [INFO] [stderr] Checking glyph_brush_layout v0.2.4 [INFO] [stderr] Checking gilrs-core v0.5.15 [INFO] [stderr] Checking glyph_brush_draw_cache v0.1.6 [INFO] [stderr] Checking gif v0.13.3 [INFO] [stderr] Checking lyon_tessellation v1.0.16 [INFO] [stderr] Checking twox-hash v2.1.2 [INFO] [stderr] Checking tiff v0.9.1 [INFO] [stderr] Checking cpal v0.15.3 [INFO] [stderr] Checking lyon_algorithms v1.0.16 [INFO] [stderr] Checking ordered-float v5.1.0 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Checking claxon v0.4.3 [INFO] [stderr] Checking hound v3.5.1 [INFO] [stderr] Checking directories v5.0.1 [INFO] [stderr] Checking glam v0.24.2 [INFO] [stderr] Checking ordered-float v3.9.2 [INFO] [stderr] Checking pollster v0.3.0 [INFO] [stderr] Checking glyph_brush v0.7.12 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Compiling semver v1.0.27 [INFO] [stderr] Checking hecs v0.10.5 [INFO] [stderr] Checking lyon v1.0.16 [INFO] [stderr] Checking bzip2 v0.4.4 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling smart-default v0.7.1 [INFO] [stderr] Compiling crevice-derive v0.10.0 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking wayland-cursor v0.29.5 [INFO] [stderr] Checking naga v0.12.3 [INFO] [stderr] Checking calloop v0.10.6 [INFO] [stderr] Checking bytemuck v1.24.0 [INFO] [stderr] Checking symphonia-core v0.5.5 [INFO] [stderr] Checking tiny-skia-path v0.8.4 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking crevice v0.13.0 [INFO] [stderr] Checking tiny-skia v0.8.4 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling cargo-platform v0.1.9 [INFO] [stderr] Checking symphonia-metadata v0.5.5 [INFO] [stderr] Checking toml v0.5.11 [INFO] [stderr] Compiling cargo_metadata v0.14.2 [INFO] [stderr] Checking symphonia-bundle-mp3 v0.5.5 [INFO] [stderr] Compiling skeptic v0.13.7 [INFO] [stderr] Checking symphonia v0.5.5 [INFO] [stderr] Checking rodio v0.17.3 [INFO] [stderr] Compiling ggez v0.9.3 [INFO] [stderr] Checking zstd v0.11.2+zstd.1.5.2 [INFO] [stderr] Checking zip v0.6.6 [INFO] [stderr] Checking wgpu-hal v0.16.2 [INFO] [stderr] Checking wgpu-core v0.16.1 [INFO] [stderr] Checking wgpu v0.16.3 [INFO] [stderr] Checking sctk-adwaita v0.5.4 [INFO] [stderr] Checking rust-sokoban v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `World` [INFO] [stdout] --> src/main.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | use hecs::{ World}; [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: `map::initialize_level` [INFO] [stdout] --> src/main.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::{map::initialize_level, tool::Game}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `World` [INFO] [stdout] --> src/main.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | use hecs::{ World}; [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: `map::initialize_level` [INFO] [stdout] --> src/main.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::{map::initialize_level, tool::Game}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `entity` [INFO] [stdout] --> src/systems/rendering.rs:8:119 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::{component::{GamePlay, GameplayState, Position, Renderable, RenderableKind, Time}, constants::TITLE_WIDTH, entity, map::LE... [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Immovable` [INFO] [stdout] --> src/systems/gameplay.rs:5:63 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::component::{Box, BoxSpot, GamePlay, GameplayState, Immovable, Position, Wall}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `entity` [INFO] [stdout] --> src/systems/rendering.rs:8:119 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::{component::{GamePlay, GameplayState, Position, Renderable, RenderableKind, Time}, constants::TITLE_WIDTH, entity, map::LE... [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Immovable` [INFO] [stdout] --> src/systems/gameplay.rs:5:63 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::component::{Box, BoxSpot, GamePlay, GameplayState, Immovable, Position, Wall}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/systems/input.rs:29:24 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn run_input_print(world: &World, ctx: &mut ggez::Context) { [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/systems/input.rs:29:24 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn run_input_print(world: &World, ctx: &mut ggez::Context) { [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: method `play` is never used [INFO] [stdout] --> src/component.rs:142:12 [INFO] [stdout] | [INFO] [stdout] 140 | impl AudioStore { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 141 | /// 播放指定名称的音效 [INFO] [stdout] 142 | pub fn play(&mut self,ctx: &mut ggez::Context, sound: &str){ [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `input_system_duplicate` is never used [INFO] [stdout] --> src/systems/input.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn input_system_duplicate(world: &World, ctx: &mut ggez::Context) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_input_print` is never used [INFO] [stdout] --> src/systems/input.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn run_input_print(world: &World, ctx: &mut ggez::Context) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `entity` is never read [INFO] [stdout] --> src/systems/events.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct EntityMoved { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 10 | pub entity: Entity [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `EntityMoved` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/systems/events.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | EntityMoved(EntityMoved), [INFO] [stdout] | ----------- ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 26 - EntityMoved(EntityMoved), [INFO] [stdout] 26 + EntityMoved(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BoxPlacedOnSpot` is never constructed [INFO] [stdout] --> src/systems/events.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 22 | pub enum Event { [INFO] [stdout] | ----- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 28 | BoxPlacedOnSpot(BoxPlacedOnSpot) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Event` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_process_events` is never used [INFO] [stdout] --> src/systems/events.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_process_events(world: &mut World,ctx: &mut ggez::Context){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/entity.rs:79:57 [INFO] [stdout] | [INFO] [stdout] 79 | let sound_source = Source::new(ctx, sound_path).expect(&format!("failed to load sound {}", sound_name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("failed to load sound {}", sound_name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `play` is never used [INFO] [stdout] --> src/component.rs:142:12 [INFO] [stdout] | [INFO] [stdout] 140 | impl AudioStore { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 141 | /// 播放指定名称的音效 [INFO] [stdout] 142 | pub fn play(&mut self,ctx: &mut ggez::Context, sound: &str){ [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `input_system_duplicate` is never used [INFO] [stdout] --> src/systems/input.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn input_system_duplicate(world: &World, ctx: &mut ggez::Context) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_input_print` is never used [INFO] [stdout] --> src/systems/input.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn run_input_print(world: &World, ctx: &mut ggez::Context) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `entity` is never read [INFO] [stdout] --> src/systems/events.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct EntityMoved { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 10 | pub entity: Entity [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `EntityMoved` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/systems/events.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | EntityMoved(EntityMoved), [INFO] [stdout] | ----------- ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 26 - EntityMoved(EntityMoved), [INFO] [stdout] 26 + EntityMoved(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BoxPlacedOnSpot` is never constructed [INFO] [stdout] --> src/systems/events.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 22 | pub enum Event { [INFO] [stdout] | ----- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 28 | BoxPlacedOnSpot(BoxPlacedOnSpot) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Event` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_process_events` is never used [INFO] [stdout] --> src/systems/events.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_process_events(world: &mut World,ctx: &mut ggez::Context){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/entity.rs:79:57 [INFO] [stdout] | [INFO] [stdout] 79 | let sound_source = Source::new(ctx, sound_path).expect(&format!("failed to load sound {}", sound_name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("failed to load sound {}", sound_name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/component.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | / if let Some(source) = self.sounds.get_mut(sound) { [INFO] [stdout] 144 | | if source.play_detached(ctx).is_ok() { [INFO] [stdout] 145 | | println!("play sound: {}", sound); [INFO] [stdout] 146 | | } [INFO] [stdout] 147 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 143 ~ if let Some(source) = self.sounds.get_mut(sound) [INFO] [stdout] 144 ~ && source.play_detached(ctx).is_ok() { [INFO] [stdout] 145 | println!("play sound: {}", sound); [INFO] [stdout] 146 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/component.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | / if let Some(source) = self.sounds.get_mut(sound) { [INFO] [stdout] 144 | | if source.play_detached(ctx).is_ok() { [INFO] [stdout] 145 | | println!("play sound: {}", sound); [INFO] [stdout] 146 | | } [INFO] [stdout] 147 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 143 ~ if let Some(source) = self.sounds.get_mut(sound) [INFO] [stdout] 144 ~ && source.play_detached(ctx).is_ok() { [INFO] [stdout] 145 | println!("play sound: {}", sound); [INFO] [stdout] 146 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool.rs:61:24 [INFO] [stdout] | [INFO] [stdout] 61 | } else if gameplay.state == GameplayState::Lost { [INFO] [stdout] | ________________________^ [INFO] [stdout] 62 | | if ctx.keyboard.is_key_just_pressed(KeyCode::R) { [INFO] [stdout] 63 | | next_action = Some(2); [INFO] [stdout] 64 | | } [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 61 ~ } else if gameplay.state == GameplayState::Lost [INFO] [stdout] 62 ~ && ctx.keyboard.is_key_just_pressed(KeyCode::R) { [INFO] [stdout] 63 | next_action = Some(2); [INFO] [stdout] 64 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool.rs:61:24 [INFO] [stdout] | [INFO] [stdout] 61 | } else if gameplay.state == GameplayState::Lost { [INFO] [stdout] | ________________________^ [INFO] [stdout] 62 | | if ctx.keyboard.is_key_just_pressed(KeyCode::R) { [INFO] [stdout] 63 | | next_action = Some(2); [INFO] [stdout] 64 | | } [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 61 ~ } else if gameplay.state == GameplayState::Lost [INFO] [stdout] 62 ~ && ctx.keyboard.is_key_just_pressed(KeyCode::R) { [INFO] [stdout] 63 | next_action = Some(2); [INFO] [stdout] 64 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> src/tool.rs:124:27 [INFO] [stdout] | [INFO] [stdout] 124 | let start_index = if self.current_level > 5 { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 125 | | self.current_level - 5 [INFO] [stdout] 126 | | } else { [INFO] [stdout] 127 | | 0 [INFO] [stdout] 128 | | }; [INFO] [stdout] | |_________^ help: replace it with: `self.current_level.saturating_sub(5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> src/tool.rs:124:27 [INFO] [stdout] | [INFO] [stdout] 124 | let start_index = if self.current_level > 5 { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 125 | | self.current_level - 5 [INFO] [stdout] 126 | | } else { [INFO] [stdout] 127 | | 0 [INFO] [stdout] 128 | | }; [INFO] [stdout] | |_________^ help: replace it with: `self.current_level.saturating_sub(5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/systems/input.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(gameplay) = query.iter().next().map(|(_, g)| g) { [INFO] [stdout] 54 | | if gameplay.state != GameplayState::Playing { [INFO] [stdout] 55 | | return; [INFO] [stdout] 56 | | } [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if let Some(gameplay) = query.iter().next().map(|(_, g)| g) [INFO] [stdout] 54 ~ && gameplay.state != GameplayState::Playing { [INFO] [stdout] 55 | return; [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/systems/input.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(gameplay) = query.iter().next().map(|(_, g)| g) { [INFO] [stdout] 54 | | if gameplay.state != GameplayState::Playing { [INFO] [stdout] 55 | | return; [INFO] [stdout] 56 | | } [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if let Some(gameplay) = query.iter().next().map(|(_, g)| g) [INFO] [stdout] 54 ~ && gameplay.state != GameplayState::Playing { [INFO] [stdout] 55 | return; [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> src/systems/rendering.rs:74:23 [INFO] [stdout] | [INFO] [stdout] 74 | let start_index = if current_level_index > 5 { [INFO] [stdout] | _______________________^ [INFO] [stdout] 75 | | current_level_index - 5 [INFO] [stdout] 76 | | } else { [INFO] [stdout] 77 | | 0 [INFO] [stdout] 78 | | }; [INFO] [stdout] | |_____^ help: replace it with: `current_level_index.saturating_sub(5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/systems/gameplay.rs:88:12 [INFO] [stdout] | [INFO] [stdout] 88 | if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 88 - if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] 88 + if !(!left && !right || !up && !down) { [INFO] [stdout] | [INFO] [stdout] 88 - if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] 88 + if (down || up) && (right || left) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> src/systems/rendering.rs:74:23 [INFO] [stdout] | [INFO] [stdout] 74 | let start_index = if current_level_index > 5 { [INFO] [stdout] | _______________________^ [INFO] [stdout] 75 | | current_level_index - 5 [INFO] [stdout] 76 | | } else { [INFO] [stdout] 77 | | 0 [INFO] [stdout] 78 | | }; [INFO] [stdout] | |_____^ help: replace it with: `current_level_index.saturating_sub(5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/systems/gameplay.rs:88:12 [INFO] [stdout] | [INFO] [stdout] 88 | if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 88 - if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] 88 + if !(!up || !left && !right) || (down && left) || (down && right) { [INFO] [stdout] | [INFO] [stdout] 88 - if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] 88 + if (right || left) && up || (down && left) || (down && right) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/systems/gameplay.rs:88:12 [INFO] [stdout] | [INFO] [stdout] 88 | if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 88 - if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] 88 + if !(!left && !right || !up && !down) { [INFO] [stdout] | [INFO] [stdout] 88 - if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] 88 + if (down || up) && (right || left) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/systems/gameplay.rs:88:12 [INFO] [stdout] | [INFO] [stdout] 88 | if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 88 - if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] 88 + if !(!up || !left && !right) || (down && left) || (down && right) { [INFO] [stdout] | [INFO] [stdout] 88 - if (up && left) || (up && right) || (down && left) || (down && right) { [INFO] [stdout] 88 + if (right || left) && up || (down && left) || (down && right) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/systems/events.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 37 | let events = query.iter().next().unwrap().1.events.drain(..).collect::>(); [INFO] [stdout] | --------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 38 | [INFO] [stdout] 39 | events [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 37 ~ [INFO] [stdout] 38 | [INFO] [stdout] 39 ~ query.iter().next().unwrap().1.events.drain(..).collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/systems/events.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 37 | let events = query.iter().next().unwrap().1.events.drain(..).collect::>(); [INFO] [stdout] | --------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 38 | [INFO] [stdout] 39 | events [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 37 ~ [INFO] [stdout] 38 | [INFO] [stdout] 39 ~ query.iter().next().unwrap().1.events.drain(..).collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/systems/events.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / if let Ok(the_box)= world.get::<&Box>(entity) { [INFO] [stdout] 62 | | if let Ok(the_position) = world.get::<&Position>(entity) { [INFO] [stdout] 63 | | if let Some(box_spot) = box_spots_by_position.get(&(the_position.x,the_position.y)) { [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 61 ~ if let Ok(the_box)= world.get::<&Box>(entity) [INFO] [stdout] 62 ~ && let Ok(the_position) = world.get::<&Position>(entity) { [INFO] [stdout] 63 | if let Some(box_spot) = box_spots_by_position.get(&(the_position.x,the_position.y)) { [INFO] [stdout] ... [INFO] [stdout] 68 | } [INFO] [stdout] 69 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/systems/events.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | / if let Ok(the_position) = world.get::<&Position>(entity) { [INFO] [stdout] 63 | | if let Some(box_spot) = box_spots_by_position.get(&(the_position.x,the_position.y)) { [INFO] [stdout] 64 | | // 生成箱子归位事件 [INFO] [stdout] 65 | | new_events.push(Event::BoxPlacedOnSpot(BoxPlacedOnSpot { [INFO] [stdout] ... | [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 62 ~ if let Ok(the_position) = world.get::<&Position>(entity) [INFO] [stdout] 63 ~ && let Some(box_spot) = box_spots_by_position.get(&(the_position.x,the_position.y)) { [INFO] [stdout] 64 | // 生成箱子归位事件 [INFO] [stdout] ... [INFO] [stdout] 67 | })); [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/systems/events.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / if let Ok(the_box)= world.get::<&Box>(entity) { [INFO] [stdout] 62 | | if let Ok(the_position) = world.get::<&Position>(entity) { [INFO] [stdout] 63 | | if let Some(box_spot) = box_spots_by_position.get(&(the_position.x,the_position.y)) { [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 61 ~ if let Ok(the_box)= world.get::<&Box>(entity) [INFO] [stdout] 62 ~ && let Ok(the_position) = world.get::<&Position>(entity) { [INFO] [stdout] 63 | if let Some(box_spot) = box_spots_by_position.get(&(the_position.x,the_position.y)) { [INFO] [stdout] ... [INFO] [stdout] 68 | } [INFO] [stdout] 69 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/systems/events.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | / if let Ok(the_position) = world.get::<&Position>(entity) { [INFO] [stdout] 63 | | if let Some(box_spot) = box_spots_by_position.get(&(the_position.x,the_position.y)) { [INFO] [stdout] 64 | | // 生成箱子归位事件 [INFO] [stdout] 65 | | new_events.push(Event::BoxPlacedOnSpot(BoxPlacedOnSpot { [INFO] [stdout] ... | [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 62 ~ if let Ok(the_position) = world.get::<&Position>(entity) [INFO] [stdout] 63 ~ && let Some(box_spot) = box_spots_by_position.get(&(the_position.x,the_position.y)) { [INFO] [stdout] 64 | // 生成箱子归位事件 [INFO] [stdout] ... [INFO] [stdout] 67 | })); [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 05s [INFO] running `Command { std: "docker" "inspect" "1b0ca5db0e063accae78df63c7792e474b7771b8af91116074491aa7b3f901ce", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1b0ca5db0e063accae78df63c7792e474b7771b8af91116074491aa7b3f901ce", kill_on_drop: false }` [INFO] [stdout] 1b0ca5db0e063accae78df63c7792e474b7771b8af91116074491aa7b3f901ce