Run cargo fmt

This commit is contained in:
Philipp Oppermann
2019-02-25 17:04:25 +01:00
parent a7f487f206
commit 7b61da94a0

View File

@@ -21,8 +21,13 @@ pub enum InterruptIndex {
} }
impl InterruptIndex { impl InterruptIndex {
fn as_u8(self) -> u8 { self as u8 } fn as_u8(self) -> u8 {
fn as_usize(self) -> usize { usize::from(self.as_u8()) } self as u8
}
fn as_usize(self) -> usize {
usize::from(self.as_u8())
}
} }
pub static PICS: spin::Mutex<ChainedPics> = pub static PICS: spin::Mutex<ChainedPics> =
@@ -61,7 +66,10 @@ extern "x86-interrupt" fn double_fault_handler(
extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: &mut ExceptionStackFrame) { extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: &mut ExceptionStackFrame) {
print!("."); 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) { 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());
}
} }