Skip to content

Commit

Permalink
x86_64: fix clippy lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- committed Jan 30, 2025
1 parent c0ab943 commit ef889bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions oro-arch-x86_64/src/interrupt/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub(super) struct Aligned16<T: Sized>(pub T);

/// ISR Table; wrapper around various structures to make it
/// safely initializable and aligned.
#[expect(clippy::type_complexity)]
pub(super) struct IsrTable<Init: FnOnce() -> Aligned16<[IdtEntry; 256]>>(
Mutex<(
UnsafeCell<MaybeUninit<Aligned16<[IdtEntry; 256]>>>,
Expand All @@ -20,6 +21,9 @@ pub(super) struct IsrTable<Init: FnOnce() -> Aligned16<[IdtEntry; 256]>>(
);

impl<Init: FnOnce() -> Aligned16<[IdtEntry; 256]>> IsrTable<Init> {
/// Creates a new `IsrTable` with the given initializer when the ISR table is fetched.
///
/// **Do not use this function. It's meant only to be called by the `isr_table!` macro.**
pub const fn new(initializer: Init) -> Self {
Self(Mutex::new((
UnsafeCell::new(MaybeUninit::uninit()),
Expand Down
2 changes: 1 addition & 1 deletion oro-arch-x86_64/src/interrupt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub unsafe fn install_idt() {

#[allow(static_mut_refs)]
let idtr = Idtr {
limit: (core::mem::size_of_val(&*IDT.get()) - 1) as u16,
limit: (core::mem::size_of_val(IDT.get()) - 1) as u16,
base: &raw const IDT.get()[0],
};

Expand Down

0 comments on commit ef889bd

Please sign in to comment.