[INFO] cloning repository https://github.com/nzx9/emu6502 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/nzx9/emu6502" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnzx9%2Femu6502", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnzx9%2Femu6502'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 939bfb871caa07eeab7f47522bc793385e608fba [INFO] linting nzx9/emu6502 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnzx9%2Femu6502" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/nzx9/emu6502 [INFO] finished tweaking git repo https://github.com/nzx9/emu6502 [INFO] tweaked toml for git repo https://github.com/nzx9/emu6502 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/nzx9/emu6502 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/nzx9/emu6502 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 73af155a6191d3e5c97bd3ef09265a16aead55db05ac0c6d4b0332f1221d2c9b [INFO] running `Command { std: "docker" "start" "-a" "73af155a6191d3e5c97bd3ef09265a16aead55db05ac0c6d4b0332f1221d2c9b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "73af155a6191d3e5c97bd3ef09265a16aead55db05ac0c6d4b0332f1221d2c9b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "73af155a6191d3e5c97bd3ef09265a16aead55db05ac0c6d4b0332f1221d2c9b", kill_on_drop: false }` [INFO] [stdout] 73af155a6191d3e5c97bd3ef09265a16aead55db05ac0c6d4b0332f1221d2c9b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] d6c7c0a2b2e336794792c8783bbe7fb17ee7c41f7dc1e767631e2c0fac1120cf [INFO] running `Command { std: "docker" "start" "-a" "d6c7c0a2b2e336794792c8783bbe7fb17ee7c41f7dc1e767631e2c0fac1120cf", kill_on_drop: false }` [INFO] [stderr] Checking emu6502 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::ops::Add` [INFO] [stdout] --> src/cpu.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::ops::Add; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::Add` [INFO] [stdout] --> src/cpu.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::ops::Add; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::env` [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::env; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::env` [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::env; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_rom` is never used [INFO] [stdout] --> src/assembler.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn read_rom(filepath: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `add`, `sub`, `mul`, `div`, `unimpl`, and `unwrap_operands` are never used [INFO] [stdout] --> src/cpu.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl CPU { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn add(&self, a: u8, b: u8) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub fn sub(&self, a: u8, b: u8) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn mul(&self, a: u8, b: u8) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn div(&self, a: u8, b: u8) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn unimpl() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn unwrap_operands(operands: &Vec) -> Option<(u8, Option)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `trig_i_if`, `trig_d_if`, and `trig_b_if` are never used [INFO] [stdout] --> src/flags.rs:70:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Flags { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn trig_i_if(&mut self, condition: bool) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn trig_d_if(&mut self, condition: bool) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn trig_b_if(&mut self, condition: bool) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `op_cat`, `desc`, and `aflags` are never read [INFO] [stdout] --> src/instructions.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Instruction { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 9 | pub op_cat: OpCat, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 10 | pub addr_mod: AddrMod, [INFO] [stdout] 11 | pub desc: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 12 | pub aflags: Flags, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Instruction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `SysFun` is never constructed [INFO] [stdout] --> src/opcat.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum OpCat { [INFO] [stdout] | ----- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 13 | SysFun, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpCat` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_str` is never used [INFO] [stdout] --> src/opcat.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl OpCat { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 18 | pub fn as_str(&self) -> String { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/assembler.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | let rom = fs::read(filepath).expect("Can't read rom"); [INFO] [stdout] | ------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 7 | rom [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] 6 ~ [INFO] [stdout] 7 ~ fs::read(filepath).expect("Can't read rom") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/assembler.rs:10:30 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn next_instruction(rom: &Vec, pc: u16) -> (Instruction, u16) { [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] 10 - pub fn next_instruction(rom: &Vec, pc: u16) -> (Instruction, u16) { [INFO] [stdout] 10 + pub fn next_instruction(rom: &[u8], pc: u16) -> (Instruction, u16) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_rom` is never used [INFO] [stdout] --> src/assembler.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn read_rom(filepath: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `add`, `sub`, `mul`, `div`, `unimpl`, and `unwrap_operands` are never used [INFO] [stdout] --> src/cpu.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl CPU { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn add(&self, a: u8, b: u8) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub fn sub(&self, a: u8, b: u8) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn mul(&self, a: u8, b: u8) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn div(&self, a: u8, b: u8) -> u8 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn unimpl() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn unwrap_operands(operands: &Vec) -> Option<(u8, Option)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `trig_i_if`, `trig_d_if`, and `trig_b_if` are never used [INFO] [stdout] --> src/flags.rs:70:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Flags { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn trig_i_if(&mut self, condition: bool) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn trig_d_if(&mut self, condition: bool) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn trig_b_if(&mut self, condition: bool) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `op_cat`, `desc`, and `aflags` are never read [INFO] [stdout] --> src/instructions.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Instruction { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 9 | pub op_cat: OpCat, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 10 | pub addr_mod: AddrMod, [INFO] [stdout] 11 | pub desc: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 12 | pub aflags: Flags, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Instruction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `SysFun` is never constructed [INFO] [stdout] --> src/opcat.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum OpCat { [INFO] [stdout] | ----- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 13 | SysFun, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpCat` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_str` is never used [INFO] [stdout] --> src/opcat.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl OpCat { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 18 | pub fn as_str(&self) -> String { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/assembler.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | let rom = fs::read(filepath).expect("Can't read rom"); [INFO] [stdout] | ------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 7 | rom [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] 6 ~ [INFO] [stdout] 7 ~ fs::read(filepath).expect("Can't read rom") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/assembler.rs:10:30 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn next_instruction(rom: &Vec, pc: u16) -> (Instruction, u16) { [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] 10 - pub fn next_instruction(rom: &Vec, pc: u16) -> (Instruction, u16) { [INFO] [stdout] 10 + pub fn next_instruction(rom: &[u8], pc: u16) -> (Instruction, u16) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/assembler.rs:291:57 [INFO] [stdout] | [INFO] [stdout] 291 | let result = crate::assembler::next_instruction(&rom, pc); [INFO] [stdout] | ^^^^ help: change this to: `rom` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/assembler.rs:298:9 [INFO] [stdout] | [INFO] [stdout] 298 | dis_asm.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `dis_asm.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> src/cpu.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cpu.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn new(rom: &Vec) -> CPU { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 ~ pub fn new(rom: &[u8]) -> CPU { [INFO] [stdout] 24 | CPU { [INFO] [stdout] ... [INFO] [stdout] 32 | cyc: 0x00, [INFO] [stdout] 33 ~ rom: rom.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cpu.rs:72:58 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn read(&mut self, addr_mod: &AddrMod, operands: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - pub fn read(&mut self, addr_mod: &AddrMod, operands: &Vec) -> Option { [INFO] [stdout] 72 + pub fn read(&mut self, addr_mod: &AddrMod, operands: &[u8]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/cpu.rs:93:27 [INFO] [stdout] | [INFO] [stdout] 93 | .read((self.memory.read(operands[0] as u16) as u16 + self.x as u16) as u16), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((self.memory.read(operands[0] as u16) as u16 + self.x as u16))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/cpu.rs:97:27 [INFO] [stdout] | [INFO] [stdout] 97 | .read((self.memory.read(operands[0] as u16) as u16 + self.y as u16) as u16), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((self.memory.read(operands[0] as u16) as u16 + self.y as u16))` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cpu.rs:103:63 [INFO] [stdout] | [INFO] [stdout] 103 | pub fn mem_write(&mut self, addr_mod: &AddrMod, operands: &Vec, val: u8) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 103 - pub fn mem_write(&mut self, addr_mod: &AddrMod, operands: &Vec, val: u8) { [INFO] [stdout] 103 + pub fn mem_write(&mut self, addr_mod: &AddrMod, operands: &[u8], val: u8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/assembler.rs:291:57 [INFO] [stdout] | [INFO] [stdout] 291 | let result = crate::assembler::next_instruction(&rom, pc); [INFO] [stdout] | ^^^^ help: change this to: `rom` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/assembler.rs:298:9 [INFO] [stdout] | [INFO] [stdout] 298 | dis_asm.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `dis_asm.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cpu.rs:132:13 [INFO] [stdout] | [INFO] [stdout] 132 | return Some((operands[0], None)); [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] 132 - return Some((operands[0], None)); [INFO] [stdout] 132 + Some((operands[0], None)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cpu.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | return Some((operands[0], Some(operands[1]))); [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] 134 - return Some((operands[0], Some(operands[1]))); [INFO] [stdout] 134 + Some((operands[0], Some(operands[1]))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cpu.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | return None; [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] 136 - return None; [INFO] [stdout] 136 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cpu.rs:130:38 [INFO] [stdout] | [INFO] [stdout] 130 | pub fn unwrap_operands(operands: &Vec) -> Option<(u8, Option)> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 130 - pub fn unwrap_operands(operands: &Vec) -> Option<(u8, Option)> { [INFO] [stdout] 130 + pub fn unwrap_operands(operands: &[u8]) -> Option<(u8, Option)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> src/cpu.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cpu.rs:151:20 [INFO] [stdout] | [INFO] [stdout] 151 | if !val.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `val.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cpu.rs:173:20 [INFO] [stdout] | [INFO] [stdout] 173 | if !val.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `val.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cpu.rs:185:24 [INFO] [stdout] | [INFO] [stdout] 185 | if !val.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `val.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cpu.rs:214:20 [INFO] [stdout] | [INFO] [stdout] 214 | if !val.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `val.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:154:46 [INFO] [stdout] | [INFO] [stdout] 151 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 154 | match self.a.checked_add(val.unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:174:31 [INFO] [stdout] | [INFO] [stdout] 173 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 174 | self.a &= val.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:186:61 [INFO] [stdout] | [INFO] [stdout] 185 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 186 | self.flags.trig_c_if(check_bit_one!(val.unwrap(), 7)); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:187:74 [INFO] [stdout] | [INFO] [stdout] 185 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 186 | self.flags.trig_c_if(check_bit_one!(val.unwrap(), 7)); [INFO] [stdout] 187 | self.mem_write(&instr.addr_mod, &instr.operands, val.unwrap() << 1); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:215:51 [INFO] [stdout] | [INFO] [stdout] 214 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 215 | self.flags.trig_z_if(self.a & val.unwrap() == 0); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:216:57 [INFO] [stdout] | [INFO] [stdout] 214 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 215 | self.flags.trig_z_if(self.a & val.unwrap() == 0); [INFO] [stdout] 216 | self.flags.trig_n_if(check_bit_one!(val.unwrap(), 7)); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:217:57 [INFO] [stdout] | [INFO] [stdout] 214 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 217 | self.flags.trig_v_if(check_bit_one!(val.unwrap(), 6)); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cpu.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn new(rom: &Vec) -> CPU { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 ~ pub fn new(rom: &[u8]) -> CPU { [INFO] [stdout] 24 | CPU { [INFO] [stdout] ... [INFO] [stdout] 32 | cyc: 0x00, [INFO] [stdout] 33 ~ rom: rom.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu.rs:182:21 [INFO] [stdout] | [INFO] [stdout] 182 | self.a = self.a << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.a <<= 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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cpu.rs:72:58 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn read(&mut self, addr_mod: &AddrMod, operands: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - pub fn read(&mut self, addr_mod: &AddrMod, operands: &Vec) -> Option { [INFO] [stdout] 72 + pub fn read(&mut self, addr_mod: &AddrMod, operands: &[u8]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/cpu.rs:93:27 [INFO] [stdout] | [INFO] [stdout] 93 | .read((self.memory.read(operands[0] as u16) as u16 + self.x as u16) as u16), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((self.memory.read(operands[0] as u16) as u16 + self.x as u16))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/cpu.rs:97:27 [INFO] [stdout] | [INFO] [stdout] 97 | .read((self.memory.read(operands[0] as u16) as u16 + self.y as u16) as u16), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((self.memory.read(operands[0] as u16) as u16 + self.y as u16))` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cpu.rs:103:63 [INFO] [stdout] | [INFO] [stdout] 103 | pub fn mem_write(&mut self, addr_mod: &AddrMod, operands: &Vec, val: u8) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 103 - pub fn mem_write(&mut self, addr_mod: &AddrMod, operands: &Vec, val: u8) { [INFO] [stdout] 103 + pub fn mem_write(&mut self, addr_mod: &AddrMod, operands: &[u8], val: u8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cpu.rs:132:13 [INFO] [stdout] | [INFO] [stdout] 132 | return Some((operands[0], None)); [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] 132 - return Some((operands[0], None)); [INFO] [stdout] 132 + Some((operands[0], None)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cpu.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | return Some((operands[0], Some(operands[1]))); [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] 134 - return Some((operands[0], Some(operands[1]))); [INFO] [stdout] 134 + Some((operands[0], Some(operands[1]))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | / if condition { [INFO] [stdout] 56 | | self.c = true; [INFO] [stdout] 57 | | } else { [INFO] [stdout] 58 | | self.c = false; [INFO] [stdout] 59 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.c = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cpu.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | return None; [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] 136 - return None; [INFO] [stdout] 136 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | / if condition { [INFO] [stdout] 64 | | self.z = true; [INFO] [stdout] 65 | | } else { [INFO] [stdout] 66 | | self.z = false; [INFO] [stdout] 67 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.z = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cpu.rs:130:38 [INFO] [stdout] | [INFO] [stdout] 130 | pub fn unwrap_operands(operands: &Vec) -> Option<(u8, Option)> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 130 - pub fn unwrap_operands(operands: &Vec) -> Option<(u8, Option)> { [INFO] [stdout] 130 + pub fn unwrap_operands(operands: &[u8]) -> Option<(u8, Option)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cpu.rs:151:20 [INFO] [stdout] | [INFO] [stdout] 151 | if !val.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `val.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cpu.rs:173:20 [INFO] [stdout] | [INFO] [stdout] 173 | if !val.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `val.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cpu.rs:185:24 [INFO] [stdout] | [INFO] [stdout] 185 | if !val.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `val.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cpu.rs:214:20 [INFO] [stdout] | [INFO] [stdout] 214 | if !val.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `val.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:154:46 [INFO] [stdout] | [INFO] [stdout] 151 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 154 | match self.a.checked_add(val.unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:174:31 [INFO] [stdout] | [INFO] [stdout] 173 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 174 | self.a &= val.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:186:61 [INFO] [stdout] | [INFO] [stdout] 185 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 186 | self.flags.trig_c_if(check_bit_one!(val.unwrap(), 7)); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:187:74 [INFO] [stdout] | [INFO] [stdout] 185 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 186 | self.flags.trig_c_if(check_bit_one!(val.unwrap(), 7)); [INFO] [stdout] 187 | self.mem_write(&instr.addr_mod, &instr.operands, val.unwrap() << 1); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:215:51 [INFO] [stdout] | [INFO] [stdout] 214 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 215 | self.flags.trig_z_if(self.a & val.unwrap() == 0); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:216:57 [INFO] [stdout] | [INFO] [stdout] 214 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 215 | self.flags.trig_z_if(self.a & val.unwrap() == 0); [INFO] [stdout] 216 | self.flags.trig_n_if(check_bit_one!(val.unwrap(), 7)); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_none` [INFO] [stdout] --> src/cpu.rs:217:57 [INFO] [stdout] | [INFO] [stdout] 214 | if !val.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 217 | self.flags.trig_v_if(check_bit_one!(val.unwrap(), 6)); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / if condition { [INFO] [stdout] 72 | | self.i = true; [INFO] [stdout] 73 | | } else { [INFO] [stdout] 74 | | self.i = false; [INFO] [stdout] 75 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.i = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | / if condition { [INFO] [stdout] 80 | | self.d = true; [INFO] [stdout] 81 | | } else { [INFO] [stdout] 82 | | self.d = false; [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.d = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if condition { [INFO] [stdout] 88 | | self.b = true; [INFO] [stdout] 89 | | } else { [INFO] [stdout] 90 | | self.b = false; [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.b = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | / if condition { [INFO] [stdout] 96 | | self.v = true; [INFO] [stdout] 97 | | } else { [INFO] [stdout] 98 | | self.v = false; [INFO] [stdout] 99 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.v = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | / if condition { [INFO] [stdout] 104 | | self.n = true; [INFO] [stdout] 105 | | } else { [INFO] [stdout] 106 | | self.n = false; [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.n = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu.rs:182:21 [INFO] [stdout] | [INFO] [stdout] 182 | self.a = self.a << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.a <<= 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: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | / if condition { [INFO] [stdout] 56 | | self.c = true; [INFO] [stdout] 57 | | } else { [INFO] [stdout] 58 | | self.c = false; [INFO] [stdout] 59 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.c = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | / if condition { [INFO] [stdout] 64 | | self.z = true; [INFO] [stdout] 65 | | } else { [INFO] [stdout] 66 | | self.z = false; [INFO] [stdout] 67 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.z = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / if condition { [INFO] [stdout] 72 | | self.i = true; [INFO] [stdout] 73 | | } else { [INFO] [stdout] 74 | | self.i = false; [INFO] [stdout] 75 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.i = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | / if condition { [INFO] [stdout] 80 | | self.d = true; [INFO] [stdout] 81 | | } else { [INFO] [stdout] 82 | | self.d = false; [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.d = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if condition { [INFO] [stdout] 88 | | self.b = true; [INFO] [stdout] 89 | | } else { [INFO] [stdout] 90 | | self.b = false; [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.b = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | / if condition { [INFO] [stdout] 96 | | self.v = true; [INFO] [stdout] 97 | | } else { [INFO] [stdout] 98 | | self.v = false; [INFO] [stdout] 99 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.v = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/flags.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | / if condition { [INFO] [stdout] 104 | | self.n = true; [INFO] [stdout] 105 | | } else { [INFO] [stdout] 106 | | self.n = false; [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.n = condition;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `msg` after checking its variant with `is_none` [INFO] [stdout] --> src/shell.rs:11:22 [INFO] [stdout] | [INFO] [stdout] 8 | if msg.is_none() { [INFO] [stdout] | ---------------- help: try: `if let Some() = msg` [INFO] [stdout] ... [INFO] [stdout] 11 | print!("{}", msg.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shell.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn inp<'a>(inputs: &'a Vec<&str>, loc: usize) -> &'a str { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - pub fn inp<'a>(inputs: &'a Vec<&str>, loc: usize) -> &'a str { [INFO] [stdout] 17 + pub fn inp<'a>(inputs: &'a [&str], loc: usize) -> &'a str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `msg` after checking its variant with `is_none` [INFO] [stdout] --> src/shell.rs:11:22 [INFO] [stdout] | [INFO] [stdout] 8 | if msg.is_none() { [INFO] [stdout] | ---------------- help: try: `if let Some() = msg` [INFO] [stdout] ... [INFO] [stdout] 11 | print!("{}", msg.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shell.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn inp<'a>(inputs: &'a Vec<&str>, loc: usize) -> &'a str { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - pub fn inp<'a>(inputs: &'a Vec<&str>, loc: usize) -> &'a str { [INFO] [stdout] 17 + pub fn inp<'a>(inputs: &'a [&str], loc: usize) -> &'a str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.31s [INFO] running `Command { std: "docker" "inspect" "d6c7c0a2b2e336794792c8783bbe7fb17ee7c41f7dc1e767631e2c0fac1120cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d6c7c0a2b2e336794792c8783bbe7fb17ee7c41f7dc1e767631e2c0fac1120cf", kill_on_drop: false }` [INFO] [stdout] d6c7c0a2b2e336794792c8783bbe7fb17ee7c41f7dc1e767631e2c0fac1120cf