[INFO] cloning repository https://github.com/jeffrey-m4k/Downtone [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jeffrey-m4k/Downtone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjeffrey-m4k%2FDowntone", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjeffrey-m4k%2FDowntone'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 202aebd91dbe3c2b5a7dd13358b6222347d25aa4 [INFO] linting jeffrey-m4k/Downtone against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjeffrey-m4k%2FDowntone" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/jeffrey-m4k/Downtone [INFO] finished tweaking git repo https://github.com/jeffrey-m4k/Downtone [INFO] tweaked toml for git repo https://github.com/jeffrey-m4k/Downtone written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jeffrey-m4k/Downtone 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/jeffrey-m4k/Downtone already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded mint v0.5.6 [INFO] [stderr] Downloaded sid v0.5.2 [INFO] [stderr] Downloaded gfx_window_glutin v0.30.0 [INFO] [stderr] Downloaded bytecount v0.6.2 [INFO] [stderr] Downloaded fastrand v1.4.1 [INFO] [stderr] Downloaded mach v0.2.3 [INFO] [stderr] Downloaded euclid v0.19.9 [INFO] [stderr] Downloaded lewton v0.9.4 [INFO] [stderr] Downloaded minimp3-sys v0.3.2 [INFO] [stderr] Downloaded pulldown-cmark v0.8.0 [INFO] [stderr] Downloaded slice-deque v0.3.0 [INFO] [stderr] Downloaded lyon_tessellation v0.13.5 [INFO] [stderr] Downloaded image v0.22.5 [INFO] [stderr] Downloaded nix v0.15.0 [INFO] [stderr] Downloaded syn v1.0.70 [INFO] [stderr] Downloaded wasm-bindgen v0.2.73 [INFO] [stderr] Downloaded object v0.23.0 [INFO] [stderr] Downloaded regex v1.4.6 [INFO] [stderr] Downloaded gilrs v0.7.4 [INFO] [stderr] Downloaded regex-syntax v0.6.23 [INFO] [stderr] Downloaded backtrace v0.3.57 [INFO] [stderr] Downloaded coreaudio-rs v0.9.1 [INFO] [stderr] Downloaded hound v3.4.0 [INFO] [stderr] Downloaded matrixmultiply v0.2.4 [INFO] [stderr] Downloaded redox_syscall v0.2.6 [INFO] [stderr] Downloaded io-kit-sys v0.1.0 [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.73 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.73 [INFO] [stderr] Downloaded glutin v0.20.1 [INFO] [stderr] Downloaded glyph_brush v0.6.3 [INFO] [stderr] Downloaded glyph_brush v0.5.4 [INFO] [stderr] Downloaded png v0.15.3 [INFO] [stderr] Downloaded libc v0.2.93 [INFO] [stderr] Downloaded tiff v0.3.1 [INFO] [stderr] Downloaded lyon_algorithms v0.13.4 [INFO] [stderr] Downloaded lyon_geom v0.12.7 [INFO] [stderr] Downloaded alsa-sys v0.1.2 [INFO] [stderr] Downloaded cpal v0.8.2 [INFO] [stderr] Downloaded ogg v0.7.1 [INFO] [stderr] Downloaded cargo_metadata v0.12.3 [INFO] [stderr] Downloaded skeptic v0.13.6 [INFO] [stderr] Downloaded rusty-xinput v1.2.0 [INFO] [stderr] Downloaded gilrs-core v0.2.6 [INFO] [stderr] Downloaded gimli v0.23.0 [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.73 [INFO] [stderr] Downloaded lyon_path v0.13.2 [INFO] [stderr] Downloaded lyon v0.13.5 [INFO] [stderr] Downloaded smart-default v0.5.2 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.73 [INFO] [stderr] Downloaded glyph_brush_layout v0.1.9 [INFO] [stderr] Downloaded ggez v0.5.1 [INFO] [stderr] Downloaded num-derive v0.2.5 [INFO] [stderr] Downloaded euclid_macros v0.1.0 [INFO] [stderr] Downloaded coreaudio-sys v0.2.8 [INFO] [stderr] Downloaded minimp3 v0.3.5 [INFO] [stderr] Downloaded zip v0.5.12 [INFO] [stderr] Downloaded addr2line v0.14.1 [INFO] [stderr] Downloaded rustc-demangle v0.1.18 [INFO] [stderr] Downloaded rodio v0.9.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 25da30c6511e6e9a250b9599ee5f052b89fe322b64728c7b95dcc146a1623c7e [INFO] running `Command { std: "docker" "start" "-a" "25da30c6511e6e9a250b9599ee5f052b89fe322b64728c7b95dcc146a1623c7e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "25da30c6511e6e9a250b9599ee5f052b89fe322b64728c7b95dcc146a1623c7e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "25da30c6511e6e9a250b9599ee5f052b89fe322b64728c7b95dcc146a1623c7e", kill_on_drop: false }` [INFO] [stdout] 25da30c6511e6e9a250b9599ee5f052b89fe322b64728c7b95dcc146a1623c7e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 47cc32e80fe7292c8005e23e19125a5f019f1340708f2c3c73c98a020af7932e [INFO] running `Command { std: "docker" "start" "-a" "47cc32e80fe7292c8005e23e19125a5f019f1340708f2c3c73c98a020af7932e", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.93 [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling libm v0.2.1 [INFO] [stderr] Compiling proc-macro2 v0.4.30 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling pkg-config v0.3.19 [INFO] [stderr] Compiling xml-rs v0.8.3 [INFO] [stderr] Compiling proc-macro2 v1.0.26 [INFO] [stderr] Compiling unicode-xid v0.2.1 [INFO] [stderr] Compiling syn v1.0.70 [INFO] [stderr] Compiling khronos_api v3.1.0 [INFO] [stderr] Compiling cc v1.0.67 [INFO] [stderr] Compiling syn v0.15.44 [INFO] [stderr] Compiling serde_derive v1.0.125 [INFO] [stderr] Checking void v1.0.2 [INFO] [stderr] Compiling serde v1.0.125 [INFO] [stderr] Checking stb_truetype v0.3.1 [INFO] [stderr] Checking linked-hash-map v0.5.4 [INFO] [stderr] Compiling version_check v0.9.3 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling crossbeam-utils v0.7.2 [INFO] [stderr] Compiling memoffset v0.5.6 [INFO] [stderr] Compiling crossbeam-epoch v0.8.2 [INFO] [stderr] Checking libloading v0.6.7 [INFO] [stderr] Compiling getrandom v0.2.2 [INFO] [stderr] Compiling nix v0.14.1 [INFO] [stderr] Checking dlib v0.4.2 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Checking wayland-sys v0.21.13 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Compiling arrayvec v0.4.12 [INFO] [stderr] Compiling ucd-trie v0.1.3 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Compiling x11-dl v2.18.5 [INFO] [stderr] Compiling unicase v2.6.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.10 [INFO] [stderr] Compiling quote v0.6.13 [INFO] [stderr] Compiling memchr v2.3.4 [INFO] [stderr] Compiling pest v2.1.3 [INFO] [stderr] Checking nodrop v0.1.14 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Compiling wayland-scanner v0.21.13 [INFO] [stderr] Compiling serde_json v1.0.64 [INFO] [stderr] Checking walkdir v2.3.2 [INFO] [stderr] Compiling error-chain v0.12.4 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Checking getrandom v0.1.16 [INFO] [stderr] Compiling num-rational v0.2.4 [INFO] [stderr] Compiling num-complex v0.2.4 [INFO] [stderr] Compiling crc32fast v1.2.1 [INFO] [stderr] Compiling typenum v1.13.0 [INFO] [stderr] Checking crossbeam-deque v0.7.3 [INFO] [stderr] Compiling semver-parser v0.10.2 [INFO] [stderr] Compiling pulldown-cmark v0.8.0 [INFO] [stderr] Checking xdg v2.2.0 [INFO] [stderr] Compiling itoa v0.4.7 [INFO] [stderr] Compiling rand_core v0.6.2 [INFO] [stderr] Checking approx v0.3.2 [INFO] [stderr] Checking ordered-float v1.1.1 [INFO] [stderr] Checking line_drawing v0.7.0 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking num-traits v0.1.43 [INFO] [stderr] Compiling rand_chacha v0.3.0 [INFO] [stderr] Compiling gfx_gl v0.6.1 [INFO] [stderr] Checking rusttype v0.8.3 [INFO] [stderr] Compiling glutin_egl_sys v0.1.5 [INFO] [stderr] Compiling glutin_glx_sys v0.1.7 [INFO] [stderr] Checking parking_lot_core v0.6.2 [INFO] [stderr] Compiling rand v0.8.3 [INFO] [stderr] Checking memmap v0.7.0 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Compiling minimp3-sys v0.3.2 [INFO] [stderr] Checking rusttype v0.7.9 [INFO] [stderr] Compiling libloading v0.5.2 [INFO] [stderr] Checking andrew v0.2.1 [INFO] [stderr] Compiling bzip2-sys v0.1.10+1.0.8 [INFO] [stderr] Compiling alsa-sys v0.1.2 [INFO] [stderr] Compiling libudev-sys v0.1.4 [INFO] [stderr] Compiling rand v0.6.5 [INFO] [stderr] Checking draw_state v0.8.0 [INFO] [stderr] Compiling nix v0.15.0 [INFO] [stderr] Compiling remove_dir_all v0.5.3 [INFO] [stderr] Compiling same-file v1.0.6 [INFO] [stderr] Compiling num-derive v0.2.5 [INFO] [stderr] Checking gfx_core v0.9.2 [INFO] [stderr] Checking parking_lot v0.9.0 [INFO] [stderr] Compiling wayland-client v0.21.13 [INFO] [stderr] Compiling wayland-protocols v0.21.13 [INFO] [stderr] Compiling tempfile v3.2.0 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking sid v0.5.2 [INFO] [stderr] Checking shared_library v0.1.9 [INFO] [stderr] Checking wayland-commons v0.21.13 [INFO] [stderr] Checking rand_os v0.1.3 [INFO] [stderr] Checking raw-window-handle v0.3.3 [INFO] [stderr] Compiling num-iter v0.1.42 [INFO] [stderr] Checking rawpointer v0.2.1 [INFO] [stderr] Compiling glob v0.3.0 [INFO] [stderr] Compiling bytecount v0.6.2 [INFO] [stderr] Checking lzw v0.10.0 [INFO] [stderr] Checking matrixmultiply v0.2.4 [INFO] [stderr] Checking alga v0.9.3 [INFO] [stderr] Checking glyph_brush_layout v0.1.9 [INFO] [stderr] Checking osmesa-sys v0.1.2 [INFO] [stderr] Checking generic-array v0.12.4 [INFO] [stderr] Checking twox-hash v1.6.0 [INFO] [stderr] Checking deflate v0.7.20 [INFO] [stderr] Checking inflate v0.4.5 [INFO] [stderr] Checking slice-deque v0.3.0 [INFO] [stderr] Checking ogg v0.7.1 [INFO] [stderr] Checking mint v0.5.6 [INFO] [stderr] Checking gif v0.10.3 [INFO] [stderr] Checking bzip2 v0.3.3 [INFO] [stderr] Checking dirs-sys v0.3.6 [INFO] [stderr] Checking claxon v0.4.3 [INFO] [stderr] Checking glyph_brush v0.6.3 [INFO] [stderr] Checking lewton v0.9.4 [INFO] [stderr] Checking hound v3.4.0 [INFO] [stderr] Checking cpal v0.8.2 [INFO] [stderr] Checking png v0.15.3 [INFO] [stderr] Checking jpeg-decoder v0.1.22 [INFO] [stderr] Checking glyph_brush v0.5.4 [INFO] [stderr] Checking directories v2.0.2 [INFO] [stderr] Checking gfx v0.18.2 [INFO] [stderr] Checking minimp3 v0.3.5 [INFO] [stderr] Checking fastrand v1.4.1 [INFO] [stderr] Checking nalgebra v0.18.1 [INFO] [stderr] Checking gfx_device_gl v0.16.2 [INFO] [stderr] Compiling euclid_macros v0.1.0 [INFO] [stderr] Compiling smart-default v0.5.2 [INFO] [stderr] Compiling thiserror-impl v1.0.24 [INFO] [stderr] Checking gilrs-core v0.2.6 [INFO] [stderr] Checking gilrs v0.7.4 [INFO] [stderr] Checking euclid v0.19.9 [INFO] [stderr] Checking lyon_geom v0.12.7 [INFO] [stderr] Checking thiserror v1.0.24 [INFO] [stderr] Checking zip v0.5.12 [INFO] [stderr] Checking tiff v0.3.1 [INFO] [stderr] Checking lyon_path v0.13.2 [INFO] [stderr] Checking image v0.22.5 [INFO] [stderr] Checking lyon_algorithms v0.13.4 [INFO] [stderr] Checking lyon_tessellation v0.13.5 [INFO] [stderr] Checking lyon v0.13.5 [INFO] [stderr] Checking toml v0.5.8 [INFO] [stderr] Compiling semver v0.11.0 [INFO] [stderr] Compiling cargo-platform v0.1.1 [INFO] [stderr] Compiling cargo_metadata v0.12.3 [INFO] [stderr] Checking rodio v0.9.0 [INFO] [stderr] Compiling skeptic v0.13.6 [INFO] [stderr] Compiling ggez v0.5.1 [INFO] [stderr] Checking smithay-client-toolkit v0.4.6 [INFO] [stderr] Checking winit v0.19.5 [INFO] [stderr] Checking glutin v0.20.1 [INFO] [stderr] Checking gfx_window_glutin v0.30.0 [INFO] [stderr] Checking downtone v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `ContextBuilder` [INFO] [stdout] --> src/main.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | use ggez::{Context, ContextBuilder, GameResult}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | use fastrand; [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: `MainState` [INFO] [stdout] --> src/level.rs:8:25 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::{CameraView, MainState, clamp}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/level.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | data: data [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [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/main.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | text_common: text_common, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `text_common` [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/main.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | generator: generator, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generator` [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/main.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | level: level, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `level` [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: unneeded unit expression [INFO] [stdout] --> src/main.rs:244:25 [INFO] [stdout] | [INFO] [stdout] 244 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ContextBuilder` [INFO] [stdout] --> src/main.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | use ggez::{Context, ContextBuilder, GameResult}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | use fastrand; [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: `MainState` [INFO] [stdout] --> src/level.rs:8:25 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::{CameraView, MainState, clamp}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/level.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | data: data [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [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/main.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | text_common: text_common, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `text_common` [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/main.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | generator: generator, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `generator` [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/main.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | level: level, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `level` [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: unneeded unit expression [INFO] [stdout] --> src/main.rs:244:25 [INFO] [stdout] | [INFO] [stdout] 244 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/level.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | assert!(piece.data.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!piece.data.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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/level.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | let vec_h = piece.data.len() as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `piece.data.len()` [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: the loop variable `i` is only used to index `data` [INFO] [stdout] --> src/level.rs:26:18 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..vec_h { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 26 - for i in 0..vec_h { [INFO] [stdout] 26 + for in data.iter().take(vec_h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `n` is only used to index `data` [INFO] [stdout] --> src/level.rs:28:22 [INFO] [stdout] | [INFO] [stdout] 28 | for n in 0..vec_w { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 28 - for n in 0..vec_w { [INFO] [stdout] 28 + for in data.iter().take(vec_w) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/level.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | if !(self.tiles.len() > y) || !(self.tiles[y].len() > x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.tiles.len() <= y)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/level.rs:39:39 [INFO] [stdout] | [INFO] [stdout] 39 | if !(self.tiles.len() > y) || !(self.tiles[y].len() > x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.tiles[y].len() <= x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/level.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | let x_max = self.height() as usize-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.height()` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/level.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | let y_max = self.width() as usize-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.width()` [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: length comparison to zero [INFO] [stdout] --> src/level.rs:176:12 [INFO] [stdout] | [INFO] [stdout] 176 | if self.data.len() == 0 { 0.0 } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.data.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] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:235:39 [INFO] [stdout] | [INFO] [stdout] 235 | GameState::Menu(state) => match state { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 236 | | MenuState::Main => { [INFO] [stdout] 237 | | if !self.music_source.playing() { [INFO] [stdout] 238 | | self.set_music(ctx, "menu_loop.ogg"); [INFO] [stdout] ... | [INFO] [stdout] 247 | | _ => {} [INFO] [stdout] 248 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:235:29 [INFO] [stdout] | [INFO] [stdout] 235 | GameState::Menu(state) => match state { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 236 | MenuState::Main => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:235:39 [INFO] [stdout] | [INFO] [stdout] 235 | GameState::Menu(state) => match state { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 236 | | MenuState::Main => { [INFO] [stdout] 237 | | if !self.music_source.playing() { [INFO] [stdout] 238 | | self.set_music(ctx, "menu_loop.ogg"); [INFO] [stdout] ... | [INFO] [stdout] 247 | | _ => {} [INFO] [stdout] 248 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 235 ~ GameState::Menu(state) => if state == &MenuState::Main { [INFO] [stdout] 236 + if !self.music_source.playing() { [INFO] [stdout] 237 + self.set_music(ctx, "menu_loop.ogg"); [INFO] [stdout] 238 + self.music_source.play()?; [INFO] [stdout] 239 + } [INFO] [stdout] 240 + if keyboard::is_key_pressed(ctx, KeyCode::Return) { [INFO] [stdout] 241 + self.state = GameState::InGame; [INFO] [stdout] 242 + self.music_source.stop(); [INFO] [stdout] 243 + () [INFO] [stdout] 244 + } [INFO] [stdout] 245 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:321:39 [INFO] [stdout] | [INFO] [stdout] 321 | GameState::Menu(state) => match state { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 322 | | MenuState::Main => { [INFO] [stdout] 323 | | let cycle_time: f32 = 4000.0; [INFO] [stdout] ... | [INFO] [stdout] 349 | | _ => {} [INFO] [stdout] 350 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:321:29 [INFO] [stdout] | [INFO] [stdout] 321 | GameState::Menu(state) => match state { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 322 | MenuState::Main => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:321:39 [INFO] [stdout] | [INFO] [stdout] 321 | GameState::Menu(state) => match state { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 322 | | MenuState::Main => { [INFO] [stdout] 323 | | let cycle_time: f32 = 4000.0; [INFO] [stdout] ... | [INFO] [stdout] 349 | | _ => {} [INFO] [stdout] 350 | | }, [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] 321 ~ GameState::Menu(state) => if state == &MenuState::Main { [INFO] [stdout] 322 + let cycle_time: f32 = 4000.0; [INFO] [stdout] 323 + { [INFO] [stdout] 324 + let logo = atlas_drawparam_base(ctx, Rect::new(48.0, 0.0, 65.0, 21.0)) [INFO] [stdout] 325 + .dest(Point2::new(max_width / 2.0, max_height / 4.0 + 15.0 + (2.0 * PI * time / cycle_time).cos() * 5.0)) [INFO] [stdout] 326 + .scale(Vector2::new(9.0, 9.0)) [INFO] [stdout] 327 + .offset(Point2::new(0.5, 0.5)); [INFO] [stdout] 328 + self.spritebatch.add(logo); [INFO] [stdout] 329 + } [INFO] [stdout] 330 + [INFO] [stdout] 331 + { [INFO] [stdout] 332 + let bgr = graphics::Image::new(ctx, "/menu_bgr.png").expect("Could not load image!"); [INFO] [stdout] 333 + let bgr_param = graphics::DrawParam::new() [INFO] [stdout] 334 + .dest(Point2::new(max_width / 2.0, max_height)) [INFO] [stdout] 335 + .scale(Vector2::new(max_width / bgr.width() as f32, max_height / bgr.height() as f32 + (2.0 * PI * time / cycle_time / 2.0).sin() * 0.25)) [INFO] [stdout] 336 + .offset(Point2::new(0.5, 1.0)); [INFO] [stdout] 337 + graphics::draw(ctx, &bgr, bgr_param)?; [INFO] [stdout] 338 + } [INFO] [stdout] 339 + [INFO] [stdout] 340 + let text_width = self.text_common[1].width(ctx); [INFO] [stdout] 341 + graphics::queue_text(ctx, &self.text_common[1], Point2::new(-(text_width as f32)/2.0, (max_height/2.0 - 80.0)/text_scalef), None); [INFO] [stdout] 342 + [INFO] [stdout] 343 + if (time + 300.0) % 1263.0 > 631.5 { [INFO] [stdout] 344 + let text_width = self.text_common[0].width(ctx); [INFO] [stdout] 345 + graphics::queue_text(ctx, &self.text_common[0], Point2::new(-(text_width as f32) / 2.0, 35.0/* + (2.0 * PI * time / cycle_time / 2.0).sin() * 2.0*/), None); [INFO] [stdout] 346 + } [INFO] [stdout] 347 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:435:29 [INFO] [stdout] | [INFO] [stdout] 435 | KeyCode::A => { if self.is_in_game(ctx) { self.player_facing = Facing::Left; } }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 435 - KeyCode::A => { if self.is_in_game(ctx) { self.player_facing = Facing::Left; } }, [INFO] [stdout] 435 + KeyCode::A if self.is_in_game(ctx) => { self.player_facing = Facing::Left; }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:436:29 [INFO] [stdout] | [INFO] [stdout] 436 | KeyCode::D => { if self.is_in_game(ctx) { self.player_facing = Facing::Right; } }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 436 - KeyCode::D => { if self.is_in_game(ctx) { self.player_facing = Facing::Right; } }, [INFO] [stdout] 436 + KeyCode::D if self.is_in_game(ctx) => { self.player_facing = Facing::Right; }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:469:5 [INFO] [stdout] | [INFO] [stdout] 462 | / let rect = Rect::new( [INFO] [stdout] 463 | | frame_rect.x/ATLAS_WIDTH + frame_index as f32*frame_width + frame_index as f32, [INFO] [stdout] 464 | | frame_rect.y/ATLAS_HEIGHT, [INFO] [stdout] 465 | | frame_width, [INFO] [stdout] 466 | | frame_rect.h [INFO] [stdout] 467 | | ); [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 468 | [INFO] [stdout] 469 | rect [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] 462 ~ [INFO] [stdout] 463 | [INFO] [stdout] 464 ~ Rect::new( [INFO] [stdout] 465 + frame_rect.x/ATLAS_WIDTH + frame_index as f32*frame_width + frame_index as f32, [INFO] [stdout] 466 + frame_rect.y/ATLAS_HEIGHT, [INFO] [stdout] 467 + frame_width, [INFO] [stdout] 468 + frame_rect.h [INFO] [stdout] 469 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Boost` [INFO] [stdout] --> src/main.rs:523:1 [INFO] [stdout] | [INFO] [stdout] 523 | / enum Modifier { [INFO] [stdout] 524 | | AtkBoost, [INFO] [stdout] 525 | | DefBoost, [INFO] [stdout] 526 | | SpdBoost, [INFO] [stdout] 527 | | TonBoost [INFO] [stdout] 528 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CameraView` [INFO] [stdout] --> src/main.rs:537:5 [INFO] [stdout] | [INFO] [stdout] 537 | / pub fn new() -> Self { [INFO] [stdout] 538 | | CameraView { [INFO] [stdout] 539 | | scale: 1.0, [INFO] [stdout] 540 | | scroll: Vector2::new(0.0, 0.0), [INFO] [stdout] ... | [INFO] [stdout] 543 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 536 + impl Default for CameraView { [INFO] [stdout] 537 + fn default() -> Self { [INFO] [stdout] 538 + Self::new() [INFO] [stdout] 539 + } [INFO] [stdout] 540 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `pieceA` should have a snake case name [INFO] [stdout] --> src/main.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | let pieceA = level::piece_from_dntp(ctx, "/piece/_spawn-0.dntp").unwrap(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `piece_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `pieceB` should have a snake case name [INFO] [stdout] --> src/main.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | let pieceB = level::piece_from_dntp(ctx, "/piece/0.dntp").unwrap(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `piece_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/level.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | assert!(piece.data.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!piece.data.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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/level.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | let vec_h = piece.data.len() as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `piece.data.len()` [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: the loop variable `i` is only used to index `data` [INFO] [stdout] --> src/level.rs:26:18 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..vec_h { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 26 - for i in 0..vec_h { [INFO] [stdout] 26 + for in data.iter().take(vec_h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `n` is only used to index `data` [INFO] [stdout] --> src/level.rs:28:22 [INFO] [stdout] | [INFO] [stdout] 28 | for n in 0..vec_w { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 28 - for n in 0..vec_w { [INFO] [stdout] 28 + for in data.iter().take(vec_w) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/level.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | if !(self.tiles.len() > y) || !(self.tiles[y].len() > x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.tiles.len() <= y)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/level.rs:39:39 [INFO] [stdout] | [INFO] [stdout] 39 | if !(self.tiles.len() > y) || !(self.tiles[y].len() > x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.tiles[y].len() <= x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/level.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | let x_max = self.height() as usize-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.height()` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/level.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | let y_max = self.width() as usize-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.width()` [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: length comparison to zero [INFO] [stdout] --> src/level.rs:176:12 [INFO] [stdout] | [INFO] [stdout] 176 | if self.data.len() == 0 { 0.0 } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.data.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] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:235:39 [INFO] [stdout] | [INFO] [stdout] 235 | GameState::Menu(state) => match state { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 236 | | MenuState::Main => { [INFO] [stdout] 237 | | if !self.music_source.playing() { [INFO] [stdout] 238 | | self.set_music(ctx, "menu_loop.ogg"); [INFO] [stdout] ... | [INFO] [stdout] 247 | | _ => {} [INFO] [stdout] 248 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:235:29 [INFO] [stdout] | [INFO] [stdout] 235 | GameState::Menu(state) => match state { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 236 | MenuState::Main => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:235:39 [INFO] [stdout] | [INFO] [stdout] 235 | GameState::Menu(state) => match state { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 236 | | MenuState::Main => { [INFO] [stdout] 237 | | if !self.music_source.playing() { [INFO] [stdout] 238 | | self.set_music(ctx, "menu_loop.ogg"); [INFO] [stdout] ... | [INFO] [stdout] 247 | | _ => {} [INFO] [stdout] 248 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 235 ~ GameState::Menu(state) => if state == &MenuState::Main { [INFO] [stdout] 236 + if !self.music_source.playing() { [INFO] [stdout] 237 + self.set_music(ctx, "menu_loop.ogg"); [INFO] [stdout] 238 + self.music_source.play()?; [INFO] [stdout] 239 + } [INFO] [stdout] 240 + if keyboard::is_key_pressed(ctx, KeyCode::Return) { [INFO] [stdout] 241 + self.state = GameState::InGame; [INFO] [stdout] 242 + self.music_source.stop(); [INFO] [stdout] 243 + () [INFO] [stdout] 244 + } [INFO] [stdout] 245 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:321:39 [INFO] [stdout] | [INFO] [stdout] 321 | GameState::Menu(state) => match state { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 322 | | MenuState::Main => { [INFO] [stdout] 323 | | let cycle_time: f32 = 4000.0; [INFO] [stdout] ... | [INFO] [stdout] 349 | | _ => {} [INFO] [stdout] 350 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:321:29 [INFO] [stdout] | [INFO] [stdout] 321 | GameState::Menu(state) => match state { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 322 | MenuState::Main => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:321:39 [INFO] [stdout] | [INFO] [stdout] 321 | GameState::Menu(state) => match state { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 322 | | MenuState::Main => { [INFO] [stdout] 323 | | let cycle_time: f32 = 4000.0; [INFO] [stdout] ... | [INFO] [stdout] 349 | | _ => {} [INFO] [stdout] 350 | | }, [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] 321 ~ GameState::Menu(state) => if state == &MenuState::Main { [INFO] [stdout] 322 + let cycle_time: f32 = 4000.0; [INFO] [stdout] 323 + { [INFO] [stdout] 324 + let logo = atlas_drawparam_base(ctx, Rect::new(48.0, 0.0, 65.0, 21.0)) [INFO] [stdout] 325 + .dest(Point2::new(max_width / 2.0, max_height / 4.0 + 15.0 + (2.0 * PI * time / cycle_time).cos() * 5.0)) [INFO] [stdout] 326 + .scale(Vector2::new(9.0, 9.0)) [INFO] [stdout] 327 + .offset(Point2::new(0.5, 0.5)); [INFO] [stdout] 328 + self.spritebatch.add(logo); [INFO] [stdout] 329 + } [INFO] [stdout] 330 + [INFO] [stdout] 331 + { [INFO] [stdout] 332 + let bgr = graphics::Image::new(ctx, "/menu_bgr.png").expect("Could not load image!"); [INFO] [stdout] 333 + let bgr_param = graphics::DrawParam::new() [INFO] [stdout] 334 + .dest(Point2::new(max_width / 2.0, max_height)) [INFO] [stdout] 335 + .scale(Vector2::new(max_width / bgr.width() as f32, max_height / bgr.height() as f32 + (2.0 * PI * time / cycle_time / 2.0).sin() * 0.25)) [INFO] [stdout] 336 + .offset(Point2::new(0.5, 1.0)); [INFO] [stdout] 337 + graphics::draw(ctx, &bgr, bgr_param)?; [INFO] [stdout] 338 + } [INFO] [stdout] 339 + [INFO] [stdout] 340 + let text_width = self.text_common[1].width(ctx); [INFO] [stdout] 341 + graphics::queue_text(ctx, &self.text_common[1], Point2::new(-(text_width as f32)/2.0, (max_height/2.0 - 80.0)/text_scalef), None); [INFO] [stdout] 342 + [INFO] [stdout] 343 + if (time + 300.0) % 1263.0 > 631.5 { [INFO] [stdout] 344 + let text_width = self.text_common[0].width(ctx); [INFO] [stdout] 345 + graphics::queue_text(ctx, &self.text_common[0], Point2::new(-(text_width as f32) / 2.0, 35.0/* + (2.0 * PI * time / cycle_time / 2.0).sin() * 2.0*/), None); [INFO] [stdout] 346 + } [INFO] [stdout] 347 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:435:29 [INFO] [stdout] | [INFO] [stdout] 435 | KeyCode::A => { if self.is_in_game(ctx) { self.player_facing = Facing::Left; } }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 435 - KeyCode::A => { if self.is_in_game(ctx) { self.player_facing = Facing::Left; } }, [INFO] [stdout] 435 + KeyCode::A if self.is_in_game(ctx) => { self.player_facing = Facing::Left; }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:436:29 [INFO] [stdout] | [INFO] [stdout] 436 | KeyCode::D => { if self.is_in_game(ctx) { self.player_facing = Facing::Right; } }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 436 - KeyCode::D => { if self.is_in_game(ctx) { self.player_facing = Facing::Right; } }, [INFO] [stdout] 436 + KeyCode::D if self.is_in_game(ctx) => { self.player_facing = Facing::Right; }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:469:5 [INFO] [stdout] | [INFO] [stdout] 462 | / let rect = Rect::new( [INFO] [stdout] 463 | | frame_rect.x/ATLAS_WIDTH + frame_index as f32*frame_width + frame_index as f32, [INFO] [stdout] 464 | | frame_rect.y/ATLAS_HEIGHT, [INFO] [stdout] 465 | | frame_width, [INFO] [stdout] 466 | | frame_rect.h [INFO] [stdout] 467 | | ); [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 468 | [INFO] [stdout] 469 | rect [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] 462 ~ [INFO] [stdout] 463 | [INFO] [stdout] 464 ~ Rect::new( [INFO] [stdout] 465 + frame_rect.x/ATLAS_WIDTH + frame_index as f32*frame_width + frame_index as f32, [INFO] [stdout] 466 + frame_rect.y/ATLAS_HEIGHT, [INFO] [stdout] 467 + frame_width, [INFO] [stdout] 468 + frame_rect.h [INFO] [stdout] 469 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Boost` [INFO] [stdout] --> src/main.rs:523:1 [INFO] [stdout] | [INFO] [stdout] 523 | / enum Modifier { [INFO] [stdout] 524 | | AtkBoost, [INFO] [stdout] 525 | | DefBoost, [INFO] [stdout] 526 | | SpdBoost, [INFO] [stdout] 527 | | TonBoost [INFO] [stdout] 528 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CameraView` [INFO] [stdout] --> src/main.rs:537:5 [INFO] [stdout] | [INFO] [stdout] 537 | / pub fn new() -> Self { [INFO] [stdout] 538 | | CameraView { [INFO] [stdout] 539 | | scale: 1.0, [INFO] [stdout] 540 | | scroll: Vector2::new(0.0, 0.0), [INFO] [stdout] ... | [INFO] [stdout] 543 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 536 + impl Default for CameraView { [INFO] [stdout] 537 + fn default() -> Self { [INFO] [stdout] 538 + Self::new() [INFO] [stdout] 539 + } [INFO] [stdout] 540 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `pieceA` should have a snake case name [INFO] [stdout] --> src/main.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | let pieceA = level::piece_from_dntp(ctx, "/piece/_spawn-0.dntp").unwrap(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `piece_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `pieceB` should have a snake case name [INFO] [stdout] --> src/main.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | let pieceB = level::piece_from_dntp(ctx, "/piece/0.dntp").unwrap(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `piece_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 11s [INFO] running `Command { std: "docker" "inspect" "47cc32e80fe7292c8005e23e19125a5f019f1340708f2c3c73c98a020af7932e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "47cc32e80fe7292c8005e23e19125a5f019f1340708f2c3c73c98a020af7932e", kill_on_drop: false }` [INFO] [stdout] 47cc32e80fe7292c8005e23e19125a5f019f1340708f2c3c73c98a020af7932e