[INFO] cloning repository https://github.com/puppysh43/fixing_turnbased [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/puppysh43/fixing_turnbased" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpuppysh43%2Ffixing_turnbased", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpuppysh43%2Ffixing_turnbased'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 86c998ab870b147ea7db7b73eeafd3254ddda974 [INFO] checking puppysh43/fixing_turnbased against eca445e5ae4a6679cc27d3a09106ce245e13a5a6 for pr-162478 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpuppysh43%2Ffixing_turnbased" "/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/puppysh43/fixing_turnbased [INFO] finished tweaking git repo https://github.com/puppysh43/fixing_turnbased [INFO] tweaked toml for git repo https://github.com/puppysh43/fixing_turnbased written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/puppysh43/fixing_turnbased on toolchain eca445e5ae4a6679cc27d3a09106ce245e13a5a6 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+eca445e5ae4a6679cc27d3a09106ce245e13a5a6" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/puppysh43/fixing_turnbased 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" "+eca445e5ae4a6679cc27d3a09106ce245e13a5a6" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: binary `fixing_turnbased` should have a kebab-case name [INFO] [stderr] | [INFO] [stderr] 1 | /workspace/builds/worker-7-tc1/source/target/.../fixing_turnbased [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `cargo::non_kebab_case_bins` is set to `warn` by default [INFO] [stderr] help: to change the binary name to `fixing-turnbased`, convert `package.name` [INFO] [stderr] --> Cargo.toml:7:8 [INFO] [stderr] | [INFO] [stderr] 7 - name = "fixing_turnbased" [INFO] [stderr] 7 + name = "fixing-turnbased" [INFO] [stderr] | [INFO] [stderr] help: to change the binary name to `fixing-turnbased`, specify `bin.name` [INFO] [stderr] --> Cargo.toml:8:19 [INFO] [stderr] | [INFO] [stderr] 8 ~ version = "0.1.0" [INFO] [stderr] 9 + [[bin]] [INFO] [stderr] 10 + name = "fixing-turnbased" [INFO] [stderr] 11 + path = "src/main.rs" [INFO] [stderr] | [INFO] [stderr] warning: `fixing_turnbased` (manifest) generated 1 warning [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded hecs v0.10.5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,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" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:8683fc1fc2eb5c9ac98e0d076ab094b2ffac7f99da555d2b6a2e27f346de2ec7" "sleep" "infinity", kill_on_drop: false }` [INFO] [stdout] e2e4734c25c33ca68030209cddbdae540dd2c5dea17aef89bf6667b5338e0934 [INFO] running `Command { std: "docker" "start" "e2e4734c25c33ca68030209cddbdae540dd2c5dea17aef89bf6667b5338e0934", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e2e4734c25c33ca68030209cddbdae540dd2c5dea17aef89bf6667b5338e0934", kill_on_drop: false }` [INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "e2e4734c25c33ca68030209cddbdae540dd2c5dea17aef89bf6667b5338e0934" "/opt/rustwide/cargo-home/bin/cargo" "+eca445e5ae4a6679cc27d3a09106ce245e13a5a6" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e2e4734c25c33ca68030209cddbdae540dd2c5dea17aef89bf6667b5338e0934", kill_on_drop: false }` [INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-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" "-w" "/opt/rustwide/workdir" "--user" "0:0" "e2e4734c25c33ca68030209cddbdae540dd2c5dea17aef89bf6667b5338e0934" "/opt/rustwide/cargo-home/bin/cargo" "+eca445e5ae4a6679cc27d3a09106ce245e13a5a6" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] warning: binary `fixing_turnbased` should have a kebab-case name [INFO] [stderr] | [INFO] [stderr] 1 | /opt/rustwide/target/.../fixing_turnbased [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `cargo::non_kebab_case_bins` is set to `warn` by default [INFO] [stderr] help: to change the binary name to `fixing-turnbased`, convert `package.name` [INFO] [stderr] --> Cargo.toml:7:8 [INFO] [stderr] | [INFO] [stderr] 7 - name = "fixing_turnbased" [INFO] [stderr] 7 + name = "fixing-turnbased" [INFO] [stderr] | [INFO] [stderr] help: to change the binary name to `fixing-turnbased`, specify `bin.name` [INFO] [stderr] --> Cargo.toml:8:19 [INFO] [stderr] | [INFO] [stderr] 8 ~ version = "0.1.0" [INFO] [stderr] 9 + [[bin]] [INFO] [stderr] 10 + name = "fixing-turnbased" [INFO] [stderr] 11 + path = "src/main.rs" [INFO] [stderr] | [INFO] [stderr] warning: `fixing_turnbased` (manifest) generated 1 warning [INFO] [stderr] Checking once_cell v1.20.2 [INFO] [stderr] Compiling libc v0.2.161 [INFO] [stderr] Checking flate2 v1.0.34 [INFO] [stderr] Checking bytemuck v1.19.0 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Checking ahash v0.8.11 [INFO] [stderr] Checking png v0.17.14 [INFO] [stderr] Checking hashbrown v0.13.2 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking fontdue v0.7.3 [INFO] [stderr] Checking miniquad v0.4.6 [INFO] [stderr] Checking hecs v0.10.5 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking macroquad v0.4.13 [INFO] [stderr] Checking fixing_turnbased v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: found module declaration for lib.rs [INFO] [stdout] --> src/main.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | mod lib; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: lib.rs is the root of this crate's library target [INFO] [stdout] = help: to refer to it from other targets, use the library's name as the path [INFO] [stdout] = note: `#[warn(special_module_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | pub 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: `macroquad::prelude::*` [INFO] [stdout] --> src/combat_action_type.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use macroquad::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `macroquad::prelude::*` [INFO] [stdout] --> src/combat_systems/end_turn.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use macroquad::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::gamestate::*` [INFO] [stdout] --> src/combat_systems/input.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::gamestate::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `macroquad::prelude::*` [INFO] [stdout] --> src/combat_systems/logs.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use macroquad::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `macroquad::prelude::*` [INFO] [stdout] --> src/combat_systems/mod.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use macroquad::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::init_ecs::*` [INFO] [stdout] --> src/gamestate.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::init_ecs::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::prelude::*` [INFO] [stdout] --> src/gamestate.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `hecs` [INFO] [stdout] --> src/combat_systems/render.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use hecs::*; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `combat_encounter` [INFO] [stdout] --> src/combat_systems/end_turn.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn system(state: &mut GameState, combat_encounter: &mut CombatEncounter) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_combat_encounter` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `color` is never read [INFO] [stdout] --> src/combat_systems/render.rs:47:25 [INFO] [stdout] | [INFO] [stdout] 47 | let mut color = Color::new(0.0, 0.0, 0.0, 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this value is reassigned later and never used [INFO] [stdout] 48 | match ctrl_type { [INFO] [stdout] 49 | ControlType::PC => color = RED, [INFO] [stdout] | ----------- `color` is overwritten here before the previous value is read [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entity` [INFO] [stdout] --> src/components/mod.rs:74:14 [INFO] [stdout] | [INFO] [stdout] 74 | for (entity, completed_turn) in self.initiative_order.iter_mut() { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_entity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `significant_action`, `full_turn`, and `get` are never used [INFO] [stdout] --> src/components/mod.rs:130:12 [INFO] [stdout] | [INFO] [stdout] 124 | impl ActionPoints { [INFO] [stdout] | ----------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn significant_action(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 148 | pub fn full_turn(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 156 | pub fn get(&self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `EquippedRangedWeapon` is never constructed [INFO] [stdout] --> src/components/mod.rs:162:12 [INFO] [stdout] | [INFO] [stdout] 162 | pub struct EquippedRangedWeapon(Entity); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/components/mod.rs:172:12 [INFO] [stdout] | [INFO] [stdout] 170 | impl MovementPoints { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 171 | ///create a custom amount of movement points for non-standard enemies [INFO] [stdout] 172 | pub fn new(max: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `sound_atlas`, `turn_state`, `log`, `number_turns`, and `event_queue` are never read [INFO] [stdout] --> src/gamestate.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct GameState { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 11 | pub texture_atlas: TextureAtlas, [INFO] [stdout] 12 | pub sound_atlas: SoundAtlas, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 13 | pub ecs: World, [INFO] [stdout] 14 | pub turn_state: TurnState, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub log: Vec, [INFO] [stdout] | ^^^ [INFO] [stdout] 18 | pub number_turns: i32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 19 | pub quitting: bool, [INFO] [stdout] 20 | pub event_queue: Vec, //ui_state: UiState, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `PlayerTwo` is never constructed [INFO] [stdout] --> src/gamestate.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 43 | pub enum TurnState { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 44 | PlayerOne, [INFO] [stdout] 45 | PlayerTwo, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TurnState` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EntityMoved` is never constructed [INFO] [stdout] --> src/gamestate.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 47 | pub enum GameEvent { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 48 | EntityMoved, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Wall` is never constructed [INFO] [stdout] --> src/map.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum TileType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] 6 | Wall, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TileType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/combat_systems/end_turn.rs:31:27 [INFO] [stdout] | [INFO] [stdout] 31 | for ap in state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(for_loops_over_fallibles)]` on by default [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 31 - for ap in state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] 31 + while let Ok(ap) = state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 31 - for ap in state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] 31 + if let Ok(ap) = state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/combat_systems/input.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | for ap in state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 16 - for ap in state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] 16 + while let Ok(ap) = state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 16 - for ap in state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] 16 + if let Ok(ap) = state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/combat_systems/input.rs:61:34 [INFO] [stdout] | [INFO] [stdout] 61 | for query_pos in state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 61 - for query_pos in state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] 61 + while let Ok(query_pos) = state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 61 - for query_pos in state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] 61 + if let Ok(query_pos) = state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/combat_systems/movement.rs:28:28 [INFO] [stdout] | [INFO] [stdout] 28 | for mp_comp in state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 28 - for mp_comp in state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] 28 + while let Ok(mp_comp) = state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 28 - for mp_comp in state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] 28 + if let Ok(mp_comp) = state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/lib/systems.rs:9:15 [INFO] [stdout] | [INFO] [stdout] 9 | for mp in state [INFO] [stdout] | _______________^ [INFO] [stdout] 10 | | .ecs [INFO] [stdout] 11 | | .query_one_mut::<&mut MovementPoints>(active_entity) [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 9 - for mp in state [INFO] [stdout] 9 + while let Ok(mp) = state [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 9 - for mp in state [INFO] [stdout] 9 + if let Ok(mp) = state [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found module declaration for lib.rs [INFO] [stdout] --> src/main.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | mod lib; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: lib.rs is the root of this crate's library target [INFO] [stdout] = help: to refer to it from other targets, use the library's name as the path [INFO] [stdout] = note: `#[warn(special_module_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | pub 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: `macroquad::prelude::*` [INFO] [stdout] --> src/combat_action_type.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use macroquad::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `macroquad::prelude::*` [INFO] [stdout] --> src/combat_systems/end_turn.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use macroquad::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::gamestate::*` [INFO] [stdout] --> src/combat_systems/input.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::gamestate::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `macroquad::prelude::*` [INFO] [stdout] --> src/combat_systems/logs.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use macroquad::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `macroquad::prelude::*` [INFO] [stdout] --> src/combat_systems/mod.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use macroquad::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::init_ecs::*` [INFO] [stdout] --> src/gamestate.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::init_ecs::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::prelude::*` [INFO] [stdout] --> src/gamestate.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `hecs` [INFO] [stdout] --> src/combat_systems/render.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use hecs::*; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `combat_encounter` [INFO] [stdout] --> src/combat_systems/end_turn.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn system(state: &mut GameState, combat_encounter: &mut CombatEncounter) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_combat_encounter` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `color` is never read [INFO] [stdout] --> src/combat_systems/render.rs:47:25 [INFO] [stdout] | [INFO] [stdout] 47 | let mut color = Color::new(0.0, 0.0, 0.0, 0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this value is reassigned later and never used [INFO] [stdout] 48 | match ctrl_type { [INFO] [stdout] 49 | ControlType::PC => color = RED, [INFO] [stdout] | ----------- `color` is overwritten here before the previous value is read [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entity` [INFO] [stdout] --> src/components/mod.rs:74:14 [INFO] [stdout] | [INFO] [stdout] 74 | for (entity, completed_turn) in self.initiative_order.iter_mut() { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_entity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `significant_action`, `full_turn`, and `get` are never used [INFO] [stdout] --> src/components/mod.rs:130:12 [INFO] [stdout] | [INFO] [stdout] 124 | impl ActionPoints { [INFO] [stdout] | ----------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn significant_action(&mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 148 | pub fn full_turn(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 156 | pub fn get(&self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `EquippedRangedWeapon` is never constructed [INFO] [stdout] --> src/components/mod.rs:162:12 [INFO] [stdout] | [INFO] [stdout] 162 | pub struct EquippedRangedWeapon(Entity); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/components/mod.rs:172:12 [INFO] [stdout] | [INFO] [stdout] 170 | impl MovementPoints { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 171 | ///create a custom amount of movement points for non-standard enemies [INFO] [stdout] 172 | pub fn new(max: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `sound_atlas`, `turn_state`, `log`, `number_turns`, and `event_queue` are never read [INFO] [stdout] --> src/gamestate.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct GameState { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 11 | pub texture_atlas: TextureAtlas, [INFO] [stdout] 12 | pub sound_atlas: SoundAtlas, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 13 | pub ecs: World, [INFO] [stdout] 14 | pub turn_state: TurnState, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub log: Vec, [INFO] [stdout] | ^^^ [INFO] [stdout] 18 | pub number_turns: i32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 19 | pub quitting: bool, [INFO] [stdout] 20 | pub event_queue: Vec, //ui_state: UiState, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `PlayerTwo` is never constructed [INFO] [stdout] --> src/gamestate.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 43 | pub enum TurnState { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 44 | PlayerOne, [INFO] [stdout] 45 | PlayerTwo, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TurnState` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EntityMoved` is never constructed [INFO] [stdout] --> src/gamestate.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 47 | pub enum GameEvent { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 48 | EntityMoved, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Wall` is never constructed [INFO] [stdout] --> src/map.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum TileType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] 6 | Wall, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TileType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/combat_systems/end_turn.rs:31:27 [INFO] [stdout] | [INFO] [stdout] 31 | for ap in state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(for_loops_over_fallibles)]` on by default [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 31 - for ap in state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] 31 + while let Ok(ap) = state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 31 - for ap in state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] 31 + if let Ok(ap) = state.ecs.query_one_mut::<&mut ActionPoints>(entity.clone()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/combat_systems/input.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | for ap in state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 16 - for ap in state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] 16 + while let Ok(ap) = state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 16 - for ap in state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] 16 + if let Ok(ap) = state.ecs.query_one_mut::<&ActionPoints>(active_entity) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/combat_systems/input.rs:61:34 [INFO] [stdout] | [INFO] [stdout] 61 | for query_pos in state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 61 - for query_pos in state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] 61 + while let Ok(query_pos) = state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 61 - for query_pos in state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] 61 + if let Ok(query_pos) = state.ecs.query_one_mut::<&IVec2>(active_entity) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/combat_systems/movement.rs:28:28 [INFO] [stdout] | [INFO] [stdout] 28 | for mp_comp in state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 28 - for mp_comp in state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] 28 + while let Ok(mp_comp) = state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 28 - for mp_comp in state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] 28 + if let Ok(mp_comp) = state.ecs.query_one_mut::<&MovementPoints>(entity) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/lib/systems.rs:9:15 [INFO] [stdout] | [INFO] [stdout] 9 | for mp in state [INFO] [stdout] | _______________^ [INFO] [stdout] 10 | | .ecs [INFO] [stdout] 11 | | .query_one_mut::<&mut MovementPoints>(active_entity) [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 9 - for mp in state [INFO] [stdout] 9 + while let Ok(mp) = state [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 9 - for mp in state [INFO] [stdout] 9 + if let Ok(mp) = state [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.73s [INFO] running `Command { std: "docker" "inspect" "e2e4734c25c33ca68030209cddbdae540dd2c5dea17aef89bf6667b5338e0934", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e2e4734c25c33ca68030209cddbdae540dd2c5dea17aef89bf6667b5338e0934", kill_on_drop: false }` [INFO] [stdout] e2e4734c25c33ca68030209cddbdae540dd2c5dea17aef89bf6667b5338e0934