Skip to content

Commit ba4482b

Browse files
committed
fix: clippy::new_without_default
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
1 parent 62ffa3f commit ba4482b

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

src/structures/gdt.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ impl GlobalDescriptorTable {
117117
}
118118
}
119119

120+
impl Default for GlobalDescriptorTable {
121+
#[inline]
122+
fn default() -> Self {
123+
Self::new()
124+
}
125+
}
126+
120127
impl<const MAX: usize> GlobalDescriptorTable<MAX> {
121128
/// Creates an empty GDT which can hold `MAX` number of [`Entry`]s.
122129
#[inline]

src/structures/idt.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,13 @@ impl InterruptDescriptorTable {
565565
}
566566
}
567567

568+
impl Default for InterruptDescriptorTable {
569+
#[inline]
570+
fn default() -> Self {
571+
Self::new()
572+
}
573+
}
574+
568575
impl Index<u8> for InterruptDescriptorTable {
569576
type Output = Entry<HandlerFunc>;
570577

src/structures/paging/page_table.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ impl PageTableEntry {
9797
}
9898
}
9999

100+
impl Default for PageTableEntry {
101+
#[inline]
102+
fn default() -> Self {
103+
Self::new()
104+
}
105+
}
106+
100107
impl fmt::Debug for PageTableEntry {
101108
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
102109
let mut f = f.debug_struct("PageTableEntry");

src/structures/tss.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ impl TaskStateSegment {
4343
}
4444
}
4545

46+
impl Default for TaskStateSegment {
47+
#[inline]
48+
fn default() -> Self {
49+
Self::new()
50+
}
51+
}
52+
4653
#[cfg(test)]
4754
mod tests {
4855
use super::*;

0 commit comments

Comments
 (0)