From 02d82615df28180e56b05063da734d37721f96c7 Mon Sep 17 00:00:00 2001 From: "Raphael O." Date: Tue, 20 Aug 2024 21:44:55 +0200 Subject: [PATCH] Fix clippy lints --- crates/libxernel/src/sync/once.rs | 6 ++++++ xernel/kernel/src/arch/amd64/gdt.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/libxernel/src/sync/once.rs b/crates/libxernel/src/sync/once.rs index aa43825a..c33221c8 100644 --- a/crates/libxernel/src/sync/once.rs +++ b/crates/libxernel/src/sync/once.rs @@ -67,3 +67,9 @@ impl Deref for Once { } } } + +impl Default for Once { + fn default() -> Self { + Self::new() + } +} diff --git a/xernel/kernel/src/arch/amd64/gdt.rs b/xernel/kernel/src/arch/amd64/gdt.rs index 5fe46267..7eb660ca 100644 --- a/xernel/kernel/src/arch/amd64/gdt.rs +++ b/xernel/kernel/src/arch/amd64/gdt.rs @@ -40,7 +40,7 @@ pub struct Selectors { pub fn init() { let mut tss = TaskStateSegment::new(); tss.interrupt_stack_table[DOUBLE_FAULT_IST_INDEX as usize] = { - let stack_start = VirtAddr::from_ptr(unsafe { addr_of!(BSP_IST_STACK) }); + let stack_start = VirtAddr::from_ptr(addr_of!(BSP_IST_STACK)); stack_start + IST_STACK_SIZE as u64 };