[INFO] cloning repository https://github.com/lautaroh2394/pockie_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lautaroh2394/pockie_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flautaroh2394%2Fpockie_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flautaroh2394%2Fpockie_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fb7ffcb129534c236c1cee0b2d56d2529bc0edfb [INFO] linting lautaroh2394/pockie_rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flautaroh2394%2Fpockie_rust" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/lautaroh2394/pockie_rust [INFO] finished tweaking git repo https://github.com/lautaroh2394/pockie_rust [INFO] tweaked toml for git repo https://github.com/lautaroh2394/pockie_rust written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lautaroh2394/pockie_rust 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/lautaroh2394/pockie_rust 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 quad-rand v0.2.3 [INFO] [stderr] Downloaded unicode-ident v1.0.16 [INFO] [stderr] Downloaded macroquad_macro v0.1.8 [INFO] [stderr] Downloaded ttf-parser v0.15.2 [INFO] [stderr] Downloaded fontdue v0.7.3 [INFO] [stderr] Downloaded miniquad v0.4.6 [INFO] [stderr] Downloaded ndk-sys v0.2.2 [INFO] [stderr] Downloaded glam v0.27.0 [INFO] [stderr] Downloaded macroquad v0.4.13 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 3ccdd90e34497c609beb6bbd22e3c54da8ea06509ca482829e07ba3320777003 [INFO] running `Command { std: "docker" "start" "-a" "3ccdd90e34497c609beb6bbd22e3c54da8ea06509ca482829e07ba3320777003", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "3ccdd90e34497c609beb6bbd22e3c54da8ea06509ca482829e07ba3320777003", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3ccdd90e34497c609beb6bbd22e3c54da8ea06509ca482829e07ba3320777003", kill_on_drop: false }` [INFO] [stdout] 3ccdd90e34497c609beb6bbd22e3c54da8ea06509ca482829e07ba3320777003 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] aa8ea6ba77480156f78f869b29c846f6d621d79a997364c64e6bdff34abc862b [INFO] running `Command { std: "docker" "start" "-a" "aa8ea6ba77480156f78f869b29c846f6d621d79a997364c64e6bdff34abc862b", kill_on_drop: false }` [INFO] [stderr] Compiling ahash v0.8.11 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking once_cell v1.20.2 [INFO] [stderr] Compiling miniquad v0.4.6 [INFO] [stderr] Checking bytemuck v1.21.0 [INFO] [stderr] Checking ttf-parser v0.15.2 [INFO] [stderr] Compiling macroquad_macro v0.1.8 [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Checking glam v0.27.0 [INFO] [stderr] Checking quad-rand v0.2.3 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking hashbrown v0.13.2 [INFO] [stderr] Checking fontdue v0.7.3 [INFO] [stderr] Checking macroquad v0.4.13 [INFO] [stderr] Checking pockieninja v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `push_global_event` [INFO] [stdout] --> src/models/scene_manager.rs:1:55 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::global_events::{global_events_iterate_mut, push_global_event, remove_global_event_by_id, remove_global_events}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/models/scene_manager.rs:57:49 [INFO] [stdout] | [INFO] [stdout] 57 | if exec { remove_global_event_by_id((event.id()));} [INFO] [stdout] | ^^^^^^^^^^^^ help: remove them: `event.id()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/models/scene_manager.rs:57:49 [INFO] [stdout] | [INFO] [stdout] 57 | if exec { remove_global_event_by_id((event.id()));} [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 57 - if exec { remove_global_event_by_id((event.id()));} [INFO] [stdout] 57 + if exec { remove_global_event_by_id(event.id() );} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/models/scenes/character_menu.rs:39:16 [INFO] [stdout] | [INFO] [stdout] 39 | if (option_title == "Move") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 39 - if (option_title == "Move") { [INFO] [stdout] 39 + if option_title == "Move" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/models/scenes/character_menu.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | if (option_title == "Attack") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 52 - if (option_title == "Attack") { [INFO] [stdout] 52 + if option_title == "Attack" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `enums::event::SceneEvent` [INFO] [stdout] --> src/models/space.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | enums::event::SceneEvent, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/models/fighter.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `enums::event::SceneEvent` [INFO] [stdout] --> src/models/buttons/button.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{enums::event::SceneEvent, models::position::Position, traits::game_object::GameObject}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `space::Space` [INFO] [stdout] --> src/enums/event.rs:1:39 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::models::{fighter::Fighter, space::Space}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `global_events::GLOBAL_EVENTS` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use global_events::GLOBAL_EVENTS; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `push_global_event` [INFO] [stdout] --> src/models/scene_manager.rs:1:55 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::global_events::{global_events_iterate_mut, push_global_event, remove_global_event_by_id, remove_global_events}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/models/scene_manager.rs:57:49 [INFO] [stdout] | [INFO] [stdout] 57 | if exec { remove_global_event_by_id((event.id()));} [INFO] [stdout] | ^^^^^^^^^^^^ help: remove them: `event.id()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/models/scene_manager.rs:57:49 [INFO] [stdout] | [INFO] [stdout] 57 | if exec { remove_global_event_by_id((event.id()));} [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 57 - if exec { remove_global_event_by_id((event.id()));} [INFO] [stdout] 57 + if exec { remove_global_event_by_id(event.id() );} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/models/scenes/character_menu.rs:39:16 [INFO] [stdout] | [INFO] [stdout] 39 | if (option_title == "Move") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 39 - if (option_title == "Move") { [INFO] [stdout] 39 + if option_title == "Move" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/models/scenes/character_menu.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | if (option_title == "Attack") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 52 - if (option_title == "Attack") { [INFO] [stdout] 52 + if option_title == "Attack" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `enums::event::SceneEvent` [INFO] [stdout] --> src/models/space.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | enums::event::SceneEvent, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/models/fighter.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `enums::event::SceneEvent` [INFO] [stdout] --> src/models/buttons/button.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{enums::event::SceneEvent, models::position::Position, traits::game_object::GameObject}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `space::Space` [INFO] [stdout] --> src/enums/event.rs:1:39 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::models::{fighter::Fighter, space::Space}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `global_events::GLOBAL_EVENTS` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use global_events::GLOBAL_EVENTS; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> src/global_events.rs:21:65 [INFO] [stdout] | [INFO] [stdout] 21 | let found = GLOBAL_EVENTS.iter().enumerate().find(|(index, event)|{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/models/scene_manager.rs:50:37 [INFO] [stdout] | [INFO] [stdout] 50 | SceneEvent::PopLast(data) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/models/board.rs:126:25 [INFO] [stdout] | [INFO] [stdout] 126 | _ => { exec = false;} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/models/board.rs:126:25 [INFO] [stdout] | [INFO] [stdout] 92 | BoardEvent::BoardSelectMove(fighter) => { [INFO] [stdout] | ------------------------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 96 | BoardEvent::BoardIdle => { [INFO] [stdout] | --------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 99 | BoardEvent::DropFighter(fighter) => { [INFO] [stdout] | -------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 103 | BoardEvent::SetFighter(fighter) => { [INFO] [stdout] | ------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 126 | _ => { exec = false;} [INFO] [stdout] | ^ ...and 2 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> src/global_events.rs:21:65 [INFO] [stdout] | [INFO] [stdout] 21 | let found = GLOBAL_EVENTS.iter().enumerate().find(|(index, event)|{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/models/scene_manager.rs:50:37 [INFO] [stdout] | [INFO] [stdout] 50 | SceneEvent::PopLast(data) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/models/board.rs:126:25 [INFO] [stdout] | [INFO] [stdout] 126 | _ => { exec = false;} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/models/board.rs:126:25 [INFO] [stdout] | [INFO] [stdout] 92 | BoardEvent::BoardSelectMove(fighter) => { [INFO] [stdout] | ------------------------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 96 | BoardEvent::BoardIdle => { [INFO] [stdout] | --------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 99 | BoardEvent::DropFighter(fighter) => { [INFO] [stdout] | -------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 103 | BoardEvent::SetFighter(fighter) => { [INFO] [stdout] | ------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 126 | _ => { exec = false;} [INFO] [stdout] | ^ ...and 2 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `events` is never read [INFO] [stdout] --> src/models/scenes/scene.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct Scene { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 13 | pub elements: Vec>, [INFO] [stdout] 14 | pub events: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_status` is never used [INFO] [stdout] --> src/models/board.rs:74:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl Board { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 74 | fn get_status(&self) -> &BoardState { &self.state } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_def` and `get_movement` are never used [INFO] [stdout] --> src/models/fighter.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl Fighter { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn get_def(&self) -> i32 { self.defense } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 52 | pub fn get_movement(&self) -> i32 { self.movement } [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_name` is never used [INFO] [stdout] --> src/traits/game_object.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait GameObject { [INFO] [stdout] | ---------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 44 | fn get_name(&self) -> String { String::from("Nombre sin definir") } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/window_conf.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 4 | / let conf = Conf { [INFO] [stdout] 5 | | window_title: "Pock".to_string(), [INFO] [stdout] 6 | | window_resizable: false, [INFO] [stdout] 7 | | window_height: 720, [INFO] [stdout] 8 | | window_width: 1080, [INFO] [stdout] 9 | | ..Default::default() [INFO] [stdout] 10 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 11 | conf [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] 4 ~ [INFO] [stdout] 5 ~ Conf { [INFO] [stdout] 6 + window_title: "Pock".to_string(), [INFO] [stdout] 7 + window_resizable: false, [INFO] [stdout] 8 + window_height: 720, [INFO] [stdout] 9 + window_width: 1080, [INFO] [stdout] 10 + ..Default::default() [INFO] [stdout] 11 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/global_events.rs:33:32 [INFO] [stdout] | [INFO] [stdout] 33 | where T: FnMut(&SceneEvent) -> () [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/models/scene_manager.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | self.scenes.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.scenes.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/models/scenes/scene.rs:25:24 [INFO] [stdout] | [INFO] [stdout] 25 | let elements = if let Some(elements) = data.elements { elements } else { Vec::new() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data.elements.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/models/scenes/scene.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | let events = if let Some(events) = data.events { events } else { Vec::new() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data.events.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/models/scenes/modal.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new(fighter: Fighter) -> Scene { [INFO] [stdout] 19 | | let mut elements: Vec> = Vec::new(); [INFO] [stdout] 20 | | elements.push(Box::new(CharacterMenu::new_for_fighter(&fighter))); [INFO] [stdout] 21 | | Scene::new_from_data( SceneCreationData { [INFO] [stdout] ... | [INFO] [stdout] 26 | | }) [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/models/scenes/modal.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / let mut elements: Vec> = Vec::new(); [INFO] [stdout] 20 | | elements.push(Box::new(CharacterMenu::new_for_fighter(&fighter))); [INFO] [stdout] | |__________________________________________________________________________^ help: consider using the `vec![]` macro: `let elements: Vec> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `events` is never read [INFO] [stdout] --> src/models/scenes/scene.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct Scene { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 13 | pub elements: Vec>, [INFO] [stdout] 14 | pub events: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_status` is never used [INFO] [stdout] --> src/models/board.rs:74:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl Board { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 74 | fn get_status(&self) -> &BoardState { &self.state } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_def` and `get_movement` are never used [INFO] [stdout] --> src/models/fighter.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl Fighter { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn get_def(&self) -> i32 { self.defense } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 52 | pub fn get_movement(&self) -> i32 { self.movement } [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_name` is never used [INFO] [stdout] --> src/traits/game_object.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait GameObject { [INFO] [stdout] | ---------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 44 | fn get_name(&self) -> String { String::from("Nombre sin definir") } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting float literal to `f32` is unnecessary [INFO] [stdout] --> src/models/scenes/character_menu.rs:20:41 [INFO] [stdout] | [INFO] [stdout] 20 | let space_width = board_width / 9. as f32; [INFO] [stdout] | ^^^^^^^^^ help: try: `9_f32` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/window_conf.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 4 | / let conf = Conf { [INFO] [stdout] 5 | | window_title: "Pock".to_string(), [INFO] [stdout] 6 | | window_resizable: false, [INFO] [stdout] 7 | | window_height: 720, [INFO] [stdout] 8 | | window_width: 1080, [INFO] [stdout] 9 | | ..Default::default() [INFO] [stdout] 10 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 11 | conf [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] 4 ~ [INFO] [stdout] 5 ~ Conf { [INFO] [stdout] 6 + window_title: "Pock".to_string(), [INFO] [stdout] 7 + window_resizable: false, [INFO] [stdout] 8 + window_height: 720, [INFO] [stdout] 9 + window_width: 1080, [INFO] [stdout] 10 + ..Default::default() [INFO] [stdout] 11 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/global_events.rs:33:32 [INFO] [stdout] | [INFO] [stdout] 33 | where T: FnMut(&SceneEvent) -> () [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/models/board.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | / match event { [INFO] [stdout] 90 | | SceneEvent::BoardEvent(board_event) => { [INFO] [stdout] 91 | | match &board_event.event { [INFO] [stdout] 92 | | BoardEvent::BoardSelectMove(fighter) => { [INFO] [stdout] ... | [INFO] [stdout] 130 | | _ => () [INFO] [stdout] 131 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 89 ~ if let SceneEvent::BoardEvent(board_event) = event { [INFO] [stdout] 90 + match &board_event.event { [INFO] [stdout] 91 + BoardEvent::BoardSelectMove(fighter) => { [INFO] [stdout] 92 + self.set_status(BoardState::selecting_move(Some(fighter.clone()))); [INFO] [stdout] 93 + push_global_event(SceneEvent::pop_last()); [INFO] [stdout] 94 + }, [INFO] [stdout] 95 + BoardEvent::BoardIdle => { [INFO] [stdout] 96 + self.set_status(BoardState::idle()); [INFO] [stdout] 97 + }, [INFO] [stdout] 98 + BoardEvent::DropFighter(fighter) => { [INFO] [stdout] 99 + let fighter_current_space = &mut self.map[fighter.y_index as usize][fighter.x_index as usize]; [INFO] [stdout] 100 + fighter_current_space.drop_fighter(); [INFO] [stdout] 101 + }, [INFO] [stdout] 102 + BoardEvent::SetFighter(fighter) => { [INFO] [stdout] 103 + let fighter_current_space = &mut self.map[fighter.y_index as usize][fighter.x_index as usize]; [INFO] [stdout] 104 + fighter_current_space.set_fighter(fighter.clone()); [INFO] [stdout] 105 + }, [INFO] [stdout] 106 + BoardEvent::BoardSelectVictim(fighter) => { [INFO] [stdout] 107 + self.set_status(BoardState::selecting_victim(Some(fighter.clone()))); [INFO] [stdout] 108 + push_global_event(SceneEvent::pop_last()); [INFO] [stdout] 109 + }, [INFO] [stdout] 110 + BoardEvent::Attack(attacker, space ) => { [INFO] [stdout] 111 + if let Some(fighter) = &space.fighter { [INFO] [stdout] 112 + let mut victim = fighter.clone(); [INFO] [stdout] 113 + attacker.attack(&mut victim); [INFO] [stdout] 114 + let fighter_current_space = &mut self.map[victim.y_index as usize][victim.x_index as usize]; [INFO] [stdout] 115 + [INFO] [stdout] 116 + if !victim.is_dead() { [INFO] [stdout] 117 + let clone = victim.clone(); [INFO] [stdout] 118 + fighter_current_space.set_fighter(clone); [INFO] [stdout] 119 + } [INFO] [stdout] 120 + else { [INFO] [stdout] 121 + fighter_current_space.drop_fighter(); [INFO] [stdout] 122 + } [INFO] [stdout] 123 + } [INFO] [stdout] 124 + }, [INFO] [stdout] 125 + _ => { exec = false;} [INFO] [stdout] 126 + } [INFO] [stdout] 127 + if exec { remove_global_event_by_id(event.id());} [INFO] [stdout] 128 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/models/scene_manager.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | self.scenes.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.scenes.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/models/scenes/scene.rs:25:24 [INFO] [stdout] | [INFO] [stdout] 25 | let elements = if let Some(elements) = data.elements { elements } else { Vec::new() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data.elements.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/models/scenes/scene.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | let events = if let Some(events) = data.events { events } else { Vec::new() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data.events.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/models/scenes/modal.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new(fighter: Fighter) -> Scene { [INFO] [stdout] 19 | | let mut elements: Vec> = Vec::new(); [INFO] [stdout] 20 | | elements.push(Box::new(CharacterMenu::new_for_fighter(&fighter))); [INFO] [stdout] 21 | | Scene::new_from_data( SceneCreationData { [INFO] [stdout] ... | [INFO] [stdout] 26 | | }) [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/models/scenes/modal.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / let mut elements: Vec> = Vec::new(); [INFO] [stdout] 20 | | elements.push(Box::new(CharacterMenu::new_for_fighter(&fighter))); [INFO] [stdout] | |__________________________________________________________________________^ help: consider using the `vec![]` macro: `let elements: Vec> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting float literal to `f32` is unnecessary [INFO] [stdout] --> src/models/scenes/character_menu.rs:20:41 [INFO] [stdout] | [INFO] [stdout] 20 | let space_width = board_width / 9. as f32; [INFO] [stdout] | ^^^^^^^^^ help: try: `9_f32` [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: methods called `new` usually return `Self` [INFO] [stdout] --> src/models/buttons/move_button.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / pub fn new(parent_position: Position, fighter: Fighter) -> Button { [INFO] [stdout] 10 | | let action = Box::new(MoveButtonAction::new(fighter)); [INFO] [stdout] 11 | | [INFO] [stdout] 12 | | Button::new( [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/models/buttons/attack_button.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / pub fn new(parent_position: Position, fighter: Fighter) -> Button { [INFO] [stdout] 10 | | let action = Box::new(AttackButtonAction::new(fighter)); [INFO] [stdout] 11 | | [INFO] [stdout] 12 | | Button::new( [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/models/board.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | / match event { [INFO] [stdout] 90 | | SceneEvent::BoardEvent(board_event) => { [INFO] [stdout] 91 | | match &board_event.event { [INFO] [stdout] 92 | | BoardEvent::BoardSelectMove(fighter) => { [INFO] [stdout] ... | [INFO] [stdout] 130 | | _ => () [INFO] [stdout] 131 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 89 ~ if let SceneEvent::BoardEvent(board_event) = event { [INFO] [stdout] 90 + match &board_event.event { [INFO] [stdout] 91 + BoardEvent::BoardSelectMove(fighter) => { [INFO] [stdout] 92 + self.set_status(BoardState::selecting_move(Some(fighter.clone()))); [INFO] [stdout] 93 + push_global_event(SceneEvent::pop_last()); [INFO] [stdout] 94 + }, [INFO] [stdout] 95 + BoardEvent::BoardIdle => { [INFO] [stdout] 96 + self.set_status(BoardState::idle()); [INFO] [stdout] 97 + }, [INFO] [stdout] 98 + BoardEvent::DropFighter(fighter) => { [INFO] [stdout] 99 + let fighter_current_space = &mut self.map[fighter.y_index as usize][fighter.x_index as usize]; [INFO] [stdout] 100 + fighter_current_space.drop_fighter(); [INFO] [stdout] 101 + }, [INFO] [stdout] 102 + BoardEvent::SetFighter(fighter) => { [INFO] [stdout] 103 + let fighter_current_space = &mut self.map[fighter.y_index as usize][fighter.x_index as usize]; [INFO] [stdout] 104 + fighter_current_space.set_fighter(fighter.clone()); [INFO] [stdout] 105 + }, [INFO] [stdout] 106 + BoardEvent::BoardSelectVictim(fighter) => { [INFO] [stdout] 107 + self.set_status(BoardState::selecting_victim(Some(fighter.clone()))); [INFO] [stdout] 108 + push_global_event(SceneEvent::pop_last()); [INFO] [stdout] 109 + }, [INFO] [stdout] 110 + BoardEvent::Attack(attacker, space ) => { [INFO] [stdout] 111 + if let Some(fighter) = &space.fighter { [INFO] [stdout] 112 + let mut victim = fighter.clone(); [INFO] [stdout] 113 + attacker.attack(&mut victim); [INFO] [stdout] 114 + let fighter_current_space = &mut self.map[victim.y_index as usize][victim.x_index as usize]; [INFO] [stdout] 115 + [INFO] [stdout] 116 + if !victim.is_dead() { [INFO] [stdout] 117 + let clone = victim.clone(); [INFO] [stdout] 118 + fighter_current_space.set_fighter(clone); [INFO] [stdout] 119 + } [INFO] [stdout] 120 + else { [INFO] [stdout] 121 + fighter_current_space.drop_fighter(); [INFO] [stdout] 122 + } [INFO] [stdout] 123 + } [INFO] [stdout] 124 + }, [INFO] [stdout] 125 + _ => { exec = false;} [INFO] [stdout] 126 + } [INFO] [stdout] 127 + if exec { remove_global_event_by_id(event.id());} [INFO] [stdout] 128 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/enums/board_state/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod board_state; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [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/enums/board_state/board_state_logic/idle.rs:5:37 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn click_action(&self, map: &mut Vec>, position: &Position) { [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] 5 - pub fn click_action(&self, map: &mut Vec>, position: &Position) { [INFO] [stdout] 5 + pub fn click_action(&self, map: &mut [Vec], position: &Position) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/idle.rs:9:32 [INFO] [stdout] | [INFO] [stdout] 9 | if space.click(&position) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [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/enums/board_state/board_state_logic/selecting_move.rs:9:37 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn click_action(&self, map: &mut Vec>, position: &Position, moving_fighter_option: Option) { [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] 9 - pub fn click_action(&self, map: &mut Vec>, position: &Position, moving_fighter_option: Option) { [INFO] [stdout] 9 + pub fn click_action(&self, map: &mut [Vec], position: &Position, moving_fighter_option: Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_move.rs:14:41 [INFO] [stdout] | [INFO] [stdout] 14 | if space.is_clicked(&position) && space.fighter.is_none() && fighter.can_move_to(space) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_move.rs:17:47 [INFO] [stdout] | [INFO] [stdout] 17 | f.update_map_position(&space); [INFO] [stdout] | ^^^^^^ help: change this to: `space` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_move.rs:34:35 [INFO] [stdout] | [INFO] [stdout] 34 | if space.near(&container_space) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `container_space` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_victim.rs:10:55 [INFO] [stdout] | [INFO] [stdout] 10 | if space.is_clicked(&position) && !space.fighter.is_none() && fighter.can_attack_to(space) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `space.fighter.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_victim.rs:5:37 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn click_action(&self, map: &mut Vec>, position: &Position, fighter_option: Option) { [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] 5 - pub fn click_action(&self, map: &mut Vec>, position: &Position, fighter_option: Option) { [INFO] [stdout] 5 + pub fn click_action(&self, map: &mut [Vec], position: &Position, fighter_option: Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_victim.rs:10:41 [INFO] [stdout] | [INFO] [stdout] 10 | if space.is_clicked(&position) && !space.fighter.is_none() && fighter.can_attack_to(space) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/models/buttons/move_button.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / pub fn new(parent_position: Position, fighter: Fighter) -> Button { [INFO] [stdout] 10 | | let action = Box::new(MoveButtonAction::new(fighter)); [INFO] [stdout] 11 | | [INFO] [stdout] 12 | | Button::new( [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/models/buttons/attack_button.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / pub fn new(parent_position: Position, fighter: Fighter) -> Button { [INFO] [stdout] 10 | | let action = Box::new(AttackButtonAction::new(fighter)); [INFO] [stdout] 11 | | [INFO] [stdout] 12 | | Button::new( [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/global_events.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | GLOBAL_EVENTS.push(ev); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/global_events.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | REMOVABLE_EVENTS.push(id); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/global_events.rs:20:19 [INFO] [stdout] | [INFO] [stdout] 20 | for id in REMOVABLE_EVENTS.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/global_events.rs:21:25 [INFO] [stdout] | [INFO] [stdout] 21 | let found = GLOBAL_EVENTS.iter().enumerate().find(|(index, event)|{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/global_events.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 25 | GLOBAL_EVENTS.remove(index); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/global_events.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | REMOVABLE_EVENTS.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/global_events.rs:36:26 [INFO] [stdout] | [INFO] [stdout] 36 | for event in GLOBAL_EVENTS.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/enums/board_state/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod board_state; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [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/enums/board_state/board_state_logic/idle.rs:5:37 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn click_action(&self, map: &mut Vec>, position: &Position) { [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] 5 - pub fn click_action(&self, map: &mut Vec>, position: &Position) { [INFO] [stdout] 5 + pub fn click_action(&self, map: &mut [Vec], position: &Position) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/idle.rs:9:32 [INFO] [stdout] | [INFO] [stdout] 9 | if space.click(&position) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [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/enums/board_state/board_state_logic/selecting_move.rs:9:37 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn click_action(&self, map: &mut Vec>, position: &Position, moving_fighter_option: Option) { [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] 9 - pub fn click_action(&self, map: &mut Vec>, position: &Position, moving_fighter_option: Option) { [INFO] [stdout] 9 + pub fn click_action(&self, map: &mut [Vec], position: &Position, moving_fighter_option: Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_move.rs:14:41 [INFO] [stdout] | [INFO] [stdout] 14 | if space.is_clicked(&position) && space.fighter.is_none() && fighter.can_move_to(space) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_move.rs:17:47 [INFO] [stdout] | [INFO] [stdout] 17 | f.update_map_position(&space); [INFO] [stdout] | ^^^^^^ help: change this to: `space` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_move.rs:34:35 [INFO] [stdout] | [INFO] [stdout] 34 | if space.near(&container_space) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `container_space` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_victim.rs:10:55 [INFO] [stdout] | [INFO] [stdout] 10 | if space.is_clicked(&position) && !space.fighter.is_none() && fighter.can_attack_to(space) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `space.fighter.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_victim.rs:5:37 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn click_action(&self, map: &mut Vec>, position: &Position, fighter_option: Option) { [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] 5 - pub fn click_action(&self, map: &mut Vec>, position: &Position, fighter_option: Option) { [INFO] [stdout] 5 + pub fn click_action(&self, map: &mut [Vec], position: &Position, fighter_option: Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/enums/board_state/board_state_logic/selecting_victim.rs:10:41 [INFO] [stdout] | [INFO] [stdout] 10 | if space.is_clicked(&position) && !space.fighter.is_none() && fighter.can_attack_to(space) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/global_events.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | GLOBAL_EVENTS.push(ev); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/global_events.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | REMOVABLE_EVENTS.push(id); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/global_events.rs:20:19 [INFO] [stdout] | [INFO] [stdout] 20 | for id in REMOVABLE_EVENTS.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/global_events.rs:21:25 [INFO] [stdout] | [INFO] [stdout] 21 | let found = GLOBAL_EVENTS.iter().enumerate().find(|(index, event)|{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/global_events.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 25 | GLOBAL_EVENTS.remove(index); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/global_events.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | REMOVABLE_EVENTS.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/global_events.rs:36:26 [INFO] [stdout] | [INFO] [stdout] 36 | for event in GLOBAL_EVENTS.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.76s [INFO] running `Command { std: "docker" "inspect" "aa8ea6ba77480156f78f869b29c846f6d621d79a997364c64e6bdff34abc862b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aa8ea6ba77480156f78f869b29c846f6d621d79a997364c64e6bdff34abc862b", kill_on_drop: false }` [INFO] [stdout] aa8ea6ba77480156f78f869b29c846f6d621d79a997364c64e6bdff34abc862b