diff --git a/src/cpu.rs b/src/cpu.rs index 6694cbd..a52186b 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -57,10 +57,7 @@ impl Cpu { } pub(crate) fn is_halted(&self) -> bool { - match self.state { - State::Halt(_) => true, - _ => false, - } + matches!(self.state, State::Halt(_)) } pub(crate) fn halt_kind(&self) -> Option { diff --git a/src/ppu.rs b/src/ppu.rs index 51fe9b5..1f166e6 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -261,7 +261,7 @@ impl Ppu { TileLow => { let obj_size = self.ctrl.obj_size(); - let addr = PixelFetcher::get_obj_addr(&attr, &self.pos, obj_size); + let addr = PixelFetcher::get_obj_addr(attr, &self.pos, obj_size); let byte = self.read_byte(addr); self.fetch.obj.tile.with_low_byte(byte); @@ -272,7 +272,7 @@ impl Ppu { TileHigh => { let obj_size = self.ctrl.obj_size(); - let addr = PixelFetcher::get_obj_addr(&attr, &self.pos, obj_size); + let addr = PixelFetcher::get_obj_addr(attr, &self.pos, obj_size); let byte = self.read_byte(addr + 1); self.fetch.obj.tile.with_high_byte(byte);