From 7b61da94a01804cc92322601cbf8f903150ee3c8 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 25 Feb 2019 17:04:25 +0100 Subject: [PATCH] Run `cargo fmt` --- src/interrupts.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/interrupts.rs b/src/interrupts.rs index bb866a77..16657115 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 = @@ -61,7 +66,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) { @@ -87,5 +95,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()); + } }