[INFO] cloning repository https://github.com/kriithikSS/Santa-stealth-Turbogame [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/kriithikSS/Santa-stealth-Turbogame" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FkriithikSS%2FSanta-stealth-Turbogame", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FkriithikSS%2FSanta-stealth-Turbogame'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] beec8f8084049ebcdce81953cf3bd72b320cee30 [INFO] linting kriithikSS/Santa-stealth-Turbogame against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FkriithikSS%2FSanta-stealth-Turbogame" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/kriithikSS/Santa-stealth-Turbogame [INFO] finished tweaking git repo https://github.com/kriithikSS/Santa-stealth-Turbogame [INFO] tweaked toml for git repo https://github.com/kriithikSS/Santa-stealth-Turbogame written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/kriithikSS/Santa-stealth-Turbogame 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/kriithikSS/Santa-stealth-Turbogame 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] Downloading crates ... [INFO] [stderr] Downloaded toml_datetime v0.7.4+spec-1.0.0 [INFO] [stderr] Downloaded toml_parser v1.0.5+spec-1.0.0 [INFO] [stderr] Downloaded turbo-genesis-macros v1.0.0 [INFO] [stderr] Downloaded turbo-genesis-abi v1.0.0 [INFO] [stderr] Downloaded turbo-genesis-ffi v1.0.0 [INFO] [stderr] Downloaded turbo-genesis-sdk v5.2.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 053a9d1352f5ad65ff95f19e5a316d28155796f96e57172f8b38795748c462b4 [INFO] running `Command { std: "docker" "start" "-a" "053a9d1352f5ad65ff95f19e5a316d28155796f96e57172f8b38795748c462b4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "053a9d1352f5ad65ff95f19e5a316d28155796f96e57172f8b38795748c462b4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "053a9d1352f5ad65ff95f19e5a316d28155796f96e57172f8b38795748c462b4", kill_on_drop: false }` [INFO] [stdout] 053a9d1352f5ad65ff95f19e5a316d28155796f96e57172f8b38795748c462b4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6a49c909b8496ede52f155d25f14709b3467b3ce90ceeea4223079c14d31503a [INFO] running `Command { std: "docker" "start" "-a" "6a49c909b8496ede52f155d25f14709b3467b3ce90ceeea4223079c14d31503a", kill_on_drop: false }` [INFO] [stderr] Compiling winnow v0.7.14 [INFO] [stderr] Compiling toml_datetime v0.7.4+spec-1.0.0 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Compiling borsh v1.6.0 [INFO] [stderr] Compiling toml_write v0.1.2 [INFO] [stderr] Compiling base64 v0.22.1 [INFO] [stderr] Compiling uuid v1.19.0 [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Checking turbo-genesis-ffi v1.0.0 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Compiling crypto-common v0.1.7 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling toml_parser v1.0.5+spec-1.0.0 [INFO] [stderr] Compiling toml_edit v0.22.27 [INFO] [stderr] Compiling toml_edit v0.23.10+spec-1.0.0 [INFO] [stderr] Compiling proc-macro-crate v3.4.0 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling borsh-derive v1.6.0 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling turbo-genesis-abi v1.0.0 [INFO] [stderr] Compiling turbo-genesis-macros v1.0.0 [INFO] [stderr] Checking turbo-genesis-sdk v5.2.0 [INFO] [stderr] Checking santa-stealth v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `crate::model::Enemy` [INFO] [stdout] --> src/player.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::model::Enemy; // ✅ ADD THIS [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: `TileType` [INFO] [stdout] --> src/model/enemy.rs:5:31 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::model::{find_path, TileType}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Snow` and `spawn_snow` [INFO] [stdout] --> src/lib.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | use snow::{spawn_snow, Snow}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::model::Enemy` [INFO] [stdout] --> src/player.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::model::Enemy; // ✅ ADD THIS [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: `TileType` [INFO] [stdout] --> src/model/enemy.rs:5:31 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::model::{find_path, TileType}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Snow` and `spawn_snow` [INFO] [stdout] --> src/lib.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | use snow::{spawn_snow, Snow}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `turbo` [INFO] [stdout] --> src/model/mod.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use turbo::*; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `turbo` [INFO] [stdout] --> src/model/mod.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use turbo::*; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `enraged` [INFO] [stdout] --> src/model/boss.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | let enraged = self.health < self.max_health / 2; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_enraged` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `enraged` [INFO] [stdout] --> src/model/boss.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | let enraged = self.health < self.max_health / 2; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_enraged` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `alpha` [INFO] [stdout] --> src/start_screen.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | let alpha = (blink * 255.0) as u32; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_alpha` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `kb` [INFO] [stdout] --> src/lib.rs:344:13 [INFO] [stdout] | [INFO] [stdout] 344 | let kb = keyboard::get(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_kb` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `spawn_boss` and `draw_map` are never used [INFO] [stdout] --> src/lib.rs:157:8 [INFO] [stdout] | [INFO] [stdout] 67 | impl GameState { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 157 | fn spawn_boss(&self) -> Boss { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 718 | fn draw_map(&self) { [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 `draw_snow_fog` is never used [INFO] [stdout] --> src/snow.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn draw_snow_fog(snow: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map.rs:114:17 [INFO] [stdout] | [INFO] [stdout] 114 | / (up && left) || [INFO] [stdout] 115 | | (up && right) || [INFO] [stdout] 116 | | (down && left) || [INFO] [stdout] 117 | | (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] 114 - (up && left) || [INFO] [stdout] 115 - (up && right) || [INFO] [stdout] 116 - (down && left) || [INFO] [stdout] 117 - (down && right); [INFO] [stdout] 114 + !(!left && !right || !up && !down); [INFO] [stdout] | [INFO] [stdout] 114 - (up && left) || [INFO] [stdout] 115 - (up && right) || [INFO] [stdout] 116 - (down && left) || [INFO] [stdout] 117 - (down && right); [INFO] [stdout] 114 + (down || up) && (right || left); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map.rs:114:17 [INFO] [stdout] | [INFO] [stdout] 114 | / (up && left) || [INFO] [stdout] 115 | | (up && 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] 114 - (up && left) || [INFO] [stdout] 115 - (up && right) || [INFO] [stdout] 114 + !(!up || !left && !right) || [INFO] [stdout] | [INFO] [stdout] 114 - (up && left) || [INFO] [stdout] 115 - (up && right) || [INFO] [stdout] 114 + (right || left) && up || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `alpha` [INFO] [stdout] --> src/start_screen.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | let alpha = (blink * 255.0) as u32; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_alpha` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/player.rs:90:19 [INFO] [stdout] | [INFO] [stdout] 90 | let len = ((ax * ax + ay * ay) as f32).sqrt(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((ax * ax + ay * ay))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `kb` [INFO] [stdout] --> src/lib.rs:344:13 [INFO] [stdout] | [INFO] [stdout] 344 | let kb = keyboard::get(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_kb` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `spawn_boss` and `draw_map` are never used [INFO] [stdout] --> src/lib.rs:157:8 [INFO] [stdout] | [INFO] [stdout] 67 | impl GameState { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 157 | fn spawn_boss(&self) -> Boss { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 718 | fn draw_map(&self) { [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 `draw_snow_fog` is never used [INFO] [stdout] --> src/snow.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn draw_snow_fog(snow: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map.rs:114:17 [INFO] [stdout] | [INFO] [stdout] 114 | / (up && left) || [INFO] [stdout] 115 | | (up && right) || [INFO] [stdout] 116 | | (down && left) || [INFO] [stdout] 117 | | (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] 114 - (up && left) || [INFO] [stdout] 115 - (up && right) || [INFO] [stdout] 116 - (down && left) || [INFO] [stdout] 117 - (down && right); [INFO] [stdout] 114 + !(!left && !right || !up && !down); [INFO] [stdout] | [INFO] [stdout] 114 - (up && left) || [INFO] [stdout] 115 - (up && right) || [INFO] [stdout] 116 - (down && left) || [INFO] [stdout] 117 - (down && right); [INFO] [stdout] 114 + (down || up) && (right || left); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map.rs:114:17 [INFO] [stdout] | [INFO] [stdout] 114 | / (up && left) || [INFO] [stdout] 115 | | (up && 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] 114 - (up && left) || [INFO] [stdout] 115 - (up && right) || [INFO] [stdout] 114 + !(!up || !left && !right) || [INFO] [stdout] | [INFO] [stdout] 114 - (up && left) || [INFO] [stdout] 115 - (up && right) || [INFO] [stdout] 114 + (right || left) && up || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/model/boss.rs:101:1 [INFO] [stdout] | [INFO] [stdout] 101 | / if self.state == BossState::Attacking { [INFO] [stdout] 102 | | if self.attack_timer > 0 { [INFO] [stdout] 103 | | self.attack_timer -= 1; [INFO] [stdout] ... | [INFO] [stdout] 148 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 101 ~ if self.state == BossState::Attacking [INFO] [stdout] 102 ~ && self.attack_timer > 0 { [INFO] [stdout] 103 | self.attack_timer -= 1; [INFO] [stdout] ... [INFO] [stdout] 146 | [INFO] [stdout] 147 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/model/boss.rs:187:1 [INFO] [stdout] | [INFO] [stdout] 187 | / if self.repath_timer == 0 || self.path.is_empty() { [INFO] [stdout] 188 | | if let Some(new_path) = find_path(map, boss_tile, player_tile) { [INFO] [stdout] 189 | | self.path = new_path; [INFO] [stdout] 190 | | self.path_index = 0; [INFO] [stdout] ... | [INFO] [stdout] 193 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 187 ~ if (self.repath_timer == 0 || self.path.is_empty()) { [INFO] [stdout] 188 ~ && let Some(new_path) = find_path(map, boss_tile, player_tile) { [INFO] [stdout] 189 | self.path = new_path; [INFO] [stdout] 190 | self.path_index = 0; [INFO] [stdout] 191 | self.repath_timer = 30; [INFO] [stdout] 192 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/player.rs:90:19 [INFO] [stdout] | [INFO] [stdout] 90 | let len = ((ax * ax + ay * ay) as f32).sqrt(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((ax * ax + ay * ay))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/model/enemy.rs:260:1 [INFO] [stdout] | [INFO] [stdout] 260 | / if self.repath_timer == 0 || self.path.is_empty() { [INFO] [stdout] 261 | | if let Some(p) = find_path(map, enemy_tile, player_tile) { [INFO] [stdout] 262 | | self.path = p; [INFO] [stdout] 263 | | self.path_index = 0; [INFO] [stdout] ... | [INFO] [stdout] 266 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ if (self.repath_timer == 0 || self.path.is_empty()) { [INFO] [stdout] 261 ~ && let Some(p) = find_path(map, enemy_tile, player_tile) { [INFO] [stdout] 262 | self.path = p; [INFO] [stdout] 263 | self.path_index = 0; [INFO] [stdout] 264 | self.repath_timer = 30; // recalc every 0.5s [INFO] [stdout] 265 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/model/boss.rs:101:1 [INFO] [stdout] | [INFO] [stdout] 101 | / if self.state == BossState::Attacking { [INFO] [stdout] 102 | | if self.attack_timer > 0 { [INFO] [stdout] 103 | | self.attack_timer -= 1; [INFO] [stdout] ... | [INFO] [stdout] 148 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 101 ~ if self.state == BossState::Attacking [INFO] [stdout] 102 ~ && self.attack_timer > 0 { [INFO] [stdout] 103 | self.attack_timer -= 1; [INFO] [stdout] ... [INFO] [stdout] 146 | [INFO] [stdout] 147 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/model/boss.rs:187:1 [INFO] [stdout] | [INFO] [stdout] 187 | / if self.repath_timer == 0 || self.path.is_empty() { [INFO] [stdout] 188 | | if let Some(new_path) = find_path(map, boss_tile, player_tile) { [INFO] [stdout] 189 | | self.path = new_path; [INFO] [stdout] 190 | | self.path_index = 0; [INFO] [stdout] ... | [INFO] [stdout] 193 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 187 ~ if (self.repath_timer == 0 || self.path.is_empty()) { [INFO] [stdout] 188 ~ && let Some(new_path) = find_path(map, boss_tile, player_tile) { [INFO] [stdout] 189 | self.path = new_path; [INFO] [stdout] 190 | self.path_index = 0; [INFO] [stdout] 191 | self.repath_timer = 30; [INFO] [stdout] 192 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/snow.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn draw_snow_fog(snow: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - pub fn draw_snow_fog(snow: &mut Vec) { [INFO] [stdout] 32 + pub fn draw_snow_fog(snow: &mut [Snow]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/model/enemy.rs:260:1 [INFO] [stdout] | [INFO] [stdout] 260 | / if self.repath_timer == 0 || self.path.is_empty() { [INFO] [stdout] 261 | | if let Some(p) = find_path(map, enemy_tile, player_tile) { [INFO] [stdout] 262 | | self.path = p; [INFO] [stdout] 263 | | self.path_index = 0; [INFO] [stdout] ... | [INFO] [stdout] 266 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ if (self.repath_timer == 0 || self.path.is_empty()) { [INFO] [stdout] 261 ~ && let Some(p) = find_path(map, enemy_tile, player_tile) { [INFO] [stdout] 262 | self.path = p; [INFO] [stdout] 263 | self.path_index = 0; [INFO] [stdout] 264 | self.repath_timer = 30; // recalc every 0.5s [INFO] [stdout] 265 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/player_snowball.rs:25:51 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn update(&mut self, map: &Grid, enemies: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 25 - pub fn update(&mut self, map: &Grid, enemies: &mut Vec) { [INFO] [stdout] 25 + pub fn update(&mut self, map: &Grid, enemies: &mut [Enemy]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/snow.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn draw_snow_fog(snow: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - pub fn draw_snow_fog(snow: &mut Vec) { [INFO] [stdout] 32 + pub fn draw_snow_fog(snow: &mut [Snow]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:488:5 [INFO] [stdout] | [INFO] [stdout] 488 | / if let Some(boss) = &mut self.boss { [INFO] [stdout] 489 | | if ball.alive { [INFO] [stdout] 490 | | let ball_box = Bounds::new( [INFO] [stdout] 491 | | ball.x - 3.0, [INFO] [stdout] ... | [INFO] [stdout] 502 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 488 ~ if let Some(boss) = &mut self.boss [INFO] [stdout] 489 ~ && ball.alive { [INFO] [stdout] 490 | let ball_box = Bounds::new( [INFO] [stdout] ... [INFO] [stdout] 500 | } [INFO] [stdout] 501 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/lib.rs:566:12 [INFO] [stdout] | [INFO] [stdout] 566 | if self.level % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `self.level.is_multiple_of(2)` [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/lib.rs:678:5 [INFO] [stdout] | [INFO] [stdout] 678 | / if let Some(boss) = &mut self.boss { [INFO] [stdout] 679 | | if bullet.alive && b_box.intersects(&boss.hitbox) { [INFO] [stdout] 680 | | boss.take_damage(4); // 🔥 MUCH STRONGER THAN SNOWBALL [INFO] [stdout] 681 | | bullet.alive = false; [INFO] [stdout] ... | [INFO] [stdout] 684 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 678 ~ if let Some(boss) = &mut self.boss [INFO] [stdout] 679 ~ && bullet.alive && b_box.intersects(&boss.hitbox) { [INFO] [stdout] 680 | boss.take_damage(4); // 🔥 MUCH STRONGER THAN SNOWBALL [INFO] [stdout] 681 | bullet.alive = false; [INFO] [stdout] 682 | audio::play("hit"); [INFO] [stdout] 683 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/player_snowball.rs:25:51 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn update(&mut self, map: &Grid, enemies: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 25 - pub fn update(&mut self, map: &Grid, enemies: &mut Vec) { [INFO] [stdout] 25 + pub fn update(&mut self, map: &Grid, enemies: &mut [Enemy]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:488:5 [INFO] [stdout] | [INFO] [stdout] 488 | / if let Some(boss) = &mut self.boss { [INFO] [stdout] 489 | | if ball.alive { [INFO] [stdout] 490 | | let ball_box = Bounds::new( [INFO] [stdout] 491 | | ball.x - 3.0, [INFO] [stdout] ... | [INFO] [stdout] 502 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 488 ~ if let Some(boss) = &mut self.boss [INFO] [stdout] 489 ~ && ball.alive { [INFO] [stdout] 490 | let ball_box = Bounds::new( [INFO] [stdout] ... [INFO] [stdout] 500 | } [INFO] [stdout] 501 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/lib.rs:566:12 [INFO] [stdout] | [INFO] [stdout] 566 | if self.level % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `self.level.is_multiple_of(2)` [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/lib.rs:678:5 [INFO] [stdout] | [INFO] [stdout] 678 | / if let Some(boss) = &mut self.boss { [INFO] [stdout] 679 | | if bullet.alive && b_box.intersects(&boss.hitbox) { [INFO] [stdout] 680 | | boss.take_damage(4); // 🔥 MUCH STRONGER THAN SNOWBALL [INFO] [stdout] 681 | | bullet.alive = false; [INFO] [stdout] ... | [INFO] [stdout] 684 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 678 ~ if let Some(boss) = &mut self.boss [INFO] [stdout] 679 ~ && bullet.alive && b_box.intersects(&boss.hitbox) { [INFO] [stdout] 680 | boss.take_damage(4); // 🔥 MUCH STRONGER THAN SNOWBALL [INFO] [stdout] 681 | bullet.alive = false; [INFO] [stdout] 682 | audio::play("hit"); [INFO] [stdout] 683 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.61s [INFO] running `Command { std: "docker" "inspect" "6a49c909b8496ede52f155d25f14709b3467b3ce90ceeea4223079c14d31503a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6a49c909b8496ede52f155d25f14709b3467b3ce90ceeea4223079c14d31503a", kill_on_drop: false }` [INFO] [stdout] 6a49c909b8496ede52f155d25f14709b3467b3ce90ceeea4223079c14d31503a