[INFO] cloning repository https://github.com/eggmunkee/ggez-demo [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/eggmunkee/ggez-demo" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feggmunkee%2Fggez-demo", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feggmunkee%2Fggez-demo'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5592717e981d7e9e87ce28e99a3b96389b38e236 [INFO] linting eggmunkee/ggez-demo against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feggmunkee%2Fggez-demo" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/eggmunkee/ggez-demo [INFO] finished tweaking git repo https://github.com/eggmunkee/ggez-demo [INFO] tweaked toml for git repo https://github.com/eggmunkee/ggez-demo written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/eggmunkee/ggez-demo 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/eggmunkee/ggez-demo 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] Downloading crates ... [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.59 [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.59 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.59 [INFO] [stderr] Downloaded gilrs-core v0.2.5 [INFO] [stderr] Downloaded zip v0.5.5 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.59 [INFO] [stderr] Downloaded wasm-bindgen v0.2.59 [INFO] [stderr] Downloaded bzip2-sys v0.1.8+1.0.8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 1e85e717b80f2725621a0fd672fd9ea0a7bcdb5749c2147018a2443db2bcc960 [INFO] running `Command { std: "docker" "start" "-a" "1e85e717b80f2725621a0fd672fd9ea0a7bcdb5749c2147018a2443db2bcc960", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1e85e717b80f2725621a0fd672fd9ea0a7bcdb5749c2147018a2443db2bcc960", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1e85e717b80f2725621a0fd672fd9ea0a7bcdb5749c2147018a2443db2bcc960", kill_on_drop: false }` [INFO] [stdout] 1e85e717b80f2725621a0fd672fd9ea0a7bcdb5749c2147018a2443db2bcc960 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 4ced2c66edc07c7e75f916502c2f62357503ae969f9846cc98cde8df7a045776 [INFO] running `Command { std: "docker" "start" "-a" "4ced2c66edc07c7e75f916502c2f62357503ae969f9846cc98cde8df7a045776", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.67 [INFO] [stderr] Compiling serde v1.0.104 [INFO] [stderr] Compiling syn v1.0.16 [INFO] [stderr] Compiling syn v0.15.44 [INFO] [stderr] Compiling gl_generator v0.13.1 [INFO] [stderr] Compiling backtrace-sys v0.1.33 [INFO] [stderr] Compiling error-chain v0.12.2 [INFO] [stderr] Compiling ryu v1.0.2 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Compiling num-rational v0.2.3 [INFO] [stderr] Compiling num-complex v0.2.4 [INFO] [stderr] Compiling itoa v0.4.5 [INFO] [stderr] Compiling pulldown-cmark v0.2.0 [INFO] [stderr] Compiling rand v0.6.5 [INFO] [stderr] Checking draw_state v0.8.0 [INFO] [stderr] Compiling libudev-sys v0.1.4 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Compiling bzip2-sys v0.1.8+1.0.8 [INFO] [stderr] Compiling nix v0.15.0 [INFO] [stderr] Compiling walkdir v2.3.1 [INFO] [stderr] Checking gfx_core v0.9.2 [INFO] [stderr] Checking sid v0.5.2 [INFO] [stderr] Compiling bytecount v0.4.0 [INFO] [stderr] Checking either v1.5.3 [INFO] [stderr] Checking xi-unicode v0.2.0 [INFO] [stderr] Compiling gfx_gl v0.6.1 [INFO] [stderr] Checking generic-array v0.12.3 [INFO] [stderr] Checking ogg v0.7.0 [INFO] [stderr] Checking alga v0.9.3 [INFO] [stderr] Checking uuid v0.8.1 [INFO] [stderr] Checking jpeg-decoder v0.1.18 [INFO] [stderr] Checking lewton v0.9.4 [INFO] [stderr] Checking hound v3.4.0 [INFO] [stderr] Checking claxon v0.4.2 [INFO] [stderr] Checking podio v0.1.6 [INFO] [stderr] Compiling glutin_egl_sys v0.1.4 [INFO] [stderr] Compiling glutin_glx_sys v0.1.6 [INFO] [stderr] Compiling getrandom v0.1.14 [INFO] [stderr] Compiling rand v0.4.6 [INFO] [stderr] Compiling backtrace v0.3.45 [INFO] [stderr] Checking num_cpus v1.12.0 [INFO] [stderr] Checking nix v0.14.1 [INFO] [stderr] Checking memmap v0.7.0 [INFO] [stderr] Checking x11-dl v2.18.5 [INFO] [stderr] Checking raw-window-handle v0.3.3 [INFO] [stderr] Checking shared_library v0.1.9 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking rand_os v0.1.3 [INFO] [stderr] Checking osmesa-sys v0.1.2 [INFO] [stderr] Checking alsa-sys v0.1.2 [INFO] [stderr] Checking rand_chacha v0.2.1 [INFO] [stderr] Checking slice-deque v0.3.0 [INFO] [stderr] Checking bzip2 v0.3.3 [INFO] [stderr] Compiling tempdir v0.3.7 [INFO] [stderr] Checking dirs-sys v0.3.4 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking directories v2.0.2 [INFO] [stderr] Checking cpal v0.8.2 [INFO] [stderr] Checking gfx v0.18.2 [INFO] [stderr] Checking minimp3 v0.3.5 [INFO] [stderr] Checking zip v0.5.5 [INFO] [stderr] Checking nalgebra v0.18.1 [INFO] [stderr] Checking twox-hash v1.5.0 [INFO] [stderr] Checking gfx_device_gl v0.16.2 [INFO] [stderr] Checking toml v0.5.6 [INFO] [stderr] Compiling proc-macro-hack v0.5.11 [INFO] [stderr] Compiling serde_derive v1.0.104 [INFO] [stderr] Compiling euclid_macros v0.1.0 [INFO] [stderr] Compiling num-derive v0.2.5 [INFO] [stderr] Compiling smart-default v0.5.2 [INFO] [stderr] Compiling semver v0.9.0 [INFO] [stderr] Compiling serde_json v1.0.48 [INFO] [stderr] Checking gilrs-core v0.2.5 [INFO] [stderr] Compiling const-random-macro v0.1.8 [INFO] [stderr] Checking wayland-commons v0.21.13 [INFO] [stderr] Checking const-random v0.1.8 [INFO] [stderr] Checking ahash v0.3.2 [INFO] [stderr] Compiling rustc_version v0.2.3 [INFO] [stderr] Checking hashbrown v0.7.0 [INFO] [stderr] Checking gilrs v0.7.4 [INFO] [stderr] Checking wayland-client v0.21.13 [INFO] [stderr] Checking euclid v0.19.9 [INFO] [stderr] Compiling memoffset v0.5.3 [INFO] [stderr] Compiling parking_lot_core v0.6.2 [INFO] [stderr] Compiling parking_lot v0.9.0 [INFO] [stderr] Checking crossbeam-epoch v0.8.2 [INFO] [stderr] Checking crossbeam-deque v0.7.3 [INFO] [stderr] Checking rusttype v0.8.2 [INFO] [stderr] Checking rayon-core v1.7.0 [INFO] [stderr] Checking tiff v0.3.1 [INFO] [stderr] Checking rayon v1.3.0 [INFO] [stderr] Checking lyon_geom v0.12.7 [INFO] [stderr] Checking wayland-protocols v0.21.13 [INFO] [stderr] Checking rusttype v0.7.9 [INFO] [stderr] Checking glyph_brush_layout v0.1.9 [INFO] [stderr] Checking andrew v0.2.1 [INFO] [stderr] Checking image v0.22.5 [INFO] [stderr] Checking lyon_path v0.13.2 [INFO] [stderr] Checking glyph_brush v0.6.3 [INFO] [stderr] Checking lyon_algorithms v0.13.4 [INFO] [stderr] Checking lyon_tessellation v0.13.5 [INFO] [stderr] Checking glyph_brush v0.5.4 [INFO] [stderr] Checking lyon v0.13.5 [INFO] [stderr] Checking shred v0.10.2 [INFO] [stderr] Checking hibitset v0.6.3 [INFO] [stderr] Compiling cargo_metadata v0.6.4 [INFO] [stderr] Checking smithay-client-toolkit v0.4.6 [INFO] [stderr] Compiling skeptic v0.13.4 [INFO] [stderr] Checking specs v0.16.1 [INFO] [stderr] Compiling ggez v0.5.1 [INFO] [stderr] Checking winit v0.19.5 [INFO] [stderr] Checking glutin v0.20.1 [INFO] [stderr] Checking rodio v0.9.0 [INFO] [stderr] Checking gfx_window_glutin v0.30.0 [INFO] [stderr] Checking ggez_demo v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use ggez; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ContextBuilder` [INFO] [stdout] --> src/conf.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use ggez::{ContextBuilder}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:13:26 [INFO] [stdout] | [INFO] [stdout] 13 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [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: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:23:32 [INFO] [stdout] | [INFO] [stdout] 23 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:33:26 [INFO] [stdout] | [INFO] [stdout] 33 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:33:32 [INFO] [stdout] | [INFO] [stdout] 33 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:43:26 [INFO] [stdout] | [INFO] [stdout] 43 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:43:32 [INFO] [stdout] | [INFO] [stdout] 43 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `GameError` and `GameResult` [INFO] [stdout] --> src/entities/player.rs:1:21 [INFO] [stdout] | [INFO] [stdout] 1 | use ggez::{Context, GameResult, GameError}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ggez::graphics` [INFO] [stdout] --> src/entities/player.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use ggez::graphics; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Image` [INFO] [stdout] --> src/entities/player.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | use ggez::graphics::{Image}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ggez::nalgebra as na` [INFO] [stdout] --> src/entities/player.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use ggez::nalgebra as na; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `EntityBuilder` [INFO] [stdout] --> src/entities/player.rs:5:28 [INFO] [stdout] | [INFO] [stdout] 5 | use specs::{Builder,Entity,EntityBuilder,World,WorldExt}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `GameState` [INFO] [stdout] --> src/entities/player.rs:7:25 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::game_state::{GameState}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::systems::*` [INFO] [stdout] --> src/entities/player.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use crate::systems::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/player.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/player.rs:23:32 [INFO] [stdout] | [INFO] [stdout] 23 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Vector2` [INFO] [stdout] --> src/physics.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | use na::{Point2,Vector2,distance_squared,distance}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/physics.rs:96:38 [INFO] [stdout] | [INFO] [stdout] 96 | let total_friction = (friction_i + friction_j); [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] 96 - let total_friction = (friction_i + friction_j); [INFO] [stdout] 96 + let total_friction = friction_i + friction_j; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/components/ball.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | image: image, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `image` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/components/ball.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | flash: flash [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `flash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/components/player.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | image: image, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `image` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Point2`, `Vector2`, and `distance` [INFO] [stdout] --> src/components/collision.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | use ggez::nalgebra::{Point2,Vector2,distance}; [INFO] [stdout] | ^^^^^^ ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/resources/mod.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | font: font, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ggez::nalgebra as na` [INFO] [stdout] --> src/systems/mod.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use ggez::nalgebra as na; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/systems/mod.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Entities` [INFO] [stdout] --> src/systems/mod.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | Entities, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Collision` [INFO] [stdout] --> src/systems/mod.rs:16:36 [INFO] [stdout] | [INFO] [stdout] 16 | use crate::components::collision::{Collision}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PlayerComponent` [INFO] [stdout] --> src/systems/mod.rs:17:33 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::components::player::{PlayerComponent}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WorldAction` [INFO] [stdout] --> src/systems/input.rs:4:38 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::resources::{InputResource,WorldAction}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Point2`, `Vector2`, `distance_squared`, and `distance` [INFO] [stdout] --> src/systems/interactor.rs:7:22 [INFO] [stdout] | [INFO] [stdout] 7 | use ggez::nalgebra::{Point2,Vector2,distance,distance_squared}; [INFO] [stdout] | ^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `InputResource` [INFO] [stdout] --> src/systems/interactor.rs:9:24 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::resources::{InputResource}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `GameError` [INFO] [stdout] --> src/render.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | use ggez::{Context, GameResult, GameError}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DrawParam` [INFO] [stdout] --> src/render.rs:6:28 [INFO] [stdout] | [INFO] [stdout] 6 | use ggez::graphics::{Color,DrawParam,set_window_title}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DisplayCompType` and `DisplayComp` [INFO] [stdout] --> src/render.rs:13:34 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::components::{Position,DisplayComp,DisplayCompType,RenderTrait}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PlayerComponent` [INFO] [stdout] --> src/render.rs:15:33 [INFO] [stdout] | [INFO] [stdout] 15 | use crate::components::player::{PlayerComponent,CharacterDisplayComponent}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WorldExt` [INFO] [stdout] --> src/input.rs:5:20 [INFO] [stdout] | [INFO] [stdout] 5 | use specs::{World, WorldExt}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WorldAction` [INFO] [stdout] --> src/input.rs:7:38 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::resources::{InputResource,WorldAction}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::hash_map::*` [INFO] [stdout] --> src/game_state.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::hash_map::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/game_state.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use ggez; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ggez::nalgebra as na` [INFO] [stdout] --> src/game_state.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use ggez::nalgebra as na; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `GameError` [INFO] [stdout] --> src/game_state.rs:8:33 [INFO] [stdout] | [INFO] [stdout] 8 | use ggez::{Context, GameResult, GameError}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `NumSamples` and `WindowSetup` [INFO] [stdout] --> src/game_state.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | use ggez::conf::{NumSamples,WindowSetup,WindowMode}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Color`, `Image`, and `set_window_title` [INFO] [stdout] --> src/game_state.rs:10:27 [INFO] [stdout] | [INFO] [stdout] 10 | use ggez::graphics::{Rect,Color,Image,set_window_title}; [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Builder`, `Component`, `DispatcherBuilder`, `RunNow`, `System`, and `VecStorage` [INFO] [stdout] --> src/game_state.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | use specs::{Builder, Component, DispatcherBuilder, Dispatcher,// ReadStorage, WriteStorage, [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 13 | System, VecStorage, World, WorldExt, RunNow}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/game_state.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `InputResource` and `WorldAction` [INFO] [stdout] --> src/game_state.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::resources::{InputResource,WorldAction,GameStateResource}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `MouseInput` [INFO] [stdout] --> src/game_state.rs:24:29 [INFO] [stdout] | [INFO] [stdout] 24 | use crate::input::{InputMap,MouseInput}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/game_state.rs:53:47 [INFO] [stdout] | [INFO] [stdout] 53 | window_w: win_w, window_h: win_h, window_mode: window_mode, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/game_state.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | font: font, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use ggez; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ContextBuilder` [INFO] [stdout] --> src/conf.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use ggez::{ContextBuilder}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:13:26 [INFO] [stdout] | [INFO] [stdout] 13 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [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: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:23:32 [INFO] [stdout] | [INFO] [stdout] 23 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:33:26 [INFO] [stdout] | [INFO] [stdout] 33 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:33:32 [INFO] [stdout] | [INFO] [stdout] 33 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:43:26 [INFO] [stdout] | [INFO] [stdout] 43 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/ball.rs:43:32 [INFO] [stdout] | [INFO] [stdout] 43 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `GameError` and `GameResult` [INFO] [stdout] --> src/entities/player.rs:1:21 [INFO] [stdout] | [INFO] [stdout] 1 | use ggez::{Context, GameResult, GameError}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ggez::graphics` [INFO] [stdout] --> src/entities/player.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use ggez::graphics; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Image` [INFO] [stdout] --> src/entities/player.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | use ggez::graphics::{Image}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ggez::nalgebra as na` [INFO] [stdout] --> src/entities/player.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use ggez::nalgebra as na; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `EntityBuilder` [INFO] [stdout] --> src/entities/player.rs:5:28 [INFO] [stdout] | [INFO] [stdout] 5 | use specs::{Builder,Entity,EntityBuilder,World,WorldExt}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `GameState` [INFO] [stdout] --> src/entities/player.rs:7:25 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::game_state::{GameState}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::systems::*` [INFO] [stdout] --> src/entities/player.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use crate::systems::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/player.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entities/player.rs:23:32 [INFO] [stdout] | [INFO] [stdout] 23 | .with(Position { x: x, y: y }) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Vector2` [INFO] [stdout] --> src/physics.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | use na::{Point2,Vector2,distance_squared,distance}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/physics.rs:96:38 [INFO] [stdout] | [INFO] [stdout] 96 | let total_friction = (friction_i + friction_j); [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] 96 - let total_friction = (friction_i + friction_j); [INFO] [stdout] 96 + let total_friction = friction_i + friction_j; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/components/ball.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | image: image, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `image` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/components/ball.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | flash: flash [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `flash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/components/player.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | image: image, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `image` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Point2`, `Vector2`, and `distance` [INFO] [stdout] --> src/components/collision.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | use ggez::nalgebra::{Point2,Vector2,distance}; [INFO] [stdout] | ^^^^^^ ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/resources/mod.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | font: font, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ggez::nalgebra as na` [INFO] [stdout] --> src/systems/mod.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use ggez::nalgebra as na; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/systems/mod.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Entities` [INFO] [stdout] --> src/systems/mod.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | Entities, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Collision` [INFO] [stdout] --> src/systems/mod.rs:16:36 [INFO] [stdout] | [INFO] [stdout] 16 | use crate::components::collision::{Collision}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PlayerComponent` [INFO] [stdout] --> src/systems/mod.rs:17:33 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::components::player::{PlayerComponent}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WorldAction` [INFO] [stdout] --> src/systems/input.rs:4:38 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::resources::{InputResource,WorldAction}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Point2`, `Vector2`, `distance_squared`, and `distance` [INFO] [stdout] --> src/systems/interactor.rs:7:22 [INFO] [stdout] | [INFO] [stdout] 7 | use ggez::nalgebra::{Point2,Vector2,distance,distance_squared}; [INFO] [stdout] | ^^^^^^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `InputResource` [INFO] [stdout] --> src/systems/interactor.rs:9:24 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::resources::{InputResource}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `GameError` [INFO] [stdout] --> src/render.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | use ggez::{Context, GameResult, GameError}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DrawParam` [INFO] [stdout] --> src/render.rs:6:28 [INFO] [stdout] | [INFO] [stdout] 6 | use ggez::graphics::{Color,DrawParam,set_window_title}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DisplayCompType` and `DisplayComp` [INFO] [stdout] --> src/render.rs:13:34 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::components::{Position,DisplayComp,DisplayCompType,RenderTrait}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PlayerComponent` [INFO] [stdout] --> src/render.rs:15:33 [INFO] [stdout] | [INFO] [stdout] 15 | use crate::components::player::{PlayerComponent,CharacterDisplayComponent}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WorldExt` [INFO] [stdout] --> src/input.rs:5:20 [INFO] [stdout] | [INFO] [stdout] 5 | use specs::{World, WorldExt}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WorldAction` [INFO] [stdout] --> src/input.rs:7:38 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::resources::{InputResource,WorldAction}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::hash_map::*` [INFO] [stdout] --> src/game_state.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::hash_map::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/game_state.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use ggez; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ggez::nalgebra as na` [INFO] [stdout] --> src/game_state.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use ggez::nalgebra as na; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `GameError` [INFO] [stdout] --> src/game_state.rs:8:33 [INFO] [stdout] | [INFO] [stdout] 8 | use ggez::{Context, GameResult, GameError}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `NumSamples` and `WindowSetup` [INFO] [stdout] --> src/game_state.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | use ggez::conf::{NumSamples,WindowSetup,WindowMode}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Color`, `Image`, and `set_window_title` [INFO] [stdout] --> src/game_state.rs:10:27 [INFO] [stdout] | [INFO] [stdout] 10 | use ggez::graphics::{Rect,Color,Image,set_window_title}; [INFO] [stdout] | ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Builder`, `Component`, `DispatcherBuilder`, `RunNow`, `System`, and `VecStorage` [INFO] [stdout] --> src/game_state.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | use specs::{Builder, Component, DispatcherBuilder, Dispatcher,// ReadStorage, WriteStorage, [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 13 | System, VecStorage, World, WorldExt, RunNow}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/game_state.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `InputResource` and `WorldAction` [INFO] [stdout] --> src/game_state.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::resources::{InputResource,WorldAction,GameStateResource}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `MouseInput` [INFO] [stdout] --> src/game_state.rs:24:29 [INFO] [stdout] | [INFO] [stdout] 24 | use crate::input::{InputMap,MouseInput}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/game_state.rs:53:47 [INFO] [stdout] | [INFO] [stdout] 53 | window_w: win_w, window_h: win_h, window_mode: window_mode, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/game_state.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | font: font, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `font` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WorldExt` [INFO] [stdout] --> src/systems/interactor.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | use specs::{WorldExt}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude` [INFO] [stdout] --> src/render.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude` [INFO] [stdout] --> src/systems/interactor.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `imp` is never read [INFO] [stdout] --> src/physics.rs:60:23 [INFO] [stdout] | [INFO] [stdout] 60 | let mut imp = 0.0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mass_frac_i` is never read [INFO] [stdout] --> src/physics.rs:85:39 [INFO] [stdout] | [INFO] [stdout] 85 | let mut mass_frac_i = 0.5; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mass_frac_j` is never read [INFO] [stdout] --> src/physics.rs:86:39 [INFO] [stdout] | [INFO] [stdout] 86 | let mut mass_frac_j = 0.5; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/physics.rs:159:17 [INFO] [stdout] | [INFO] [stdout] 159 | let mut x_imp = imp * x_dif; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/physics.rs:160:17 [INFO] [stdout] | [INFO] [stdout] 160 | let mut y_imp = imp * y_dif; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `friction_i` [INFO] [stdout] --> src/physics.rs:144:31 [INFO] [stdout] | [INFO] [stdout] 144 | mass_i: f32, mass_j: f32, friction_i: f32, friction_j: f32, combined_obj_radius: f32) { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_friction_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `friction_j` [INFO] [stdout] --> src/physics.rs:144:48 [INFO] [stdout] | [INFO] [stdout] 144 | mass_i: f32, mass_j: f32, friction_i: f32, friction_j: f32, combined_obj_radius: f32) { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_friction_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `imp` is never read [INFO] [stdout] --> src/physics.rs:151:23 [INFO] [stdout] | [INFO] [stdout] 151 | let mut imp = 0.0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `w` [INFO] [stdout] --> src/components/ball.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | let w = self.image.width(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_w` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `h` [INFO] [stdout] --> src/components/ball.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | let h = self.image.height(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_h` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vel` [INFO] [stdout] --> src/systems/input.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | let (vel, _player, _e) = inn_v; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_vel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/input.rs:73:41 [INFO] [stdout] | [INFO] [stdout] 73 | fn run(&mut self, (mut vel, player, mut input, ent): Self::SystemData) { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/input.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | let mut list = (&mut vel, &player, &ent).join().collect::>(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | fn run(&mut self, (mut pos, mut vel, collision, ent): Self::SystemData) { [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:99:29 [INFO] [stdout] | [INFO] [stdout] 99 | let mut ent_vec = block_hash.get_mut(&(i,j)).unwrap(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:199:53 [INFO] [stdout] | [INFO] [stdout] 199 | ... if let Some(mut velocity_i) = svel_i { [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:209:53 [INFO] [stdout] | [INFO] [stdout] 209 | ... if let Some(mut velocity_j) = svel_j { [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rng` [INFO] [stdout] --> src/systems/interactor.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_rng` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `char_disp` [INFO] [stdout] --> src/render.rs:65:18 [INFO] [stdout] | [INFO] [stdout] 65 | for (char_disp,pos,ent) in (&char_disp,&pos,&entities).join() { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_char_disp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ball_disp` [INFO] [stdout] --> src/render.rs:77:18 [INFO] [stdout] | [INFO] [stdout] 77 | for (ball_disp,pos,ent) in (&ball_disp,&pos,&entities).join() { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ball_disp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `keymod` [INFO] [stdout] --> src/input.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | keymod: KeyMods,) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_keymod` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ctx` [INFO] [stdout] --> src/input.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | ctx: &mut Context, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `keymod` [INFO] [stdout] --> src/input.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | keymod: KeyMods,) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_keymod` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/input.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/input.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 150 | MouseInput::Left => { [INFO] [stdout] | ---------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 155 | MouseInput::Middle => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 162 | MouseInput::Right => { [INFO] [stdout] | ----------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 168 | _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/input.rs:194:17 [INFO] [stdout] | [INFO] [stdout] 194 | _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/input.rs:194:17 [INFO] [stdout] | [INFO] [stdout] 178 | MouseInput::Left => { [INFO] [stdout] | ---------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 183 | MouseInput::Middle => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 188 | MouseInput::Right => { [INFO] [stdout] | ----------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 194 | _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ctx` [INFO] [stdout] --> src/game_state.rs:151:26 [INFO] [stdout] | [INFO] [stdout] 151 | fn update(&mut self, ctx: &mut Context) -> GameResult { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/game_state.rs:184:83 [INFO] [stdout] | [INFO] [stdout] 184 | fn mouse_button_down_event(&mut self, ctx: &mut Context, button: MouseButton, x: f32, y: f32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/game_state.rs:184:91 [INFO] [stdout] | [INFO] [stdout] 184 | fn mouse_button_down_event(&mut self, ctx: &mut Context, button: MouseButton, x: f32, y: f32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/game_state.rs:204:81 [INFO] [stdout] | [INFO] [stdout] 204 | fn mouse_button_up_event(&mut self, ctx: &mut Context, button: MouseButton, x: f32, y: f32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/game_state.rs:204:89 [INFO] [stdout] | [INFO] [stdout] 204 | fn mouse_button_up_event(&mut self, ctx: &mut Context, button: MouseButton, x: f32, y: f32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `xrel` [INFO] [stdout] --> src/game_state.rs:223:74 [INFO] [stdout] | [INFO] [stdout] 223 | fn mouse_motion_event(&mut self, _ctx: &mut Context, x: f32, y: f32, xrel: f32, yrel: f32) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_xrel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `yrel` [INFO] [stdout] --> src/game_state.rs:223:85 [INFO] [stdout] | [INFO] [stdout] 223 | fn mouse_motion_event(&mut self, _ctx: &mut Context, x: f32, y: f32, xrel: f32, yrel: f32) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_yrel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WorldExt` [INFO] [stdout] --> src/systems/interactor.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | use specs::{WorldExt}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude` [INFO] [stdout] --> src/render.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude` [INFO] [stdout] --> src/systems/interactor.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `build` and `build_static` are never used [INFO] [stdout] --> src/entities/ball.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl BallBuilder { [INFO] [stdout] | ---------------- associated functions in this implementation [INFO] [stdout] 11 | pub fn build(world: &mut World, ctx: &mut Context, x: f32, y: f32, vx: f32, vy: f32) -> Entity { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn build_static(world: &mut World, ctx: &mut Context, x: f32, y: f32) -> Entity { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `imp` is never read [INFO] [stdout] --> src/physics.rs:60:23 [INFO] [stdout] | [INFO] [stdout] 60 | let mut imp = 0.0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `radius_square_check_points` is never used [INFO] [stdout] --> src/physics.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn radius_square_check_points(point: &Point2, check_point: &Point2, radius: f32) -> (bool, f32, Point2, Point2 src/physics.rs:85:39 [INFO] [stdout] | [INFO] [stdout] 85 | let mut mass_frac_i = 0.5; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mass_frac_j` is never read [INFO] [stdout] --> src/physics.rs:86:39 [INFO] [stdout] | [INFO] [stdout] 86 | let mut mass_frac_j = 0.5; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `actors_push_squares` is never used [INFO] [stdout] --> src/physics.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn actors_push_squares(pos_i: &na::Point2, pos_j: &na::Point2, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `row` and `col` are never read [INFO] [stdout] --> src/components/mod.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct GridLoc { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 16 | pub row: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] 17 | pub col: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GridLoc` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `circle` and `display_type` are never read [INFO] [stdout] --> src/components/mod.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 64 | pub struct DisplayComp { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 65 | pub circle: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 66 | pub display_type: DisplayCompType, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DisplayComp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `path` is never read [INFO] [stdout] --> src/components/ball.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct BallDisplayComponent { [INFO] [stdout] | -------------------- field in this struct [INFO] [stdout] 14 | pub image: Image, // component owns image [INFO] [stdout] 15 | pub path: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `BallDisplayComponent` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `life` and `move_ramp_up` are never read [INFO] [stdout] --> src/components/player.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct PlayerComponent { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 13 | pub player_name: String, [INFO] [stdout] 14 | pub life: i32, [INFO] [stdout] | ^^^^ [INFO] [stdout] 15 | pub move_ramp_up: f32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PlayerComponent` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `path` is never read [INFO] [stdout] --> src/components/player.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct CharacterDisplayComponent { [INFO] [stdout] | ------------------------- field in this struct [INFO] [stdout] 45 | pub image: Image, // component owns image [INFO] [stdout] 46 | pub path: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `CharacterDisplayComponent` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/components/collision.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | Circle(f32), [INFO] [stdout] | ------ ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `CollisionShape` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 7 - Circle(f32), [INFO] [stdout] 7 + Circle(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Square` is never constructed [INFO] [stdout] --> src/components/collision.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub enum CollisionShape { [INFO] [stdout] | -------------- variant in this enum [INFO] [stdout] 7 | Circle(f32), [INFO] [stdout] 8 | Square(f32) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `CollisionShape` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `shape` is never read [INFO] [stdout] --> src/components/collision.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct Collision { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 13 | pub shape: CollisionShape, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Collision` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new_circle` and `new_square` are never used [INFO] [stdout] --> src/components/collision.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Collision { [INFO] [stdout] | -------------- associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn new_circle(radius: f32) -> Collision { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn new_square(radius: f32) -> Collision { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AddCircle` is never constructed [INFO] [stdout] --> src/resources/mod.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 66 | pub enum WorldAction { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] 67 | AddCircle, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `WorldAction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `actions` is never read [INFO] [stdout] --> src/resources/mod.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 75 | pub struct InputResource { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pub actions: Vec::, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `InputResource` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `set_mouse_x` and `set_mouse_y` are never used [INFO] [stdout] --> src/resources/mod.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 84 | impl InputResource { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn set_mouse_x(&mut self, mouse_x: f32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 107 | pub fn set_mouse_y(&mut self, mouse_y: f32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `t_delta` is never read [INFO] [stdout] --> src/systems/mod.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | pub struct UpdatePos { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 33 | pub t_delta: Duration [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SumSys` is never constructed [INFO] [stdout] --> src/systems/mod.rs:117:12 [INFO] [stdout] | [INFO] [stdout] 117 | pub struct SumSys; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NpcInputSystem` is never constructed [INFO] [stdout] --> src/systems/input.rs:97:12 [INFO] [stdout] | [INFO] [stdout] 97 | pub struct NpcInputSystem; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `font` is never read [INFO] [stdout] --> src/game_state.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct GameState<'a> { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 41 | pub font: graphics::Font, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/physics.rs:159:17 [INFO] [stdout] | [INFO] [stdout] 159 | let mut x_imp = imp * x_dif; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/physics.rs:160:17 [INFO] [stdout] | [INFO] [stdout] 160 | let mut y_imp = imp * y_dif; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `friction_i` [INFO] [stdout] --> src/physics.rs:144:31 [INFO] [stdout] | [INFO] [stdout] 144 | mass_i: f32, mass_j: f32, friction_i: f32, friction_j: f32, combined_obj_radius: f32) { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_friction_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `friction_j` [INFO] [stdout] --> src/physics.rs:144:48 [INFO] [stdout] | [INFO] [stdout] 144 | mass_i: f32, mass_j: f32, friction_i: f32, friction_j: f32, combined_obj_radius: f32) { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_friction_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `imp` is never read [INFO] [stdout] --> src/physics.rs:151:23 [INFO] [stdout] | [INFO] [stdout] 151 | let mut imp = 0.0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `w` [INFO] [stdout] --> src/components/ball.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | let w = self.image.width(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_w` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `h` [INFO] [stdout] --> src/components/ball.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | let h = self.image.height(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_h` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/entities/ball.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn build_collider(world: &mut World, ctx: &mut Context, x: f32, y: f32, vx: f32, vy: f32, m: f32, fric: f32) -> Entity { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/physics.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / pub fn actors_push(pos_i: &na::Point2, pos_j: &na::Point2, [INFO] [stdout] 52 | | svel_i : Option<&mut na::Vector2>, svel_j : Option<&mut na::Vector2>, [INFO] [stdout] 53 | | mass_i: f32, mass_j: f32, friction_i: f32, friction_j: f32, combined_obj_radius: f32) { [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/physics.rs:58:65 [INFO] [stdout] | [INFO] [stdout] 58 | let (check, dist, pos_i, pos_j) = self::radius_check_points(&pos_i, &pos_j, touch_dist); [INFO] [stdout] | ^^^^^^ help: change this to: `pos_i` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/physics.rs:58:73 [INFO] [stdout] | [INFO] [stdout] 58 | let (check, dist, pos_i, pos_j) = self::radius_check_points(&pos_i, &pos_j, touch_dist); [INFO] [stdout] | ^^^^^^ help: change this to: `pos_j` [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: unused variable: `vel` [INFO] [stdout] --> src/systems/input.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | let (vel, _player, _e) = inn_v; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_vel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/physics.rs:76:28 [INFO] [stdout] | [INFO] [stdout] 76 | let no_i = match svel_i { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 77 | | Some(_) => true, [INFO] [stdout] 78 | | _ => false [INFO] [stdout] 79 | | }; [INFO] [stdout] | |_________________^ help: try: `svel_i.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/physics.rs:80:28 [INFO] [stdout] | [INFO] [stdout] 80 | let no_j = match svel_j { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 81 | | Some(_) => true, [INFO] [stdout] 82 | | _ => false [INFO] [stdout] 83 | | }; [INFO] [stdout] | |_________________^ help: try: `svel_j.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/physics.rs:142:1 [INFO] [stdout] | [INFO] [stdout] 142 | / pub fn actors_push_squares(pos_i: &na::Point2, pos_j: &na::Point2, [INFO] [stdout] 143 | | svel_i : Option<&mut na::Vector2>, svel_j : Option<&mut na::Vector2>, [INFO] [stdout] 144 | | mass_i: f32, mass_j: f32, friction_i: f32, friction_j: f32, combined_obj_radius: f32) { [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/physics.rs:149:72 [INFO] [stdout] | [INFO] [stdout] 149 | let (check, dist, pos_i, pos_j) = self::radius_square_check_points(&pos_i, &pos_j, touch_dist); [INFO] [stdout] | ^^^^^^ help: change this to: `pos_i` [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/physics.rs:149:80 [INFO] [stdout] | [INFO] [stdout] 149 | let (check, dist, pos_i, pos_j) = self::radius_square_check_points(&pos_i, &pos_j, touch_dist); [INFO] [stdout] | ^^^^^^ help: change this to: `pos_j` [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: variable does not need to be mutable [INFO] [stdout] --> src/systems/input.rs:73:41 [INFO] [stdout] | [INFO] [stdout] 73 | fn run(&mut self, (mut vel, player, mut input, ent): Self::SystemData) { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/input.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | let mut list = (&mut vel, &player, &ent).join().collect::>(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/physics.rs:167:28 [INFO] [stdout] | [INFO] [stdout] 167 | let no_i = match svel_i { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 168 | | Some(_) => true, [INFO] [stdout] 169 | | _ => false [INFO] [stdout] 170 | | }; [INFO] [stdout] | |_________________^ help: try: `svel_i.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/physics.rs:171:28 [INFO] [stdout] | [INFO] [stdout] 171 | let no_j = match svel_j { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 172 | | Some(_) => true, [INFO] [stdout] 173 | | _ => false [INFO] [stdout] 174 | | }; [INFO] [stdout] | |_________________^ help: try: `svel_j.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/components/ball.rs:24:45 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn new(ctx: &mut Context, char_img: &String, flash: bool) -> BallDisplayComponent { [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] 24 ~ pub fn new(ctx: &mut Context, char_img: &str, flash: bool) -> BallDisplayComponent { [INFO] [stdout] 25 ~ let image = Image::new(ctx, char_img.to_owned()).unwrap(); [INFO] [stdout] 26 | [INFO] [stdout] ... [INFO] [stdout] 38 | image: image, [INFO] [stdout] 39 ~ path: char_img.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/components/ball.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if let Err(_) = ggez::graphics::draw(ctx, &self.image, ( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 90 ~ if ggez::graphics::draw(ctx, &self.image, ( [INFO] [stdout] 91 + draw_pos.clone(), [INFO] [stdout] 92 + 0.75f32, //rotation [INFO] [stdout] 93 + na::Point2::new(0.5f32,0.5f32), [INFO] [stdout] 94 + na::Vector2::new(1.0f32,1.0f32), [INFO] [stdout] 95 ~ Color::new(1.0,1.0,1.0,1.0))).is_err() { // add back x/y pos // [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | fn run(&mut self, (mut pos, mut vel, collision, ent): Self::SystemData) { [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:99:29 [INFO] [stdout] | [INFO] [stdout] 99 | let mut ent_vec = block_hash.get_mut(&(i,j)).unwrap(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:199:53 [INFO] [stdout] | [INFO] [stdout] 199 | ... if let Some(mut velocity_i) = svel_i { [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/systems/interactor.rs:209:53 [INFO] [stdout] | [INFO] [stdout] 209 | ... if let Some(mut velocity_j) = svel_j { [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rng` [INFO] [stdout] --> src/systems/interactor.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_rng` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/components/ball.rs:91:21 [INFO] [stdout] | [INFO] [stdout] 91 | draw_pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `draw_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` 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/components/ball.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | / match graphics::Mesh::new_circle( [INFO] [stdout] 120 | | ctx, [INFO] [stdout] 121 | | graphics::DrawMode::fill(), [INFO] [stdout] 122 | | na::Point2::new(0.0, 0.0), [INFO] [stdout] ... | [INFO] [stdout] 142 | | _ => {} [INFO] [stdout] 143 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 119 ~ if let Ok(circle) = graphics::Mesh::new_circle( [INFO] [stdout] 120 + ctx, [INFO] [stdout] 121 + graphics::DrawMode::fill(), [INFO] [stdout] 122 + na::Point2::new(0.0, 0.0), [INFO] [stdout] 123 + 23.0, // bleed over 2 pixel edge of texture [INFO] [stdout] 124 + 0.5, [INFO] [stdout] 125 + graphics::WHITE, [INFO] [stdout] 126 + ) { [INFO] [stdout] 127 + let mut col_vals: (u8,u8,u8) = rng.gen(); [INFO] [stdout] 128 + if col_vals.0 < 27 { col_vals.0 += 228; } [INFO] [stdout] 129 + if col_vals.1 < 27 { col_vals.1 += 228; } [INFO] [stdout] 130 + if col_vals.2 < 27 { col_vals.2 += 228; } [INFO] [stdout] 131 + let mut _draw_ok = true; [INFO] [stdout] 132 + //println!("Entity {}, Circle pos: {:?}", ent.id(), pos); [INFO] [stdout] 133 + if let Err(_) = graphics::draw(ctx, &circle, DrawParam::default() [INFO] [stdout] 134 + .dest(na::Point2::new(pos.x, pos.y)) [INFO] [stdout] 135 + .scale(na::Vector2::new(1.0f32,1.0f32)) [INFO] [stdout] 136 + .color(Color::from_rgba(col_vals.0,col_vals.1,col_vals.2,128)) ) { [INFO] [stdout] 137 + _draw_ok = false; [INFO] [stdout] 138 + }; [INFO] [stdout] 139 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/components/ball.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 135 | if let Err(_) = graphics::draw(ctx, &circle, DrawParam::default() [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 135 ~ if graphics::draw(ctx, &circle, DrawParam::default() [INFO] [stdout] 136 + .dest(na::Point2::new(pos.x, pos.y)) [INFO] [stdout] 137 + .scale(na::Vector2::new(1.0f32,1.0f32)) [INFO] [stdout] 138 ~ .color(Color::from_rgba(col_vals.0,col_vals.1,col_vals.2,128)) ).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/components/player.rs:53:45 [INFO] [stdout] | [INFO] [stdout] 53 | pub fn new(ctx: &mut Context, char_img: &String) -> CharacterDisplayComponent { [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] 53 ~ pub fn new(ctx: &mut Context, char_img: &str) -> CharacterDisplayComponent { [INFO] [stdout] 54 ~ let image = Image::new(ctx, char_img.to_owned()).unwrap(); [INFO] [stdout] 55 | [INFO] [stdout] 56 | CharacterDisplayComponent { [INFO] [stdout] 57 | image: image, [INFO] [stdout] 58 ~ path: char_img.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/components/player.rs:101:16 [INFO] [stdout] | [INFO] [stdout] 101 | if let Err(_) = ggez::graphics::draw(ctx, &self.image, (draw_pos.clone(),)) { // add back x/y pos // [INFO] [stdout] | -------^^^^^^-------------------------------------------------------------- help: try: `if ggez::graphics::draw(ctx, &self.image, (draw_pos.clone(),)).is_err()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/components/player.rs:101:65 [INFO] [stdout] | [INFO] [stdout] 101 | if let Err(_) = ggez::graphics::draw(ctx, &self.image, (draw_pos.clone(),)) { // add back x/y pos // [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `draw_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/components/player.rs:113:20 [INFO] [stdout] | [INFO] [stdout] 113 | if let Err(_) = graphics::draw(ctx, &rect, (na::Point2::new(pos.x-2.0, pos.y-2.0), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 113 ~ if graphics::draw(ctx, &rect, (na::Point2::new(pos.x-2.0, pos.y-2.0), [INFO] [stdout] 114 ~ Color::from_rgba(col_vals.0,col_vals.0,col_vals.0,255) )).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/resources/mod.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | return self.image_lookup.contains_key(&path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 - return self.image_lookup.contains_key(&path); [INFO] [stdout] 32 + self.image_lookup.contains_key(&path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/resources/mod.rs:49:22 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn image_ref<'a>(&mut self, path:String) -> GameResult<&mut Image> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/resources/mod.rs:56:29 [INFO] [stdout] | [INFO] [stdout] 56 | let index = o.get().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*o.get()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/resources/mod.rs:70:1 [INFO] [stdout] | [INFO] [stdout] 70 | / impl Default for WorldAction { [INFO] [stdout] 71 | | fn default() -> Self { WorldAction::None } [INFO] [stdout] 72 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 66 + #[derive(Default)] [INFO] [stdout] 67 | pub enum WorldAction { [INFO] [stdout] 68 | AddCircle, [INFO] [stdout] 69 ~ #[default] [INFO] [stdout] 70 ~ None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `char_disp` [INFO] [stdout] --> src/render.rs:65:18 [INFO] [stdout] | [INFO] [stdout] 65 | for (char_disp,pos,ent) in (&char_disp,&pos,&entities).join() { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_char_disp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ball_disp` [INFO] [stdout] --> src/render.rs:77:18 [INFO] [stdout] | [INFO] [stdout] 77 | for (ball_disp,pos,ent) in (&ball_disp,&pos,&entities).join() { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ball_disp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `keymod` [INFO] [stdout] --> src/input.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | keymod: KeyMods,) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_keymod` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ctx` [INFO] [stdout] --> src/input.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | ctx: &mut Context, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `keymod` [INFO] [stdout] --> src/input.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | keymod: KeyMods,) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_keymod` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/input.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/input.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 150 | MouseInput::Left => { [INFO] [stdout] | ---------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 155 | MouseInput::Middle => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 162 | MouseInput::Right => { [INFO] [stdout] | ----------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 168 | _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/input.rs:194:17 [INFO] [stdout] | [INFO] [stdout] 194 | _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/input.rs:194:17 [INFO] [stdout] | [INFO] [stdout] 178 | MouseInput::Left => { [INFO] [stdout] | ---------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 183 | MouseInput::Middle => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 188 | MouseInput::Right => { [INFO] [stdout] | ----------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 194 | _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/systems/input.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | let multi_axis = (input.dirs_pressed[0] && (input.dirs_pressed[2] || input.dirs_pressed[3])) [INFO] [stdout] | __________________________^ [INFO] [stdout] 32 | | || (input.dirs_pressed[1] && (input.dirs_pressed[2] || input.dirs_pressed[3])); [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 31 - let multi_axis = (input.dirs_pressed[0] && (input.dirs_pressed[2] || input.dirs_pressed[3])) [INFO] [stdout] 32 - || (input.dirs_pressed[1] && (input.dirs_pressed[2] || input.dirs_pressed[3])); [INFO] [stdout] 31 + let multi_axis = !(!input.dirs_pressed[2] && !input.dirs_pressed[3] || !input.dirs_pressed[0] && !input.dirs_pressed[1]); [INFO] [stdout] | [INFO] [stdout] 31 - let multi_axis = (input.dirs_pressed[0] && (input.dirs_pressed[2] || input.dirs_pressed[3])) [INFO] [stdout] 32 - || (input.dirs_pressed[1] && (input.dirs_pressed[2] || input.dirs_pressed[3])); [INFO] [stdout] 31 + let multi_axis = (input.dirs_pressed[1] || input.dirs_pressed[0]) && (input.dirs_pressed[3] || input.dirs_pressed[2]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/systems/input.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | vec_amt = 0.71 * vec_amt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `vec_amt *= 0.71` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/systems/input.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | vec_amt = vec_amt * 0.05; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `vec_amt *= 0.05` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/systems/input.rs:63:17 [INFO] [stdout] | [INFO] [stdout] 63 | vel.x = vel.x.max(-40.0).min(40.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `vel.x.clamp(-40.0, 40.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/systems/input.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | else if list.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `list.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: deref which would be done by auto-deref [INFO] [stdout] --> src/systems/input.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | Self::test(list, &*input); [INFO] [stdout] | ^^^^^^^ help: try: `&input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ctx` [INFO] [stdout] --> src/game_state.rs:151:26 [INFO] [stdout] | [INFO] [stdout] 151 | fn update(&mut self, ctx: &mut Context) -> GameResult { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/game_state.rs:184:83 [INFO] [stdout] | [INFO] [stdout] 184 | fn mouse_button_down_event(&mut self, ctx: &mut Context, button: MouseButton, x: f32, y: f32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/game_state.rs:184:91 [INFO] [stdout] | [INFO] [stdout] 184 | fn mouse_button_down_event(&mut self, ctx: &mut Context, button: MouseButton, x: f32, y: f32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/game_state.rs:204:81 [INFO] [stdout] | [INFO] [stdout] 204 | fn mouse_button_up_event(&mut self, ctx: &mut Context, button: MouseButton, x: f32, y: f32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/game_state.rs:204:89 [INFO] [stdout] | [INFO] [stdout] 204 | fn mouse_button_up_event(&mut self, ctx: &mut Context, button: MouseButton, x: f32, y: f32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `xrel` [INFO] [stdout] --> src/game_state.rs:223:74 [INFO] [stdout] | [INFO] [stdout] 223 | fn mouse_motion_event(&mut self, _ctx: &mut Context, x: f32, y: f32, xrel: f32, yrel: f32) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_xrel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `yrel` [INFO] [stdout] --> src/game_state.rs:223:85 [INFO] [stdout] | [INFO] [stdout] 223 | fn mouse_motion_event(&mut self, _ctx: &mut Context, x: f32, y: f32, xrel: f32, yrel: f32) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_yrel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/systems/interactor.rs:98:21 [INFO] [stdout] | [INFO] [stdout] 98 | / if block_hash.contains_key(&(i,j)) { [INFO] [stdout] 99 | | let mut ent_vec = block_hash.get_mut(&(i,j)).unwrap(); [INFO] [stdout] 100 | | ent_vec.push(( [INFO] [stdout] 101 | | ent_id, [INFO] [stdout] ... | [INFO] [stdout] 115 | | block_hash.insert((i,j), ent_vec); [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 98 ~ if let std::collections::hash_map::Entry::Vacant(e) = block_hash.entry((i,j)) { [INFO] [stdout] 99 + let ent_vec = vec![( [INFO] [stdout] 100 + ent_id, [INFO] [stdout] 101 + px, py, [INFO] [stdout] 102 + mass, [INFO] [stdout] 103 + friction, [INFO] [stdout] 104 + )]; [INFO] [stdout] 105 + //let hash_key = buc_a_str.clone().as_str(); [INFO] [stdout] 106 + e.insert(ent_vec); [INFO] [stdout] 107 + } else { [INFO] [stdout] 108 + let mut ent_vec = block_hash.get_mut(&(i,j)).unwrap(); [INFO] [stdout] 109 + ent_vec.push(( [INFO] [stdout] 110 + ent_id, [INFO] [stdout] 111 + px, py, [INFO] [stdout] 112 + mass, [INFO] [stdout] 113 + friction, [INFO] [stdout] 114 + )); [INFO] [stdout] 115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/systems/interactor.rs:171:44 [INFO] [stdout] | [INFO] [stdout] 171 | ... if velocity_i.frozen == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!velocity_i.frozen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/systems/interactor.rs:180:44 [INFO] [stdout] | [INFO] [stdout] 180 | ... if velocity_j.frozen == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!velocity_j.frozen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/systems/interactor.rs:200:48 [INFO] [stdout] | [INFO] [stdout] 200 | ... if velocity_i.frozen == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!velocity_i.frozen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/systems/interactor.rs:210:48 [INFO] [stdout] | [INFO] [stdout] 210 | ... if velocity_j.frozen == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!velocity_j.frozen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/systems/mod.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 61 | let gl_vec = Vec::::new(); [INFO] [stdout] | ----------------------------------- unnecessary `let` binding [INFO] [stdout] ... [INFO] [stdout] 65 | gl_vec [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] 61 ~ [INFO] [stdout] 62 | [INFO] [stdout] 63 | [INFO] [stdout] 64 | [INFO] [stdout] 65 ~ Vec::::new() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/systems/mod.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | for (vel, pos) in (&vel, &pos).join() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, (vel, pos)) in (&vel, &pos).join().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/world.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn create_world<'a>(ctx: &mut Context, game_state_res: GameStateResource) -> World { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `build` and `build_static` are never used [INFO] [stdout] --> src/entities/ball.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl BallBuilder { [INFO] [stdout] | ---------------- associated functions in this implementation [INFO] [stdout] 11 | pub fn build(world: &mut World, ctx: &mut Context, x: f32, y: f32, vx: f32, vy: f32) -> Entity { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn build_static(world: &mut World, ctx: &mut Context, x: f32, y: f32) -> Entity { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `radius_square_check_points` is never used [INFO] [stdout] --> src/physics.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn radius_square_check_points(point: &Point2, check_point: &Point2, radius: f32) -> (bool, f32, Point2, Point2 src/physics.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn actors_push_squares(pos_i: &na::Point2, pos_j: &na::Point2, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `row` and `col` are never read [INFO] [stdout] --> src/components/mod.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct GridLoc { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 16 | pub row: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] 17 | pub col: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GridLoc` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/render.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 39 | res.draw(ctx, &world, Some(entity.id()), pt.clone()); [INFO] [stdout] | ^^^^^^ help: change this to: `world` [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: fields `circle` and `display_type` are never read [INFO] [stdout] --> src/components/mod.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 64 | pub struct DisplayComp { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 65 | pub circle: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 66 | pub display_type: DisplayCompType, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DisplayComp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/render.rs:39:58 [INFO] [stdout] | [INFO] [stdout] 39 | res.draw(ctx, &world, Some(entity.id()), pt.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*pt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/render.rs:48:31 [INFO] [stdout] | [INFO] [stdout] 48 | res.draw(ctx, &world, Some(entity.id()), pt.clone()); [INFO] [stdout] | ^^^^^^ help: change this to: `world` [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: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/render.rs:48:58 [INFO] [stdout] | [INFO] [stdout] 48 | res.draw(ctx, &world, Some(entity.id()), pt.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*pt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `path` is never read [INFO] [stdout] --> src/components/ball.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct BallDisplayComponent { [INFO] [stdout] | -------------------- field in this struct [INFO] [stdout] 14 | pub image: Image, // component owns image [INFO] [stdout] 15 | pub path: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `BallDisplayComponent` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `life` and `move_ramp_up` are never read [INFO] [stdout] --> src/components/player.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct PlayerComponent { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 13 | pub player_name: String, [INFO] [stdout] 14 | pub life: i32, [INFO] [stdout] | ^^^^ [INFO] [stdout] 15 | pub move_ramp_up: f32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PlayerComponent` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `path` is never read [INFO] [stdout] --> src/components/player.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct CharacterDisplayComponent { [INFO] [stdout] | ------------------------- field in this struct [INFO] [stdout] 45 | pub image: Image, // component owns image [INFO] [stdout] 46 | pub path: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `CharacterDisplayComponent` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/components/collision.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | Circle(f32), [INFO] [stdout] | ------ ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `CollisionShape` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 7 - Circle(f32), [INFO] [stdout] 7 + Circle(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Square` is never constructed [INFO] [stdout] --> src/components/collision.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub enum CollisionShape { [INFO] [stdout] | -------------- variant in this enum [INFO] [stdout] 7 | Circle(f32), [INFO] [stdout] 8 | Square(f32) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `CollisionShape` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `shape` is never read [INFO] [stdout] --> src/components/collision.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct Collision { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 13 | pub shape: CollisionShape, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Collision` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new_circle` and `new_square` are never used [INFO] [stdout] --> src/components/collision.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Collision { [INFO] [stdout] | -------------- associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn new_circle(radius: f32) -> Collision { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn new_square(radius: f32) -> Collision { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AddCircle` is never constructed [INFO] [stdout] --> src/resources/mod.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 66 | pub enum WorldAction { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] 67 | AddCircle, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `WorldAction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `actions` is never read [INFO] [stdout] --> src/resources/mod.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 75 | pub struct InputResource { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pub actions: Vec::, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `InputResource` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `set_mouse_x` and `set_mouse_y` are never used [INFO] [stdout] --> src/resources/mod.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 84 | impl InputResource { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn set_mouse_x(&mut self, mouse_x: f32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 107 | pub fn set_mouse_y(&mut self, mouse_y: f32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `t_delta` is never read [INFO] [stdout] --> src/systems/mod.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | pub struct UpdatePos { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 33 | pub t_delta: Duration [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SumSys` is never constructed [INFO] [stdout] --> src/systems/mod.rs:117:12 [INFO] [stdout] | [INFO] [stdout] 117 | pub struct SumSys; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NpcInputSystem` is never constructed [INFO] [stdout] --> src/systems/input.rs:97:12 [INFO] [stdout] | [INFO] [stdout] 97 | pub struct NpcInputSystem; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `font` is never read [INFO] [stdout] --> src/game_state.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct GameState<'a> { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 41 | pub font: graphics::Font, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/render.rs:99:61 [INFO] [stdout] | [INFO] [stdout] 99 | let entity = game_state.world.entities().entity(ent.clone()); // ;;fetch::(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*ent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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/render.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | / match &game_state.current_state { [INFO] [stdout] 132 | | State::Paused => { [INFO] [stdout] 133 | | let mut draw_ok = true; [INFO] [stdout] ... | [INFO] [stdout] 154 | | _ => {} [INFO] [stdout] 155 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 131 ~ if let State::Paused = &game_state.current_state { [INFO] [stdout] 132 + let mut draw_ok = true; [INFO] [stdout] 133 + [INFO] [stdout] 134 + let (w, h) = (game_state.window_w, game_state.window_h); [INFO] [stdout] 135 + let cent_x = w as f32 / 2.0; [INFO] [stdout] 136 + let cent_y = h as f32 / 2.0; [INFO] [stdout] 137 + [INFO] [stdout] 138 + // Render paused graphis [INFO] [stdout] 139 + if let Err(_) = graphics::draw(ctx, &game_state.paused_text, [INFO] [stdout] 140 + (na::Point2::new(cent_x-2.0,cent_y+2.0), [INFO] [stdout] 141 + Color::new(0.0,0.0,0.0,1.0))) { [INFO] [stdout] 142 + draw_ok = false; [INFO] [stdout] 143 + }; [INFO] [stdout] 144 + if let Err(_) = graphics::draw(ctx, &game_state.paused_text, (na::Point2::new(cent_x,cent_y), [INFO] [stdout] 145 + Color::new(0.8,0.85,1.0,1.0)) ) { [INFO] [stdout] 146 + draw_ok = false; [INFO] [stdout] 147 + }; [INFO] [stdout] 148 + [INFO] [stdout] 149 + if !draw_ok { [INFO] [stdout] 150 + println!("Draw error occurred"); [INFO] [stdout] 151 + } [INFO] [stdout] 152 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/render.rs:136:30 [INFO] [stdout] | [INFO] [stdout] 136 | let cent_x = w as f32 / 2.0; [INFO] [stdout] | ^^^^^^^^ help: try: `w` [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: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/render.rs:137:30 [INFO] [stdout] | [INFO] [stdout] 137 | let cent_y = h as f32 / 2.0; [INFO] [stdout] | ^^^^^^^^ help: try: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/render.rs:140:24 [INFO] [stdout] | [INFO] [stdout] 140 | if let Err(_) = graphics::draw(ctx, &game_state.paused_text, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 140 ~ if graphics::draw(ctx, &game_state.paused_text, [INFO] [stdout] 141 + (na::Point2::new(cent_x-2.0,cent_y+2.0), [INFO] [stdout] 142 ~ Color::new(0.0,0.0,0.0,1.0))).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/render.rs:145:24 [INFO] [stdout] | [INFO] [stdout] 145 | if let Err(_) = graphics::draw(ctx, &game_state.paused_text, (na::Point2::new(cent_x,cent_y), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 145 ~ if graphics::draw(ctx, &game_state.paused_text, (na::Point2::new(cent_x,cent_y), [INFO] [stdout] 146 ~ Color::new(0.8,0.85,1.0,1.0)) ).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/render.rs:158:12 [INFO] [stdout] | [INFO] [stdout] 158 | if ggez::timer::ticks(ctx) % 5 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `ggez::timer::ticks(ctx).is_multiple_of(5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/entities/ball.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn build_collider(world: &mut World, ctx: &mut Context, x: f32, y: f32, vx: f32, vy: f32, m: f32, fric: f32) -> Entity { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` 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/input.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | / match Self::map_keycode(&keycode) { [INFO] [stdout] 79 | | Some(key) => match key { [INFO] [stdout] 80 | | InputKey::Left => { [INFO] [stdout] 81 | | let mut input = world.fetch_mut::(); [INFO] [stdout] ... | [INFO] [stdout] 105 | | _ => {} [INFO] [stdout] 106 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 78 ~ if let Some(key) = Self::map_keycode(&keycode) { match key { [INFO] [stdout] 79 + InputKey::Left => { [INFO] [stdout] 80 + let mut input = world.fetch_mut::(); [INFO] [stdout] 81 + input.set_left(true); [INFO] [stdout] 82 + }, [INFO] [stdout] 83 + InputKey::Right => { [INFO] [stdout] 84 + let mut input = world.fetch_mut::(); [INFO] [stdout] 85 + input.set_right(true); [INFO] [stdout] 86 + }, [INFO] [stdout] 87 + InputKey::Up => { [INFO] [stdout] 88 + let mut input = world.fetch_mut::(); [INFO] [stdout] 89 + input.set_up(true); [INFO] [stdout] 90 + }, [INFO] [stdout] 91 + InputKey::Down => { [INFO] [stdout] 92 + let mut input = world.fetch_mut::(); [INFO] [stdout] 93 + input.set_down(true); [INFO] [stdout] 94 + }, [INFO] [stdout] 95 + InputKey::SpaceAction => { [INFO] [stdout] 96 + let mut input = world.fetch_mut::(); [INFO] [stdout] 97 + input.set_jump(true); [INFO] [stdout] 98 + }, [INFO] [stdout] 99 + InputKey::Exit => { [INFO] [stdout] 100 + ggez::event::quit(ctx); [INFO] [stdout] 101 + } [INFO] [stdout] 102 + _ => {} [INFO] [stdout] 103 + } } [INFO] [stdout] | [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/input.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | / match Self::map_keycode(&keycode) { [INFO] [stdout] 115 | | Some(key) => match key { [INFO] [stdout] 116 | | InputKey::Left => { [INFO] [stdout] 117 | | let mut input = world.fetch_mut::(); [INFO] [stdout] ... | [INFO] [stdout] 142 | | _ => {} [INFO] [stdout] 143 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 114 ~ if let Some(key) = Self::map_keycode(&keycode) { match key { [INFO] [stdout] 115 + InputKey::Left => { [INFO] [stdout] 116 + let mut input = world.fetch_mut::(); [INFO] [stdout] 117 + input.set_left(false); [INFO] [stdout] 118 + }, [INFO] [stdout] 119 + InputKey::Right => { [INFO] [stdout] 120 + let mut input = world.fetch_mut::(); [INFO] [stdout] 121 + input.set_right(false); [INFO] [stdout] 122 + }, [INFO] [stdout] 123 + InputKey::Up => { [INFO] [stdout] 124 + let mut input = world.fetch_mut::(); [INFO] [stdout] 125 + input.set_up(false); [INFO] [stdout] 126 + }, [INFO] [stdout] 127 + InputKey::Down => { [INFO] [stdout] 128 + let mut input = world.fetch_mut::(); [INFO] [stdout] 129 + input.set_down(false); [INFO] [stdout] 130 + }, [INFO] [stdout] 131 + InputKey::SpaceAction => { [INFO] [stdout] 132 + let mut input = world.fetch_mut::(); [INFO] [stdout] 133 + input.set_jump(false); [INFO] [stdout] 134 + }, [INFO] [stdout] 135 + // InputKey::AddCircle => { [INFO] [stdout] 136 + // let mut input = world.fetch_mut::(); [INFO] [stdout] 137 + // input.add_action(WorldAction::AddCircle); [INFO] [stdout] 138 + // }, [INFO] [stdout] 139 + _ => {} [INFO] [stdout] 140 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/physics.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / pub fn actors_push(pos_i: &na::Point2, pos_j: &na::Point2, [INFO] [stdout] 52 | | svel_i : Option<&mut na::Vector2>, svel_j : Option<&mut na::Vector2>, [INFO] [stdout] 53 | | mass_i: f32, mass_j: f32, friction_i: f32, friction_j: f32, combined_obj_radius: f32) { [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [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/input.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | / match Self::map_mouse_input(&button_index) { [INFO] [stdout] 149 | | Some(inp) => match inp { [INFO] [stdout] 150 | | MouseInput::Left => { [INFO] [stdout] 151 | | let mut input = world.fetch_mut::(); [INFO] [stdout] ... | [INFO] [stdout] 170 | | _ => {} [INFO] [stdout] 171 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 148 ~ if let Some(inp) = Self::map_mouse_input(&button_index) { match inp { [INFO] [stdout] 149 + MouseInput::Left => { [INFO] [stdout] 150 + let mut input = world.fetch_mut::(); [INFO] [stdout] 151 + input.set_mouse_down(true, 0); [INFO] [stdout] 152 + println!("Mouse button pressed: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 153 + }, [INFO] [stdout] 154 + MouseInput::Middle => { [INFO] [stdout] 155 + let mut input = world.fetch_mut::(); [INFO] [stdout] 156 + //input.set; [INFO] [stdout] 157 + input.set_mouse_down(true, 1); [INFO] [stdout] 158 + println!("Mouse button pressed: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 159 + //_ctx.current_state; [INFO] [stdout] 160 + }, [INFO] [stdout] 161 + MouseInput::Right => { [INFO] [stdout] 162 + let mut input = world.fetch_mut::(); [INFO] [stdout] 163 + //input.set_jump(false); [INFO] [stdout] 164 + input.set_mouse_down(true, 2); [INFO] [stdout] 165 + println!("Mouse button pressed: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 166 + }, [INFO] [stdout] 167 + _ => {} [INFO] [stdout] 168 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/physics.rs:58:65 [INFO] [stdout] | [INFO] [stdout] 58 | let (check, dist, pos_i, pos_j) = self::radius_check_points(&pos_i, &pos_j, touch_dist); [INFO] [stdout] | ^^^^^^ help: change this to: `pos_i` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/physics.rs:58:73 [INFO] [stdout] | [INFO] [stdout] 58 | let (check, dist, pos_i, pos_j) = self::radius_check_points(&pos_i, &pos_j, touch_dist); [INFO] [stdout] | ^^^^^^ help: change this to: `pos_j` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/physics.rs:76:28 [INFO] [stdout] | [INFO] [stdout] 76 | let no_i = match svel_i { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 77 | | Some(_) => true, [INFO] [stdout] 78 | | _ => false [INFO] [stdout] 79 | | }; [INFO] [stdout] | |_________________^ help: try: `svel_i.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/physics.rs:80:28 [INFO] [stdout] | [INFO] [stdout] 80 | let no_j = match svel_j { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 81 | | Some(_) => true, [INFO] [stdout] 82 | | _ => false [INFO] [stdout] 83 | | }; [INFO] [stdout] | |_________________^ help: try: `svel_j.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [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/input.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | / match Self::map_mouse_input(&button_index) { [INFO] [stdout] 177 | | Some(inp) => match inp { [INFO] [stdout] 178 | | MouseInput::Left => { [INFO] [stdout] 179 | | let mut input = world.fetch_mut::(); [INFO] [stdout] ... | [INFO] [stdout] 196 | | _ => {} [INFO] [stdout] 197 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 176 ~ if let Some(inp) = Self::map_mouse_input(&button_index) { match inp { [INFO] [stdout] 177 + MouseInput::Left => { [INFO] [stdout] 178 + let mut input = world.fetch_mut::(); [INFO] [stdout] 179 + input.set_mouse_down(false, 0); [INFO] [stdout] 180 + println!("Mouse button released: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 181 + }, [INFO] [stdout] 182 + MouseInput::Middle => { [INFO] [stdout] 183 + let mut input = world.fetch_mut::(); [INFO] [stdout] 184 + //input.set; [INFO] [stdout] 185 + input.set_mouse_down(false, 1); [INFO] [stdout] 186 + }, [INFO] [stdout] 187 + MouseInput::Right => { [INFO] [stdout] 188 + let mut input = world.fetch_mut::(); [INFO] [stdout] 189 + //input.set_jump(false); [INFO] [stdout] 190 + input.set_mouse_down(false, 2); [INFO] [stdout] 191 + println!("Mouse button released: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 192 + }, [INFO] [stdout] 193 + _ => {} [INFO] [stdout] 194 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/physics.rs:142:1 [INFO] [stdout] | [INFO] [stdout] 142 | / pub fn actors_push_squares(pos_i: &na::Point2, pos_j: &na::Point2, [INFO] [stdout] 143 | | svel_i : Option<&mut na::Vector2>, svel_j : Option<&mut na::Vector2>, [INFO] [stdout] 144 | | mass_i: f32, mass_j: f32, friction_i: f32, friction_j: f32, combined_obj_radius: f32) { [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/physics.rs:149:72 [INFO] [stdout] | [INFO] [stdout] 149 | let (check, dist, pos_i, pos_j) = self::radius_square_check_points(&pos_i, &pos_j, touch_dist); [INFO] [stdout] | ^^^^^^ help: change this to: `pos_i` [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/physics.rs:149:80 [INFO] [stdout] | [INFO] [stdout] 149 | let (check, dist, pos_i, pos_j) = self::radius_square_check_points(&pos_i, &pos_j, touch_dist); [INFO] [stdout] | ^^^^^^ help: change this to: `pos_j` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/physics.rs:167:28 [INFO] [stdout] | [INFO] [stdout] 167 | let no_i = match svel_i { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 168 | | Some(_) => true, [INFO] [stdout] 169 | | _ => false [INFO] [stdout] 170 | | }; [INFO] [stdout] | |_________________^ help: try: `svel_i.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/physics.rs:171:28 [INFO] [stdout] | [INFO] [stdout] 171 | let no_j = match svel_j { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 172 | | Some(_) => true, [INFO] [stdout] 173 | | _ => false [INFO] [stdout] 174 | | }; [INFO] [stdout] | |_________________^ help: try: `svel_j.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/components/ball.rs:24:45 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn new(ctx: &mut Context, char_img: &String, flash: bool) -> BallDisplayComponent { [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] 24 ~ pub fn new(ctx: &mut Context, char_img: &str, flash: bool) -> BallDisplayComponent { [INFO] [stdout] 25 ~ let image = Image::new(ctx, char_img.to_owned()).unwrap(); [INFO] [stdout] 26 | [INFO] [stdout] ... [INFO] [stdout] 38 | image: image, [INFO] [stdout] 39 ~ path: char_img.to_owned(), [INFO] [stdout] | [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/game_state.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | / match curr_st { [INFO] [stdout] 136 | | State::Running => { self.current_state = State::Paused; } [INFO] [stdout] 137 | | _ => {} [INFO] [stdout] 138 | | } [INFO] [stdout] | |_________^ help: try: `if let State::Running = curr_st { self.current_state = State::Paused; }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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/game_state.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | / match curr_st { [INFO] [stdout] 144 | | State::Paused => { self.current_state = State::Running; } [INFO] [stdout] 145 | | _ => {} [INFO] [stdout] 146 | | } [INFO] [stdout] | |_________^ help: try: `if let State::Paused = curr_st { self.current_state = State::Running; }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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/game_state.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | / match &self.current_state { [INFO] [stdout] 158 | | State::Running => { [INFO] [stdout] ... | [INFO] [stdout] 172 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 157 ~ if let State::Running = &self.current_state { [INFO] [stdout] 158 + [INFO] [stdout] 159 + // Get world and dispatcher to increment the entity system [INFO] [stdout] 160 + let world = &mut self.world; [INFO] [stdout] 161 + let dispatcher = &mut self.dispatcher; [INFO] [stdout] 162 + // Call update on the world event dispatcher [INFO] [stdout] 163 + dispatcher.dispatch(&world); [INFO] [stdout] 164 + // Update the world state after dispatch changes [INFO] [stdout] 165 + world.maintain(); [INFO] [stdout] 166 + [INFO] [stdout] 167 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game_state.rs:164:37 [INFO] [stdout] | [INFO] [stdout] 164 | dispatcher.dispatch(&world); [INFO] [stdout] | ^^^^^^ help: change this to: `world` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/game_state.rs:198:63 [INFO] [stdout] | [INFO] [stdout] 198 | InputMap::mouse_button_down(&mut self.world, ctx, index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/components/ball.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if let Err(_) = ggez::graphics::draw(ctx, &self.image, ( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 90 ~ if ggez::graphics::draw(ctx, &self.image, ( [INFO] [stdout] 91 + draw_pos.clone(), [INFO] [stdout] 92 + 0.75f32, //rotation [INFO] [stdout] 93 + na::Point2::new(0.5f32,0.5f32), [INFO] [stdout] 94 + na::Vector2::new(1.0f32,1.0f32), [INFO] [stdout] 95 ~ Color::new(1.0,1.0,1.0,1.0))).is_err() { // add back x/y pos // [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/game_state.rs:218:61 [INFO] [stdout] | [INFO] [stdout] 218 | InputMap::mouse_button_up(&mut self.world, ctx, index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/game_state.rs:313:13 [INFO] [stdout] | [INFO] [stdout] 313 | ggez::graphics::set_screen_coordinates(ctx, Rect::new(0.0, 0.0, width, height)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 313 | let _ = ggez::graphics::set_screen_coordinates(ctx, Rect::new(0.0, 0.0, width, height)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/components/ball.rs:91:21 [INFO] [stdout] | [INFO] [stdout] 91 | draw_pos.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `draw_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` 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/components/ball.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | / match graphics::Mesh::new_circle( [INFO] [stdout] 120 | | ctx, [INFO] [stdout] 121 | | graphics::DrawMode::fill(), [INFO] [stdout] 122 | | na::Point2::new(0.0, 0.0), [INFO] [stdout] ... | [INFO] [stdout] 142 | | _ => {} [INFO] [stdout] 143 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 119 ~ if let Ok(circle) = graphics::Mesh::new_circle( [INFO] [stdout] 120 + ctx, [INFO] [stdout] 121 + graphics::DrawMode::fill(), [INFO] [stdout] 122 + na::Point2::new(0.0, 0.0), [INFO] [stdout] 123 + 23.0, // bleed over 2 pixel edge of texture [INFO] [stdout] 124 + 0.5, [INFO] [stdout] 125 + graphics::WHITE, [INFO] [stdout] 126 + ) { [INFO] [stdout] 127 + let mut col_vals: (u8,u8,u8) = rng.gen(); [INFO] [stdout] 128 + if col_vals.0 < 27 { col_vals.0 += 228; } [INFO] [stdout] 129 + if col_vals.1 < 27 { col_vals.1 += 228; } [INFO] [stdout] 130 + if col_vals.2 < 27 { col_vals.2 += 228; } [INFO] [stdout] 131 + let mut _draw_ok = true; [INFO] [stdout] 132 + //println!("Entity {}, Circle pos: {:?}", ent.id(), pos); [INFO] [stdout] 133 + if let Err(_) = graphics::draw(ctx, &circle, DrawParam::default() [INFO] [stdout] 134 + .dest(na::Point2::new(pos.x, pos.y)) [INFO] [stdout] 135 + .scale(na::Vector2::new(1.0f32,1.0f32)) [INFO] [stdout] 136 + .color(Color::from_rgba(col_vals.0,col_vals.1,col_vals.2,128)) ) { [INFO] [stdout] 137 + _draw_ok = false; [INFO] [stdout] 138 + }; [INFO] [stdout] 139 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/components/ball.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 135 | if let Err(_) = graphics::draw(ctx, &circle, DrawParam::default() [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 135 ~ if graphics::draw(ctx, &circle, DrawParam::default() [INFO] [stdout] 136 + .dest(na::Point2::new(pos.x, pos.y)) [INFO] [stdout] 137 + .scale(na::Vector2::new(1.0f32,1.0f32)) [INFO] [stdout] 138 ~ .color(Color::from_rgba(col_vals.0,col_vals.1,col_vals.2,128)) ).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/components/player.rs:53:45 [INFO] [stdout] | [INFO] [stdout] 53 | pub fn new(ctx: &mut Context, char_img: &String) -> CharacterDisplayComponent { [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] 53 ~ pub fn new(ctx: &mut Context, char_img: &str) -> CharacterDisplayComponent { [INFO] [stdout] 54 ~ let image = Image::new(ctx, char_img.to_owned()).unwrap(); [INFO] [stdout] 55 | [INFO] [stdout] 56 | CharacterDisplayComponent { [INFO] [stdout] 57 | image: image, [INFO] [stdout] 58 ~ path: char_img.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/components/player.rs:101:16 [INFO] [stdout] | [INFO] [stdout] 101 | if let Err(_) = ggez::graphics::draw(ctx, &self.image, (draw_pos.clone(),)) { // add back x/y pos // [INFO] [stdout] | -------^^^^^^-------------------------------------------------------------- help: try: `if ggez::graphics::draw(ctx, &self.image, (draw_pos.clone(),)).is_err()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/components/player.rs:101:65 [INFO] [stdout] | [INFO] [stdout] 101 | if let Err(_) = ggez::graphics::draw(ctx, &self.image, (draw_pos.clone(),)) { // add back x/y pos // [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `draw_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/components/player.rs:113:20 [INFO] [stdout] | [INFO] [stdout] 113 | if let Err(_) = graphics::draw(ctx, &rect, (na::Point2::new(pos.x-2.0, pos.y-2.0), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 113 ~ if graphics::draw(ctx, &rect, (na::Point2::new(pos.x-2.0, pos.y-2.0), [INFO] [stdout] 114 ~ Color::from_rgba(col_vals.0,col_vals.0,col_vals.0,255) )).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/resources/mod.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | return self.image_lookup.contains_key(&path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 - return self.image_lookup.contains_key(&path); [INFO] [stdout] 32 + self.image_lookup.contains_key(&path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/resources/mod.rs:49:22 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn image_ref<'a>(&mut self, path:String) -> GameResult<&mut Image> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/resources/mod.rs:56:29 [INFO] [stdout] | [INFO] [stdout] 56 | let index = o.get().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*o.get()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/resources/mod.rs:70:1 [INFO] [stdout] | [INFO] [stdout] 70 | / impl Default for WorldAction { [INFO] [stdout] 71 | | fn default() -> Self { WorldAction::None } [INFO] [stdout] 72 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 66 + #[derive(Default)] [INFO] [stdout] 67 | pub enum WorldAction { [INFO] [stdout] 68 | AddCircle, [INFO] [stdout] 69 ~ #[default] [INFO] [stdout] 70 ~ None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/systems/input.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | let multi_axis = (input.dirs_pressed[0] && (input.dirs_pressed[2] || input.dirs_pressed[3])) [INFO] [stdout] | __________________________^ [INFO] [stdout] 32 | | || (input.dirs_pressed[1] && (input.dirs_pressed[2] || input.dirs_pressed[3])); [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 31 - let multi_axis = (input.dirs_pressed[0] && (input.dirs_pressed[2] || input.dirs_pressed[3])) [INFO] [stdout] 32 - || (input.dirs_pressed[1] && (input.dirs_pressed[2] || input.dirs_pressed[3])); [INFO] [stdout] 31 + let multi_axis = !(!input.dirs_pressed[2] && !input.dirs_pressed[3] || !input.dirs_pressed[0] && !input.dirs_pressed[1]); [INFO] [stdout] | [INFO] [stdout] 31 - let multi_axis = (input.dirs_pressed[0] && (input.dirs_pressed[2] || input.dirs_pressed[3])) [INFO] [stdout] 32 - || (input.dirs_pressed[1] && (input.dirs_pressed[2] || input.dirs_pressed[3])); [INFO] [stdout] 31 + let multi_axis = (input.dirs_pressed[1] || input.dirs_pressed[0]) && (input.dirs_pressed[3] || input.dirs_pressed[2]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/systems/input.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | vec_amt = 0.71 * vec_amt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `vec_amt *= 0.71` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/systems/input.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | vec_amt = vec_amt * 0.05; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `vec_amt *= 0.05` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/systems/input.rs:63:17 [INFO] [stdout] | [INFO] [stdout] 63 | vel.x = vel.x.max(-40.0).min(40.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `vel.x.clamp(-40.0, 40.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/systems/input.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | else if list.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `list.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: deref which would be done by auto-deref [INFO] [stdout] --> src/systems/input.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | Self::test(list, &*input); [INFO] [stdout] | ^^^^^^^ help: try: `&input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/systems/interactor.rs:98:21 [INFO] [stdout] | [INFO] [stdout] 98 | / if block_hash.contains_key(&(i,j)) { [INFO] [stdout] 99 | | let mut ent_vec = block_hash.get_mut(&(i,j)).unwrap(); [INFO] [stdout] 100 | | ent_vec.push(( [INFO] [stdout] 101 | | ent_id, [INFO] [stdout] ... | [INFO] [stdout] 115 | | block_hash.insert((i,j), ent_vec); [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 98 ~ if let std::collections::hash_map::Entry::Vacant(e) = block_hash.entry((i,j)) { [INFO] [stdout] 99 + let ent_vec = vec![( [INFO] [stdout] 100 + ent_id, [INFO] [stdout] 101 + px, py, [INFO] [stdout] 102 + mass, [INFO] [stdout] 103 + friction, [INFO] [stdout] 104 + )]; [INFO] [stdout] 105 + //let hash_key = buc_a_str.clone().as_str(); [INFO] [stdout] 106 + e.insert(ent_vec); [INFO] [stdout] 107 + } else { [INFO] [stdout] 108 + let mut ent_vec = block_hash.get_mut(&(i,j)).unwrap(); [INFO] [stdout] 109 + ent_vec.push(( [INFO] [stdout] 110 + ent_id, [INFO] [stdout] 111 + px, py, [INFO] [stdout] 112 + mass, [INFO] [stdout] 113 + friction, [INFO] [stdout] 114 + )); [INFO] [stdout] 115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/systems/interactor.rs:171:44 [INFO] [stdout] | [INFO] [stdout] 171 | ... if velocity_i.frozen == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!velocity_i.frozen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/systems/interactor.rs:180:44 [INFO] [stdout] | [INFO] [stdout] 180 | ... if velocity_j.frozen == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!velocity_j.frozen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/systems/interactor.rs:200:48 [INFO] [stdout] | [INFO] [stdout] 200 | ... if velocity_i.frozen == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!velocity_i.frozen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/systems/interactor.rs:210:48 [INFO] [stdout] | [INFO] [stdout] 210 | ... if velocity_j.frozen == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!velocity_j.frozen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/systems/mod.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 61 | let gl_vec = Vec::::new(); [INFO] [stdout] | ----------------------------------- unnecessary `let` binding [INFO] [stdout] ... [INFO] [stdout] 65 | gl_vec [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] 61 ~ [INFO] [stdout] 62 | [INFO] [stdout] 63 | [INFO] [stdout] 64 | [INFO] [stdout] 65 ~ Vec::::new() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/systems/mod.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | for (vel, pos) in (&vel, &pos).join() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, (vel, pos)) in (&vel, &pos).join().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/world.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn create_world<'a>(ctx: &mut Context, game_state_res: GameStateResource) -> World { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/render.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 39 | res.draw(ctx, &world, Some(entity.id()), pt.clone()); [INFO] [stdout] | ^^^^^^ help: change this to: `world` [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: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/render.rs:39:58 [INFO] [stdout] | [INFO] [stdout] 39 | res.draw(ctx, &world, Some(entity.id()), pt.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*pt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/render.rs:48:31 [INFO] [stdout] | [INFO] [stdout] 48 | res.draw(ctx, &world, Some(entity.id()), pt.clone()); [INFO] [stdout] | ^^^^^^ help: change this to: `world` [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: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/render.rs:48:58 [INFO] [stdout] | [INFO] [stdout] 48 | res.draw(ctx, &world, Some(entity.id()), pt.clone()); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*pt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/render.rs:99:61 [INFO] [stdout] | [INFO] [stdout] 99 | let entity = game_state.world.entities().entity(ent.clone()); // ;;fetch::(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*ent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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/render.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | / match &game_state.current_state { [INFO] [stdout] 132 | | State::Paused => { [INFO] [stdout] 133 | | let mut draw_ok = true; [INFO] [stdout] ... | [INFO] [stdout] 154 | | _ => {} [INFO] [stdout] 155 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 131 ~ if let State::Paused = &game_state.current_state { [INFO] [stdout] 132 + let mut draw_ok = true; [INFO] [stdout] 133 + [INFO] [stdout] 134 + let (w, h) = (game_state.window_w, game_state.window_h); [INFO] [stdout] 135 + let cent_x = w as f32 / 2.0; [INFO] [stdout] 136 + let cent_y = h as f32 / 2.0; [INFO] [stdout] 137 + [INFO] [stdout] 138 + // Render paused graphis [INFO] [stdout] 139 + if let Err(_) = graphics::draw(ctx, &game_state.paused_text, [INFO] [stdout] 140 + (na::Point2::new(cent_x-2.0,cent_y+2.0), [INFO] [stdout] 141 + Color::new(0.0,0.0,0.0,1.0))) { [INFO] [stdout] 142 + draw_ok = false; [INFO] [stdout] 143 + }; [INFO] [stdout] 144 + if let Err(_) = graphics::draw(ctx, &game_state.paused_text, (na::Point2::new(cent_x,cent_y), [INFO] [stdout] 145 + Color::new(0.8,0.85,1.0,1.0)) ) { [INFO] [stdout] 146 + draw_ok = false; [INFO] [stdout] 147 + }; [INFO] [stdout] 148 + [INFO] [stdout] 149 + if !draw_ok { [INFO] [stdout] 150 + println!("Draw error occurred"); [INFO] [stdout] 151 + } [INFO] [stdout] 152 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/render.rs:136:30 [INFO] [stdout] | [INFO] [stdout] 136 | let cent_x = w as f32 / 2.0; [INFO] [stdout] | ^^^^^^^^ help: try: `w` [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: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/render.rs:137:30 [INFO] [stdout] | [INFO] [stdout] 137 | let cent_y = h as f32 / 2.0; [INFO] [stdout] | ^^^^^^^^ help: try: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/render.rs:140:24 [INFO] [stdout] | [INFO] [stdout] 140 | if let Err(_) = graphics::draw(ctx, &game_state.paused_text, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 140 ~ if graphics::draw(ctx, &game_state.paused_text, [INFO] [stdout] 141 + (na::Point2::new(cent_x-2.0,cent_y+2.0), [INFO] [stdout] 142 ~ Color::new(0.0,0.0,0.0,1.0))).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/render.rs:145:24 [INFO] [stdout] | [INFO] [stdout] 145 | if let Err(_) = graphics::draw(ctx, &game_state.paused_text, (na::Point2::new(cent_x,cent_y), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 145 ~ if graphics::draw(ctx, &game_state.paused_text, (na::Point2::new(cent_x,cent_y), [INFO] [stdout] 146 ~ Color::new(0.8,0.85,1.0,1.0)) ).is_err() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/render.rs:158:12 [INFO] [stdout] | [INFO] [stdout] 158 | if ggez::timer::ticks(ctx) % 5 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `ggez::timer::ticks(ctx).is_multiple_of(5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/input.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | / match Self::map_keycode(&keycode) { [INFO] [stdout] 79 | | Some(key) => match key { [INFO] [stdout] 80 | | InputKey::Left => { [INFO] [stdout] 81 | | let mut input = world.fetch_mut::(); [INFO] [stdout] ... | [INFO] [stdout] 105 | | _ => {} [INFO] [stdout] 106 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 78 ~ if let Some(key) = Self::map_keycode(&keycode) { match key { [INFO] [stdout] 79 + InputKey::Left => { [INFO] [stdout] 80 + let mut input = world.fetch_mut::(); [INFO] [stdout] 81 + input.set_left(true); [INFO] [stdout] 82 + }, [INFO] [stdout] 83 + InputKey::Right => { [INFO] [stdout] 84 + let mut input = world.fetch_mut::(); [INFO] [stdout] 85 + input.set_right(true); [INFO] [stdout] 86 + }, [INFO] [stdout] 87 + InputKey::Up => { [INFO] [stdout] 88 + let mut input = world.fetch_mut::(); [INFO] [stdout] 89 + input.set_up(true); [INFO] [stdout] 90 + }, [INFO] [stdout] 91 + InputKey::Down => { [INFO] [stdout] 92 + let mut input = world.fetch_mut::(); [INFO] [stdout] 93 + input.set_down(true); [INFO] [stdout] 94 + }, [INFO] [stdout] 95 + InputKey::SpaceAction => { [INFO] [stdout] 96 + let mut input = world.fetch_mut::(); [INFO] [stdout] 97 + input.set_jump(true); [INFO] [stdout] 98 + }, [INFO] [stdout] 99 + InputKey::Exit => { [INFO] [stdout] 100 + ggez::event::quit(ctx); [INFO] [stdout] 101 + } [INFO] [stdout] 102 + _ => {} [INFO] [stdout] 103 + } } [INFO] [stdout] | [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/input.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | / match Self::map_keycode(&keycode) { [INFO] [stdout] 115 | | Some(key) => match key { [INFO] [stdout] 116 | | InputKey::Left => { [INFO] [stdout] 117 | | let mut input = world.fetch_mut::(); [INFO] [stdout] ... | [INFO] [stdout] 142 | | _ => {} [INFO] [stdout] 143 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 114 ~ if let Some(key) = Self::map_keycode(&keycode) { match key { [INFO] [stdout] 115 + InputKey::Left => { [INFO] [stdout] 116 + let mut input = world.fetch_mut::(); [INFO] [stdout] 117 + input.set_left(false); [INFO] [stdout] 118 + }, [INFO] [stdout] 119 + InputKey::Right => { [INFO] [stdout] 120 + let mut input = world.fetch_mut::(); [INFO] [stdout] 121 + input.set_right(false); [INFO] [stdout] 122 + }, [INFO] [stdout] 123 + InputKey::Up => { [INFO] [stdout] 124 + let mut input = world.fetch_mut::(); [INFO] [stdout] 125 + input.set_up(false); [INFO] [stdout] 126 + }, [INFO] [stdout] 127 + InputKey::Down => { [INFO] [stdout] 128 + let mut input = world.fetch_mut::(); [INFO] [stdout] 129 + input.set_down(false); [INFO] [stdout] 130 + }, [INFO] [stdout] 131 + InputKey::SpaceAction => { [INFO] [stdout] 132 + let mut input = world.fetch_mut::(); [INFO] [stdout] 133 + input.set_jump(false); [INFO] [stdout] 134 + }, [INFO] [stdout] 135 + // InputKey::AddCircle => { [INFO] [stdout] 136 + // let mut input = world.fetch_mut::(); [INFO] [stdout] 137 + // input.add_action(WorldAction::AddCircle); [INFO] [stdout] 138 + // }, [INFO] [stdout] 139 + _ => {} [INFO] [stdout] 140 + } } [INFO] [stdout] | [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/input.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | / match Self::map_mouse_input(&button_index) { [INFO] [stdout] 149 | | Some(inp) => match inp { [INFO] [stdout] 150 | | MouseInput::Left => { [INFO] [stdout] 151 | | let mut input = world.fetch_mut::(); [INFO] [stdout] ... | [INFO] [stdout] 170 | | _ => {} [INFO] [stdout] 171 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 148 ~ if let Some(inp) = Self::map_mouse_input(&button_index) { match inp { [INFO] [stdout] 149 + MouseInput::Left => { [INFO] [stdout] 150 + let mut input = world.fetch_mut::(); [INFO] [stdout] 151 + input.set_mouse_down(true, 0); [INFO] [stdout] 152 + println!("Mouse button pressed: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 153 + }, [INFO] [stdout] 154 + MouseInput::Middle => { [INFO] [stdout] 155 + let mut input = world.fetch_mut::(); [INFO] [stdout] 156 + //input.set; [INFO] [stdout] 157 + input.set_mouse_down(true, 1); [INFO] [stdout] 158 + println!("Mouse button pressed: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 159 + //_ctx.current_state; [INFO] [stdout] 160 + }, [INFO] [stdout] 161 + MouseInput::Right => { [INFO] [stdout] 162 + let mut input = world.fetch_mut::(); [INFO] [stdout] 163 + //input.set_jump(false); [INFO] [stdout] 164 + input.set_mouse_down(true, 2); [INFO] [stdout] 165 + println!("Mouse button pressed: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 166 + }, [INFO] [stdout] 167 + _ => {} [INFO] [stdout] 168 + } } [INFO] [stdout] | [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/input.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | / match Self::map_mouse_input(&button_index) { [INFO] [stdout] 177 | | Some(inp) => match inp { [INFO] [stdout] 178 | | MouseInput::Left => { [INFO] [stdout] 179 | | let mut input = world.fetch_mut::(); [INFO] [stdout] ... | [INFO] [stdout] 196 | | _ => {} [INFO] [stdout] 197 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 176 ~ if let Some(inp) = Self::map_mouse_input(&button_index) { match inp { [INFO] [stdout] 177 + MouseInput::Left => { [INFO] [stdout] 178 + let mut input = world.fetch_mut::(); [INFO] [stdout] 179 + input.set_mouse_down(false, 0); [INFO] [stdout] 180 + println!("Mouse button released: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 181 + }, [INFO] [stdout] 182 + MouseInput::Middle => { [INFO] [stdout] 183 + let mut input = world.fetch_mut::(); [INFO] [stdout] 184 + //input.set; [INFO] [stdout] 185 + input.set_mouse_down(false, 1); [INFO] [stdout] 186 + }, [INFO] [stdout] 187 + MouseInput::Right => { [INFO] [stdout] 188 + let mut input = world.fetch_mut::(); [INFO] [stdout] 189 + //input.set_jump(false); [INFO] [stdout] 190 + input.set_mouse_down(false, 2); [INFO] [stdout] 191 + println!("Mouse button released: {:?}, x: {}, y: {}", &inp, &input.mouse_x, &input.mouse_y); [INFO] [stdout] 192 + }, [INFO] [stdout] 193 + _ => {} [INFO] [stdout] 194 + } } [INFO] [stdout] | [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/game_state.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | / match curr_st { [INFO] [stdout] 136 | | State::Running => { self.current_state = State::Paused; } [INFO] [stdout] 137 | | _ => {} [INFO] [stdout] 138 | | } [INFO] [stdout] | |_________^ help: try: `if let State::Running = curr_st { self.current_state = State::Paused; }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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/game_state.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | / match curr_st { [INFO] [stdout] 144 | | State::Paused => { self.current_state = State::Running; } [INFO] [stdout] 145 | | _ => {} [INFO] [stdout] 146 | | } [INFO] [stdout] | |_________^ help: try: `if let State::Paused = curr_st { self.current_state = State::Running; }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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/game_state.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | / match &self.current_state { [INFO] [stdout] 158 | | State::Running => { [INFO] [stdout] ... | [INFO] [stdout] 172 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 157 ~ if let State::Running = &self.current_state { [INFO] [stdout] 158 + [INFO] [stdout] 159 + // Get world and dispatcher to increment the entity system [INFO] [stdout] 160 + let world = &mut self.world; [INFO] [stdout] 161 + let dispatcher = &mut self.dispatcher; [INFO] [stdout] 162 + // Call update on the world event dispatcher [INFO] [stdout] 163 + dispatcher.dispatch(&world); [INFO] [stdout] 164 + // Update the world state after dispatch changes [INFO] [stdout] 165 + world.maintain(); [INFO] [stdout] 166 + [INFO] [stdout] 167 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game_state.rs:164:37 [INFO] [stdout] | [INFO] [stdout] 164 | dispatcher.dispatch(&world); [INFO] [stdout] | ^^^^^^ help: change this to: `world` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/game_state.rs:198:63 [INFO] [stdout] | [INFO] [stdout] 198 | InputMap::mouse_button_down(&mut self.world, ctx, index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/game_state.rs:218:61 [INFO] [stdout] | [INFO] [stdout] 218 | InputMap::mouse_button_up(&mut self.world, ctx, index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/game_state.rs:313:13 [INFO] [stdout] | [INFO] [stdout] 313 | ggez::graphics::set_screen_coordinates(ctx, Rect::new(0.0, 0.0, width, height)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 313 | let _ = ggez::graphics::set_screen_coordinates(ctx, Rect::new(0.0, 0.0, width, height)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 45.50s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: nom v5.1.1 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 5` [INFO] running `Command { std: "docker" "inspect" "4ced2c66edc07c7e75f916502c2f62357503ae969f9846cc98cde8df7a045776", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4ced2c66edc07c7e75f916502c2f62357503ae969f9846cc98cde8df7a045776", kill_on_drop: false }` [INFO] [stdout] 4ced2c66edc07c7e75f916502c2f62357503ae969f9846cc98cde8df7a045776