[INFO] cloning repository https://github.com/conundris/Chip8-Emulator [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/conundris/Chip8-Emulator" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fconundris%2FChip8-Emulator", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fconundris%2FChip8-Emulator'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b92b64d371751ba64091dd11f0e56331d1a44adb [INFO] linting conundris/Chip8-Emulator against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fconundris%2FChip8-Emulator" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/conundris/Chip8-Emulator [INFO] finished tweaking git repo https://github.com/conundris/Chip8-Emulator [INFO] tweaked toml for git repo https://github.com/conundris/Chip8-Emulator written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/conundris/Chip8-Emulator 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/conundris/Chip8-Emulator 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 async-signal v0.2.11 [INFO] [stderr] Downloaded async-io v2.4.1 [INFO] [stderr] Downloaded egui_glow v0.26.2 [INFO] [stderr] Downloaded minifb v0.25.0 [INFO] [stderr] Downloaded eframe v0.26.2 [INFO] [stderr] Downloaded sdl2 v0.35.2 [INFO] [stderr] Downloaded sdl2-sys v0.35.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 27f4d178eec0ab9968352d40152f3b9ba230e063950b650b61626aa40902b5aa [INFO] running `Command { std: "docker" "start" "-a" "27f4d178eec0ab9968352d40152f3b9ba230e063950b650b61626aa40902b5aa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "27f4d178eec0ab9968352d40152f3b9ba230e063950b650b61626aa40902b5aa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "27f4d178eec0ab9968352d40152f3b9ba230e063950b650b61626aa40902b5aa", kill_on_drop: false }` [INFO] [stdout] 27f4d178eec0ab9968352d40152f3b9ba230e063950b650b61626aa40902b5aa [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f1ff679c19a7f768d1fbb8f93b84193a2d43ff84d0ea9936f70c24ef7d4ac620 [INFO] running `Command { std: "docker" "start" "-a" "f1ff679c19a7f768d1fbb8f93b84193a2d43ff84d0ea9936f70c24ef7d4ac620", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Checking bitflags v2.9.1 [INFO] [stderr] Compiling memchr v2.7.5 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking libloading v0.8.8 [INFO] [stderr] Compiling cc v1.2.29 [INFO] [stderr] Compiling wayland-sys v0.31.6 [INFO] [stderr] Compiling wayland-client v0.31.10 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Compiling bytemuck_derive v1.9.3 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling indexmap v2.10.0 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling winnow v0.5.40 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Checking event-listener v5.4.0 [INFO] [stderr] Compiling io-lifetimes v1.0.11 [INFO] [stderr] Checking event-listener-strategy v0.5.4 [INFO] [stderr] Compiling enumflags2_derive v0.7.12 [INFO] [stderr] Compiling quick-xml v0.37.5 [INFO] [stderr] Compiling aho-corasick v1.1.3 [INFO] [stderr] Checking futures-lite v2.6.0 [INFO] [stderr] Compiling polling v2.8.0 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Compiling rustix v0.37.28 [INFO] [stderr] Checking futures-lite v1.13.0 [INFO] [stderr] Checking async-channel v2.5.0 [INFO] [stderr] Checking async-lock v2.8.0 [INFO] [stderr] Checking enumflags2 v0.7.12 [INFO] [stderr] Compiling async-io v1.13.0 [INFO] [stderr] Compiling async-fs v1.6.0 [INFO] [stderr] Checking linux-raw-sys v0.3.8 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Checking blocking v1.6.2 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.9 [INFO] [stderr] Compiling log v0.4.27 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling wayland-scanner v0.31.6 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking async-executor v1.13.2 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking bytemuck v1.23.1 [INFO] [stderr] Compiling wayland-backend v0.3.10 [INFO] [stderr] Checking socket2 v0.4.10 [INFO] [stderr] Compiling toml_edit v0.19.15 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking memmap2 v0.9.5 [INFO] [stderr] Checking nix v0.26.4 [INFO] [stderr] Checking xdg-home v1.3.0 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Compiling async-recursion v1.1.1 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Compiling wayland-scanner v0.29.5 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Compiling smithay-client-toolkit v0.18.1 [INFO] [stderr] Checking polling v3.8.0 [INFO] [stderr] Checking strict-num v0.1.1 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Compiling wayland-sys v0.29.5 [INFO] [stderr] Checking accesskit v0.12.3 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Checking owned_ttf_parser v0.25.0 [INFO] [stderr] Compiling winit v0.29.15 [INFO] [stderr] Checking raw-window-handle v0.5.2 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking ab_glyph v0.2.30 [INFO] [stderr] Checking nix v0.24.3 [INFO] [stderr] Compiling glutin_glx_sys v0.5.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Compiling glutin_egl_sys v0.6.0 [INFO] [stderr] Checking emath v0.26.2 [INFO] [stderr] Compiling proc-macro-crate v1.3.1 [INFO] [stderr] Compiling wayland-client v0.29.5 [INFO] [stderr] Checking ecolor v0.26.2 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Checking nohash-hasher v0.2.0 [INFO] [stderr] Compiling zvariant_utils v1.0.1 [INFO] [stderr] Checking calloop v0.12.4 [INFO] [stderr] Checking x11rb v0.13.1 [INFO] [stderr] Checking calloop v0.13.0 [INFO] [stderr] Checking epaint v0.26.2 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking accesskit_consumer v0.16.1 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Checking symphonia-core v0.5.4 [INFO] [stderr] Compiling glutin v0.31.3 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking async-once-cell v0.5.4 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking alsa-sys v0.3.1 [INFO] [stderr] Compiling wayland-protocols v0.29.5 [INFO] [stderr] Checking egui v0.26.2 [INFO] [stderr] Compiling glutin-winit v0.4.2 [INFO] [stderr] Compiling cpal v0.15.3 [INFO] [stderr] Checking tinyvec v1.9.0 [INFO] [stderr] Checking alsa v0.9.1 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking webbrowser v0.8.15 [INFO] [stderr] Compiling minifb v0.25.0 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking ogg v0.8.0 [INFO] [stderr] Checking dasp_sample v0.11.0 [INFO] [stderr] Compiling anyhow v1.0.98 [INFO] [stderr] Checking arboard v3.6.0 [INFO] [stderr] Checking web-time v0.2.4 [INFO] [stderr] Checking glow v0.13.1 [INFO] [stderr] Checking raw-window-handle v0.4.3 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Compiling regex v1.11.1 [INFO] [stderr] Checking tempfile v3.20.0 [INFO] [stderr] Compiling chip8_emulator v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking symphonia-metadata v0.5.4 [INFO] [stderr] Checking claxon v0.4.3 [INFO] [stderr] Checking wayland-commons v0.29.5 [INFO] [stderr] Checking wayland-protocols v0.31.2 [INFO] [stderr] Checking wayland-cursor v0.31.10 [INFO] [stderr] Checking calloop-wayland-source v0.2.0 [INFO] [stderr] Checking wayland-protocols v0.32.8 [INFO] [stderr] Compiling zvariant_derive v3.15.2 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Checking calloop-wayland-source v0.3.0 [INFO] [stderr] Checking lewton v0.10.2 [INFO] [stderr] Checking hound v3.5.1 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking symphonia-bundle-mp3 v0.5.4 [INFO] [stderr] Compiling zbus_macros v3.15.2 [INFO] [stderr] Checking zvariant v3.15.2 [INFO] [stderr] Checking symphonia v0.5.4 [INFO] [stderr] Checking rodio v0.20.1 [INFO] [stderr] Checking egui_glow v0.26.2 [INFO] [stderr] Checking wayland-cursor v0.29.5 [INFO] [stderr] Checking zbus_names v2.6.1 [INFO] [stderr] Checking wayland-protocols-wlr v0.2.0 [INFO] [stderr] Checking wayland-protocols-plasma v0.2.0 [INFO] [stderr] Checking zbus v3.15.2 [INFO] [stderr] Checking wayland-protocols-wlr v0.3.8 [INFO] [stderr] Checking sctk-adwaita v0.8.3 [INFO] [stderr] Checking smithay-client-toolkit v0.19.2 [INFO] [stderr] Checking smithay-clipboard v0.7.2 [INFO] [stderr] Checking atspi-common v0.3.0 [INFO] [stderr] Checking atspi-proxies v0.3.0 [INFO] [stderr] Checking atspi-connection v0.3.0 [INFO] [stderr] Checking atspi v0.19.0 [INFO] [stderr] Checking accesskit_unix v0.6.2 [INFO] [stderr] Checking accesskit_winit v0.16.1 [INFO] [stderr] Checking egui-winit v0.26.2 [INFO] [stderr] Checking eframe v0.26.2 [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/memory.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / /// - 0x200-0xFFF: Program ROM and work RAM [INFO] [stdout] 7 | | [INFO] [stdout] | |_^ [INFO] [stdout] 8 | pub struct Memory { [INFO] [stdout] | ----------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Memory module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The Chip8 has 4KB (4096 bytes) of memory with the following memory map: [INFO] [stdout] 4 ~ //! - 0x000-0x1FF: Reserved for the interpreter [INFO] [stdout] 5 ~ //! - 0x050-0x0A0: Storage space for the 16 built-in characters (0-F) [INFO] [stdout] 6 ~ //! - 0x200-0xFFF: Program ROM and work RAM [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/cpu.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / /// - 8-bit sound timer [INFO] [stdout] 11 | | [INFO] [stdout] | |_^ [INFO] [stdout] 12 | use crate::memory::Memory; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! CPU module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The Chip8 CPU has: [INFO] [stdout] 4 ~ //! - 16 8-bit registers (V0-VF) [INFO] [stdout] 5 ~ //! - 16-bit index register (I) [INFO] [stdout] 6 ~ //! - 16-bit program counter (PC) [INFO] [stdout] 7 ~ //! - 16-level stack for subroutine calls [INFO] [stdout] 8 ~ //! - 8-bit stack pointer (SP) [INFO] [stdout] 9 ~ //! - 8-bit delay timer [INFO] [stdout] 10 ~ //! - 8-bit sound timer [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/display.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// Sprites are XORed onto the screen, and if a pixel is turned off as a result, a collision is detected. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | pub const DISPLAY_WIDTH: usize = 64; [INFO] [stdout] | ----------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Display module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The Chip8 has a 64x32 pixel monochrome display. [INFO] [stdout] 4 ~ //! Sprites are XORed onto the screen, and if a pixel is turned off as a result, a collision is detected. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/input.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// This module handles key press and release detection. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | use minifb::Key; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Input module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The Chip8 has a 16-key hexadecimal keypad (0-F). [INFO] [stdout] 4 ~ //! This module handles key press and release detection. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/debug_window.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// debugging information about the emulator state. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | use eframe::egui; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Debug window module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! This module implements a separate window using egui for displaying [INFO] [stdout] 4 ~ //! debugging information about the emulator state. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/emulator.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// and implements the main emulation loop. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | use std::fs::File; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Emulator module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! This module ties together all the components (memory, CPU, display, input) [INFO] [stdout] 4 ~ //! and implements the main emulation loop. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/memory.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / /// - 0x200-0xFFF: Program ROM and work RAM [INFO] [stdout] 7 | | [INFO] [stdout] | |_^ [INFO] [stdout] 8 | pub struct Memory { [INFO] [stdout] | ----------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Memory module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The Chip8 has 4KB (4096 bytes) of memory with the following memory map: [INFO] [stdout] 4 ~ //! - 0x000-0x1FF: Reserved for the interpreter [INFO] [stdout] 5 ~ //! - 0x050-0x0A0: Storage space for the 16 built-in characters (0-F) [INFO] [stdout] 6 ~ //! - 0x200-0xFFF: Program ROM and work RAM [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/cpu.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / /// - 8-bit sound timer [INFO] [stdout] 11 | | [INFO] [stdout] | |_^ [INFO] [stdout] 12 | use crate::memory::Memory; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! CPU module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The Chip8 CPU has: [INFO] [stdout] 4 ~ //! - 16 8-bit registers (V0-VF) [INFO] [stdout] 5 ~ //! - 16-bit index register (I) [INFO] [stdout] 6 ~ //! - 16-bit program counter (PC) [INFO] [stdout] 7 ~ //! - 16-level stack for subroutine calls [INFO] [stdout] 8 ~ //! - 8-bit stack pointer (SP) [INFO] [stdout] 9 ~ //! - 8-bit delay timer [INFO] [stdout] 10 ~ //! - 8-bit sound timer [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `DEBUG_SENDER` is never used [INFO] [stdout] --> src/debug_window.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | static mut DEBUG_SENDER: Option> = None; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/display.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// Sprites are XORed onto the screen, and if a pixel is turned off as a result, a collision is detected. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | pub const DISPLAY_WIDTH: usize = 64; [INFO] [stdout] | ----------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Display module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The Chip8 has a 64x32 pixel monochrome display. [INFO] [stdout] 4 ~ //! Sprites are XORed onto the screen, and if a pixel is turned off as a result, a collision is detected. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/input.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// This module handles key press and release detection. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | use minifb::Key; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Input module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The Chip8 has a 16-key hexadecimal keypad (0-F). [INFO] [stdout] 4 ~ //! This module handles key press and release detection. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `INIT` is never used [INFO] [stdout] --> src/debug_window.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | static INIT: Once = Once::new(); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/debug_window.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// debugging information about the emulator state. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | use eframe::egui; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Debug window module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! This module implements a separate window using egui for displaying [INFO] [stdout] 4 ~ //! debugging information about the emulator state. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Memory` [INFO] [stdout] --> src/memory.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | let mut memory = Self { ram: [0; 4096] }; [INFO] [stdout] 17 | | memory.load_fonts(); [INFO] [stdout] 18 | | memory [INFO] [stdout] 19 | | } [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] 13 + impl Default for Memory { [INFO] [stdout] 14 + fn default() -> Self { [INFO] [stdout] 15 + Self::new() [INFO] [stdout] 16 + } [INFO] [stdout] 17 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/emulator.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// and implements the main emulation loop. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | use std::fs::File; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Emulator module for the Chip8 emulator [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! This module ties together all the components (memory, CPU, display, input) [INFO] [stdout] 4 ~ //! and implements the main emulation loop. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CPU` [INFO] [stdout] --> src/cpu.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / pub fn new() -> Self { [INFO] [stdout] 35 | | Self { [INFO] [stdout] 36 | | v: [0; 16], [INFO] [stdout] 37 | | i: 0, [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 32 + impl Default for CPU { [INFO] [stdout] 33 + fn default() -> Self { [INFO] [stdout] 34 + Self::new() [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cpu.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | / if n == 0 { [INFO] [stdout] 140 | | if self.v[x] == self.v[y] { [INFO] [stdout] 141 | | self.pc += 2; [INFO] [stdout] ... | [INFO] [stdout] 144 | | return Err(format!("Unknown opcode: {:#06X}", opcode)); [INFO] [stdout] 145 | | } [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] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 137 ~ 0x5000 [INFO] [stdout] 138 | // 5XY0: Skip next instruction if VX equals VY [INFO] [stdout] 139 ~ if n == 0 => { [INFO] [stdout] 140 | if self.v[x] == self.v[y] { [INFO] [stdout] 141 | self.pc += 2; [INFO] [stdout] 142 | } [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cpu.rs:204:17 [INFO] [stdout] | [INFO] [stdout] 204 | / if n == 0 { [INFO] [stdout] 205 | | if self.v[x] != self.v[y] { [INFO] [stdout] 206 | | self.pc += 2; [INFO] [stdout] ... | [INFO] [stdout] 209 | | return Err(format!("Unknown opcode: {:#06X}", opcode)); [INFO] [stdout] 210 | | } [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] 202 ~ 0x9000 [INFO] [stdout] 203 | // 9XY0: Skip next instruction if VX doesn't equal VY [INFO] [stdout] 204 ~ if n == 0 => { [INFO] [stdout] 205 | if self.v[x] != self.v[y] { [INFO] [stdout] 206 | self.pc += 2; [INFO] [stdout] 207 | } [INFO] [stdout] 208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Display` [INFO] [stdout] --> src/display.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Self { [INFO] [stdout] 20 | | buffer: [[false; DISPLAY_WIDTH]; DISPLAY_HEIGHT], [INFO] [stdout] 21 | | changed: true, [INFO] [stdout] 22 | | } [INFO] [stdout] 23 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 + impl Default for Display { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Keypad` [INFO] [stdout] --> src/input.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / pub fn new() -> Self { [INFO] [stdout] 18 | | Self { [INFO] [stdout] 19 | | keys: [false; 16], [INFO] [stdout] 20 | | last_key_pressed: None, [INFO] [stdout] 21 | | } [INFO] [stdout] 22 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 15 + impl Default for Keypad { [INFO] [stdout] 16 + fn default() -> Self { [INFO] [stdout] 17 + Self::new() [INFO] [stdout] 18 + } [INFO] [stdout] 19 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/debug_window.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | debug_window.receiver = Some(receiver); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `debug_window::DebugWindow { receiver: Some(receiver), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/debug_window.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let mut debug_window = Self::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Emulator` [INFO] [stdout] --> src/emulator.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | / pub fn new() -> Self { [INFO] [stdout] 79 | | Self { [INFO] [stdout] 80 | | memory: Memory::new(), [INFO] [stdout] 81 | | cpu: CPU::new(), [INFO] [stdout] ... | [INFO] [stdout] 90 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 76 + impl Default for Emulator { [INFO] [stdout] 77 + fn default() -> Self { [INFO] [stdout] 78 + Self::new() [INFO] [stdout] 79 + } [INFO] [stdout] 80 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `keys` [INFO] [stdout] --> src/emulator.rs:132:30 [INFO] [stdout] | [INFO] [stdout] 132 | for i in 0..16 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 132 - for i in 0..16 { [INFO] [stdout] 132 + for (i, ) in keys.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/emulator.rs:205:37 [INFO] [stdout] | [INFO] [stdout] 205 | fn update_buffer(&self, buffer: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 205 - fn update_buffer(&self, buffer: &mut Vec) { [INFO] [stdout] 205 + fn update_buffer(&self, buffer: &mut [u32]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `display_buffer` [INFO] [stdout] --> src/emulator.rs:227:18 [INFO] [stdout] | [INFO] [stdout] 227 | for y in 0..DISPLAY_HEIGHT { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 227 - for y in 0..DISPLAY_HEIGHT { [INFO] [stdout] 227 + for (y, ) in display_buffer.iter().enumerate().take(DISPLAY_HEIGHT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `display_buffer` [INFO] [stdout] --> src/emulator.rs:228:22 [INFO] [stdout] | [INFO] [stdout] 228 | for x in 0..DISPLAY_WIDTH { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 228 - for x in 0..DISPLAY_WIDTH { [INFO] [stdout] 228 + for (x, ) in display_buffer.iter().enumerate().take(DISPLAY_WIDTH) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/emulator.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | / let mut buffer = Vec::new(); [INFO] [stdout] 247 | | [INFO] [stdout] 248 | | // Write current opcode (2 bytes) [INFO] [stdout] 249 | | buffer.push((self.current_opcode >> 8) as u8); [INFO] [stdout] ... | [INFO] [stdout] 261 | | buffer.push(self.cpu.get_stack_pointer()); [INFO] [stdout] | |__________________________________________________^ help: consider using the `vec![]` macro: `let mut buffer = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `display_buffer` [INFO] [stdout] --> src/emulator.rs:283:18 [INFO] [stdout] | [INFO] [stdout] 283 | for y in 0..32 { [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] 283 - for y in 0..32 { [INFO] [stdout] 283 + for in display_buffer.iter().take(32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `DEBUG_SENDER` is never used [INFO] [stdout] --> src/debug_window.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | static mut DEBUG_SENDER: Option> = None; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `INIT` is never used [INFO] [stdout] --> src/debug_window.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | static INIT: Once = Once::new(); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Memory` [INFO] [stdout] --> src/memory.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | let mut memory = Self { ram: [0; 4096] }; [INFO] [stdout] 17 | | memory.load_fonts(); [INFO] [stdout] 18 | | memory [INFO] [stdout] 19 | | } [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] 13 + impl Default for Memory { [INFO] [stdout] 14 + fn default() -> Self { [INFO] [stdout] 15 + Self::new() [INFO] [stdout] 16 + } [INFO] [stdout] 17 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CPU` [INFO] [stdout] --> src/cpu.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / pub fn new() -> Self { [INFO] [stdout] 35 | | Self { [INFO] [stdout] 36 | | v: [0; 16], [INFO] [stdout] 37 | | i: 0, [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 32 + impl Default for CPU { [INFO] [stdout] 33 + fn default() -> Self { [INFO] [stdout] 34 + Self::new() [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cpu.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | / if n == 0 { [INFO] [stdout] 140 | | if self.v[x] == self.v[y] { [INFO] [stdout] 141 | | self.pc += 2; [INFO] [stdout] ... | [INFO] [stdout] 144 | | return Err(format!("Unknown opcode: {:#06X}", opcode)); [INFO] [stdout] 145 | | } [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] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 137 ~ 0x5000 [INFO] [stdout] 138 | // 5XY0: Skip next instruction if VX equals VY [INFO] [stdout] 139 ~ if n == 0 => { [INFO] [stdout] 140 | if self.v[x] == self.v[y] { [INFO] [stdout] 141 | self.pc += 2; [INFO] [stdout] 142 | } [INFO] [stdout] 143 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cpu.rs:204:17 [INFO] [stdout] | [INFO] [stdout] 204 | / if n == 0 { [INFO] [stdout] 205 | | if self.v[x] != self.v[y] { [INFO] [stdout] 206 | | self.pc += 2; [INFO] [stdout] ... | [INFO] [stdout] 209 | | return Err(format!("Unknown opcode: {:#06X}", opcode)); [INFO] [stdout] 210 | | } [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] 202 ~ 0x9000 [INFO] [stdout] 203 | // 9XY0: Skip next instruction if VX doesn't equal VY [INFO] [stdout] 204 ~ if n == 0 => { [INFO] [stdout] 205 | if self.v[x] != self.v[y] { [INFO] [stdout] 206 | self.pc += 2; [INFO] [stdout] 207 | } [INFO] [stdout] 208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Display` [INFO] [stdout] --> src/display.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Self { [INFO] [stdout] 20 | | buffer: [[false; DISPLAY_WIDTH]; DISPLAY_HEIGHT], [INFO] [stdout] 21 | | changed: true, [INFO] [stdout] 22 | | } [INFO] [stdout] 23 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 + impl Default for Display { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Keypad` [INFO] [stdout] --> src/input.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / pub fn new() -> Self { [INFO] [stdout] 18 | | Self { [INFO] [stdout] 19 | | keys: [false; 16], [INFO] [stdout] 20 | | last_key_pressed: None, [INFO] [stdout] 21 | | } [INFO] [stdout] 22 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 15 + impl Default for Keypad { [INFO] [stdout] 16 + fn default() -> Self { [INFO] [stdout] 17 + Self::new() [INFO] [stdout] 18 + } [INFO] [stdout] 19 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/debug_window.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | debug_window.receiver = Some(receiver); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `debug_window::DebugWindow { receiver: Some(receiver), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/debug_window.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let mut debug_window = Self::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Emulator` [INFO] [stdout] --> src/emulator.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | / pub fn new() -> Self { [INFO] [stdout] 79 | | Self { [INFO] [stdout] 80 | | memory: Memory::new(), [INFO] [stdout] 81 | | cpu: CPU::new(), [INFO] [stdout] ... | [INFO] [stdout] 90 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 76 + impl Default for Emulator { [INFO] [stdout] 77 + fn default() -> Self { [INFO] [stdout] 78 + Self::new() [INFO] [stdout] 79 + } [INFO] [stdout] 80 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `keys` [INFO] [stdout] --> src/emulator.rs:132:30 [INFO] [stdout] | [INFO] [stdout] 132 | for i in 0..16 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 132 - for i in 0..16 { [INFO] [stdout] 132 + for (i, ) in keys.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/emulator.rs:205:37 [INFO] [stdout] | [INFO] [stdout] 205 | fn update_buffer(&self, buffer: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 205 - fn update_buffer(&self, buffer: &mut Vec) { [INFO] [stdout] 205 + fn update_buffer(&self, buffer: &mut [u32]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `display_buffer` [INFO] [stdout] --> src/emulator.rs:227:18 [INFO] [stdout] | [INFO] [stdout] 227 | for y in 0..DISPLAY_HEIGHT { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 227 - for y in 0..DISPLAY_HEIGHT { [INFO] [stdout] 227 + for (y, ) in display_buffer.iter().enumerate().take(DISPLAY_HEIGHT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `display_buffer` [INFO] [stdout] --> src/emulator.rs:228:22 [INFO] [stdout] | [INFO] [stdout] 228 | for x in 0..DISPLAY_WIDTH { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 228 - for x in 0..DISPLAY_WIDTH { [INFO] [stdout] 228 + for (x, ) in display_buffer.iter().enumerate().take(DISPLAY_WIDTH) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/emulator.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | / let mut buffer = Vec::new(); [INFO] [stdout] 247 | | [INFO] [stdout] 248 | | // Write current opcode (2 bytes) [INFO] [stdout] 249 | | buffer.push((self.current_opcode >> 8) as u8); [INFO] [stdout] ... | [INFO] [stdout] 261 | | buffer.push(self.cpu.get_stack_pointer()); [INFO] [stdout] | |__________________________________________________^ help: consider using the `vec![]` macro: `let mut buffer = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `display_buffer` [INFO] [stdout] --> src/emulator.rs:283:18 [INFO] [stdout] | [INFO] [stdout] 283 | for y in 0..32 { [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] 283 - for y in 0..32 { [INFO] [stdout] 283 + for in display_buffer.iter().take(32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 08s [INFO] running `Command { std: "docker" "inspect" "f1ff679c19a7f768d1fbb8f93b84193a2d43ff84d0ea9936f70c24ef7d4ac620", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f1ff679c19a7f768d1fbb8f93b84193a2d43ff84d0ea9936f70c24ef7d4ac620", kill_on_drop: false }` [INFO] [stdout] f1ff679c19a7f768d1fbb8f93b84193a2d43ff84d0ea9936f70c24ef7d4ac620