Skip to content

Commit

Permalink
Remove a few clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Nov 5, 2023
1 parent b87e3fc commit 25b656f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/decoder_8080.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ impl Decoder8080 {

// Load cycle information
for c in 0..=255 {
if let Some(opcode) = &mut self.no_prefix[c as usize] {
if let Some(opcode) = &mut self.no_prefix[c] {
opcode.cycles = NO_PREFIX_CYCLES[c];
opcode.cycles_conditional = opcode.cycles;
}
Expand Down
8 changes: 4 additions & 4 deletions src/decoder_z80.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,20 +413,20 @@ impl DecoderZ80 {

// Load cycle information
for c in 0..=255 {
if let Some(opcode) = &mut self.no_prefix[c as usize] {
if let Some(opcode) = &mut self.no_prefix[c] {
opcode.cycles = NO_PREFIX_CYCLES[c];
opcode.cycles_conditional = opcode.cycles;
}
if let Some(opcode) = &mut self.prefix_cb[c as usize] {
if let Some(opcode) = &mut self.prefix_cb[c] {
opcode.cycles = PREFIX_CB_CYCLES[c];
opcode.cycles_conditional = opcode.cycles;
}
if let Some(opcode) = &mut self.prefix_cb_indexed[c as usize] {
if let Some(opcode) = &mut self.prefix_cb_indexed[c] {
// 23 cycles except for BIT that is 20
opcode.cycles = if (c & 0xc0) == 0x40 {20} else {23};
opcode.cycles_conditional = opcode.cycles;
}
if let Some(opcode) = &mut self.prefix_ed[c as usize] {
if let Some(opcode) = &mut self.prefix_ed[c] {
opcode.cycles = PREFIX_ED_CYCLES[c];
opcode.cycles_conditional = opcode.cycles;
}
Expand Down

0 comments on commit 25b656f

Please sign in to comment.