diff --git a/src/interrupts.rs b/src/interrupts.rs index 07c2be0c..7fc614e6 100644 --- a/src/interrupts.rs +++ b/src/interrupts.rs @@ -21,8 +21,13 @@ pub enum InterruptIndex { } impl InterruptIndex { - fn as_u8(self) -> u8 { self as u8 } - fn as_usize(self) -> usize { usize::from(self.as_u8()) } + fn as_u8(self) -> u8 { + self as u8 + } + + fn as_usize(self) -> usize { + usize::from(self.as_u8()) + } } pub static PICS: spin::Mutex = @@ -75,7 +80,10 @@ extern "x86-interrupt" fn double_fault_handler( extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: &mut ExceptionStackFrame) { print!("."); - unsafe { PICS.lock().notify_end_of_interrupt(InterruptIndex::Timer.as_u8()) } + unsafe { + PICS.lock() + .notify_end_of_interrupt(InterruptIndex::Timer.as_u8()); + } } extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: &mut ExceptionStackFrame) { @@ -101,5 +109,8 @@ extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: &mut Exceptio } } - unsafe { PICS.lock().notify_end_of_interrupt(InterruptIndex::Keyboard.as_u8()) } + unsafe { + PICS.lock() + .notify_end_of_interrupt(InterruptIndex::Keyboard.as_u8()); + } }