[INFO] cloning repository https://github.com/francoiswnel/Hack-Emulator [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/francoiswnel/Hack-Emulator" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffrancoiswnel%2FHack-Emulator", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffrancoiswnel%2FHack-Emulator'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c82a25650881bd6df0c7db2ae7320532eb68d667 [INFO] linting francoiswnel/Hack-Emulator against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffrancoiswnel%2FHack-Emulator" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/francoiswnel/Hack-Emulator [INFO] finished tweaking git repo https://github.com/francoiswnel/Hack-Emulator [INFO] tweaked toml for git repo https://github.com/francoiswnel/Hack-Emulator written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/francoiswnel/Hack-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/francoiswnel/Hack-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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 6810c54edbe9352b60abc88a6bdf02c7552a4d5410a3d415423a531c410ce174 [INFO] running `Command { std: "docker" "start" "-a" "6810c54edbe9352b60abc88a6bdf02c7552a4d5410a3d415423a531c410ce174", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6810c54edbe9352b60abc88a6bdf02c7552a4d5410a3d415423a531c410ce174", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6810c54edbe9352b60abc88a6bdf02c7552a4d5410a3d415423a531c410ce174", kill_on_drop: false }` [INFO] [stdout] 6810c54edbe9352b60abc88a6bdf02c7552a4d5410a3d415423a531c410ce174 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a1a231463c191ba1c678dd51ee37db80e109a115542cb1d0533cd7385be007d3 [INFO] running `Command { std: "docker" "start" "-a" "a1a231463c191ba1c678dd51ee37db80e109a115542cb1d0533cd7385be007d3", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Checking hemu v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/main.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / /// [INFO] [stdout] ... | [INFO] [stdout] 13 | | [INFO] [stdout] | |_^ [INFO] [stdout] 14 | use std::env; [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] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] help: if the doc comment should not document the following item then comment it out [INFO] [stdout] | [INFO] [stdout] 1 ~ // /// [INFO] [stdout] 2 ~ // /// Hack Emulator [INFO] [stdout] 3 ~ // /// Created by Francois W. Nel on 9 Jul 2016. [INFO] [stdout] 4 ~ // /// [INFO] [stdout] 5 ~ // /// TODO: Documentation [INFO] [stdout] 6 ~ // /// [INFO] [stdout] 7 ~ // /// Usage: [INFO] [stdout] 8 ~ // /// $ hemu [INFO] [stdout] 9 ~ // /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/main.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/main.rs:298:26 [INFO] [stdout] | [INFO] [stdout] 298 | self.screen[(address - 0b1 << 14) as usize] = input; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(address - 0b1) << 14` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/main.rs:306:33 [INFO] [stdout] | [INFO] [stdout] 306 | return self.screen[(address - 0b1 << 14) as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(address - 0b1) << 14` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/main.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / /// [INFO] [stdout] ... | [INFO] [stdout] 13 | | [INFO] [stdout] | |_^ [INFO] [stdout] 14 | use std::env; [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] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] help: if the doc comment should not document the following item then comment it out [INFO] [stdout] | [INFO] [stdout] 1 ~ // /// [INFO] [stdout] 2 ~ // /// Hack Emulator [INFO] [stdout] 3 ~ // /// Created by Francois W. Nel on 9 Jul 2016. [INFO] [stdout] 4 ~ // /// [INFO] [stdout] 5 ~ // /// TODO: Documentation [INFO] [stdout] 6 ~ // /// [INFO] [stdout] 7 ~ // /// Usage: [INFO] [stdout] 8 ~ // /// $ hemu [INFO] [stdout] 9 ~ // /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/main.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/main.rs:298:26 [INFO] [stdout] | [INFO] [stdout] 298 | self.screen[(address - 0b1 << 14) as usize] = input; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(address - 0b1) << 14` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/main.rs:306:33 [INFO] [stdout] | [INFO] [stdout] 306 | return self.screen[(address - 0b1 << 14) as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(address - 0b1) << 14` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/main.rs:43:24 [INFO] [stdout] | [INFO] [stdout] 43 | why.description()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/main.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | why.description()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/main.rs:70:28 [INFO] [stdout] | [INFO] [stdout] 70 | why.description()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/main.rs:43:24 [INFO] [stdout] | [INFO] [stdout] 43 | why.description()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/main.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | why.description()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `instruction` is never read [INFO] [stdout] --> src/main.rs:101:32 [INFO] [stdout] | [INFO] [stdout] 101 | let mut instruction: u16 = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/main.rs:70:28 [INFO] [stdout] | [INFO] [stdout] 70 | why.description()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:39:41 [INFO] [stdout] | [INFO] [stdout] 39 | let mut rom_file = match File::open(&rom_path) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `rom_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / match rom_file.read_to_string(&mut rom_buffer) { [INFO] [stdout] 52 | | Err(why) => { [INFO] [stdout] 53 | | panic!("\nError: Failed to read {:?}: {}\n", [INFO] [stdout] 54 | | rom_file_name, [INFO] [stdout] ... | [INFO] [stdout] 57 | | Ok(_) => (), [INFO] [stdout] 58 | | } [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] 51 ~ if let Err(why) = rom_file.read_to_string(&mut rom_buffer) { [INFO] [stdout] 52 + panic!("\nError: Failed to read {:?}: {}\n", [INFO] [stdout] 53 + rom_file_name, [INFO] [stdout] 54 + why.description()) [INFO] [stdout] 55 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `buffer_line_number` is used as a loop counter [INFO] [stdout] --> src/main.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | for instruction in rom_buffer.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (buffer_line_number, instruction) in (0_u16..).zip(rom_buffer.lines())` [INFO] [stdout] | [INFO] [stdout] = note: `buffer_line_number` is of type `u16`, making it ineligible for `Iterator::enumerate` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:65:44 [INFO] [stdout] | [INFO] [stdout] 65 | rom.push(match u16::from_str_radix(&instruction.trim(), 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `instruction.trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:175:24 [INFO] [stdout] | [INFO] [stdout] 175 | self.write_a = !self.instruction_type || (self.instruction_type && instruction & 0b1 << 5 != 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 175 - self.write_a = !self.instruction_type || (self.instruction_type && instruction & 0b1 << 5 != 0); [INFO] [stdout] 175 + self.write_a = !(self.instruction_type && instruction & 0b1 << 5 == 0); [INFO] [stdout] | [INFO] [stdout] 175 - self.write_a = !self.instruction_type || (self.instruction_type && instruction & 0b1 << 5 != 0); [INFO] [stdout] 175 + self.write_a = !self.instruction_type || instruction & 0b1 << 5 != 0; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `instruction` is never read [INFO] [stdout] --> src/main.rs:101:32 [INFO] [stdout] | [INFO] [stdout] 101 | let mut instruction: u16 = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | self.flags = self.flags | 0b1 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.flags |= 0b1 << 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:240:13 [INFO] [stdout] | [INFO] [stdout] 240 | self.flags = self.flags | 0b1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.flags |= 0b1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | return self.ram[address as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 304 - return self.ram[address as usize]; [INFO] [stdout] 304 + self.ram[address as usize] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:306:13 [INFO] [stdout] | [INFO] [stdout] 306 | return self.screen[(address - 0b1 << 14) as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 306 - return self.screen[(address - 0b1 << 14) as usize]; [INFO] [stdout] 306 + self.screen[(address - 0b1 << 14) as usize] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:308:13 [INFO] [stdout] | [INFO] [stdout] 308 | return self.keyboard; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 308 - return self.keyboard; [INFO] [stdout] 308 + self.keyboard [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/main.rs:27:16 [INFO] [stdout] | [INFO] [stdout] 27 | panic!(println!("\nUsage: {} \n", arguments[0])) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: add a "{:?}" format string to use the `Debug` implementation of `()` [INFO] [stdout] | [INFO] [stdout] 27 | panic!("{:?}", println!("\nUsage: {} \n", arguments[0])) [INFO] [stdout] | +++++++ [INFO] [stdout] help: or use std::panic::panic_any instead [INFO] [stdout] | [INFO] [stdout] 27 - panic!(println!("\nUsage: {} \n", arguments[0])) [INFO] [stdout] 27 + std::panic::panic_any(println!("\nUsage: {} \n", arguments[0])) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:39:41 [INFO] [stdout] | [INFO] [stdout] 39 | let mut rom_file = match File::open(&rom_path) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `rom_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / match rom_file.read_to_string(&mut rom_buffer) { [INFO] [stdout] 52 | | Err(why) => { [INFO] [stdout] 53 | | panic!("\nError: Failed to read {:?}: {}\n", [INFO] [stdout] 54 | | rom_file_name, [INFO] [stdout] ... | [INFO] [stdout] 57 | | Ok(_) => (), [INFO] [stdout] 58 | | } [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] 51 ~ if let Err(why) = rom_file.read_to_string(&mut rom_buffer) { [INFO] [stdout] 52 + panic!("\nError: Failed to read {:?}: {}\n", [INFO] [stdout] 53 + rom_file_name, [INFO] [stdout] 54 + why.description()) [INFO] [stdout] 55 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `buffer_line_number` is used as a loop counter [INFO] [stdout] --> src/main.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | for instruction in rom_buffer.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (buffer_line_number, instruction) in (0_u16..).zip(rom_buffer.lines())` [INFO] [stdout] | [INFO] [stdout] = note: `buffer_line_number` is of type `u16`, making it ineligible for `Iterator::enumerate` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:65:44 [INFO] [stdout] | [INFO] [stdout] 65 | rom.push(match u16::from_str_radix(&instruction.trim(), 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `instruction.trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:175:24 [INFO] [stdout] | [INFO] [stdout] 175 | self.write_a = !self.instruction_type || (self.instruction_type && instruction & 0b1 << 5 != 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 175 - self.write_a = !self.instruction_type || (self.instruction_type && instruction & 0b1 << 5 != 0); [INFO] [stdout] 175 + self.write_a = !(self.instruction_type && instruction & 0b1 << 5 == 0); [INFO] [stdout] | [INFO] [stdout] 175 - self.write_a = !self.instruction_type || (self.instruction_type && instruction & 0b1 << 5 != 0); [INFO] [stdout] 175 + self.write_a = !self.instruction_type || instruction & 0b1 << 5 != 0; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | self.flags = self.flags | 0b1 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.flags |= 0b1 << 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:240:13 [INFO] [stdout] | [INFO] [stdout] 240 | self.flags = self.flags | 0b1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.flags |= 0b1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | return self.ram[address as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 304 - return self.ram[address as usize]; [INFO] [stdout] 304 + self.ram[address as usize] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:306:13 [INFO] [stdout] | [INFO] [stdout] 306 | return self.screen[(address - 0b1 << 14) as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 306 - return self.screen[(address - 0b1 << 14) as usize]; [INFO] [stdout] 306 + self.screen[(address - 0b1 << 14) as usize] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:308:13 [INFO] [stdout] | [INFO] [stdout] 308 | return self.keyboard; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 308 - return self.keyboard; [INFO] [stdout] 308 + self.keyboard [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/main.rs:27:16 [INFO] [stdout] | [INFO] [stdout] 27 | panic!(println!("\nUsage: {} \n", arguments[0])) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: add a "{:?}" format string to use the `Debug` implementation of `()` [INFO] [stdout] | [INFO] [stdout] 27 | panic!("{:?}", println!("\nUsage: {} \n", arguments[0])) [INFO] [stdout] | +++++++ [INFO] [stdout] help: or use std::panic::panic_any instead [INFO] [stdout] | [INFO] [stdout] 27 - panic!(println!("\nUsage: {} \n", arguments[0])) [INFO] [stdout] 27 + std::panic::panic_any(println!("\nUsage: {} \n", arguments[0])) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s [INFO] running `Command { std: "docker" "inspect" "a1a231463c191ba1c678dd51ee37db80e109a115542cb1d0533cd7385be007d3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a1a231463c191ba1c678dd51ee37db80e109a115542cb1d0533cd7385be007d3", kill_on_drop: false }` [INFO] [stdout] a1a231463c191ba1c678dd51ee37db80e109a115542cb1d0533cd7385be007d3