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

@@ -1,11 +1,20 @@
use bitfield::bitfield;
#[derive(Debug, Default)]
#[derive(Debug)]
pub(crate) struct Interrupt {
pub(crate) flag: InterruptFlag,
pub(crate) enable: InterruptEnable,
}
impl Default for Interrupt {
fn default() -> Self {
Self {
flag: InterruptFlag(0),
enable: InterruptEnable(0),
}
}
}
bitfield! {
pub struct InterruptEnable(u8);
impl Debug;
@@ -23,12 +32,6 @@ impl Clone for InterruptEnable {
}
}
impl Default for InterruptEnable {
fn default() -> Self {
Self(0)
}
}
impl From<u8> for InterruptEnable {
fn from(byte: u8) -> Self {
Self(byte)
@@ -58,12 +61,6 @@ impl Clone for InterruptFlag {
}
}
impl Default for InterruptFlag {
fn default() -> Self {
Self(0)
}
}
impl From<u8> for InterruptFlag {
fn from(byte: u8) -> Self {
Self(byte)