chore: remove useless default implementations

This commit is contained in:
2021-11-25 03:36:02 -04:00
parent ef4f3d9ec6
commit a0e3c7c602
10 changed files with 64 additions and 166 deletions

View File

@@ -19,9 +19,9 @@ impl Cpu {
Self {
bus: Bus::with_boot(rom),
reg: Default::default(),
flags: Default::default(),
ime: Default::default(),
state: Default::default(),
flags: Flags(0),
ime: ImeState::Disabled,
state: State::Execute,
}
}
@@ -238,12 +238,6 @@ enum State {
// Stop,
}
impl Default for State {
fn default() -> Self {
Self::Execute
}
}
impl Cpu {
pub(crate) fn set_register(&mut self, register: Register, value: u8) {
use Register::*;
@@ -437,12 +431,6 @@ impl Clone for Flags {
}
}
impl Default for Flags {
fn default() -> Self {
Self(0)
}
}
impl Display for Flags {
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
if self.z() {
@@ -497,9 +485,3 @@ pub(crate) enum ImeState {
Pending,
Enabled,
}
impl Default for ImeState {
fn default() -> Self {
Self::Disabled
}
}