chore: remove useless default implementations
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user