Skip to content

Commit

Permalink
Linter fix and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akhmetov committed Jan 2, 2022
1 parent 52e4f92 commit a2d7d9a
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 156 deletions.
224 changes: 79 additions & 145 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,7 @@ impl CPU {
// C <- [76543210] <- C
let mut value = self.get_operand(op);

let original_carry = match self.get_carry() {
FLAG_CARRY => true,
_ => false,
};

let original_carry = matches!(self.get_carry(), FLAG_CARRY);
if (value >> 7) != 0 {
self.set_carry();
} else {
Expand Down Expand Up @@ -563,11 +559,7 @@ impl CPU {
// C -> [76543210] -> C
let mut value = self.get_operand(op);

let original_carry = match self.get_carry() {
FLAG_CARRY => true,
_ => false,
};

let original_carry = matches!(self.get_carry(), FLAG_CARRY);
if (value & 0x01) != 0 {
self.set_carry();
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/functional-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn main() {
.unwrap_or("6502_functional_test.bin");

if !Path::new(filename).exists() {
panic!(format!("File {} does not exist", filename))
panic!("File {} does not exist", filename)
}

cpu.load(&fs::read(filename).unwrap(), 0);
Expand Down

0 comments on commit a2d7d9a

Please sign in to comment.