chore: satisfy clippy

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-09-20 04:15:05 -03:00
parent ce121864d2
commit 71ce3f43e0
2 changed files with 3 additions and 6 deletions

View File

@ -57,10 +57,7 @@ impl Cpu {
} }
pub(crate) fn is_halted(&self) -> bool { pub(crate) fn is_halted(&self) -> bool {
match self.state { matches!(self.state, State::Halt(_))
State::Halt(_) => true,
_ => false,
}
} }
pub(crate) fn halt_kind(&self) -> Option<HaltKind> { pub(crate) fn halt_kind(&self) -> Option<HaltKind> {

View File

@ -261,7 +261,7 @@ impl Ppu {
TileLow => { TileLow => {
let obj_size = self.ctrl.obj_size(); 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); let byte = self.read_byte(addr);
self.fetch.obj.tile.with_low_byte(byte); self.fetch.obj.tile.with_low_byte(byte);
@ -272,7 +272,7 @@ impl Ppu {
TileHigh => { TileHigh => {
let obj_size = self.ctrl.obj_size(); 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); let byte = self.read_byte(addr + 1);
self.fetch.obj.tile.with_high_byte(byte); self.fetch.obj.tile.with_high_byte(byte);