From e17fd2d0ded8858773a0ba3b7f78754287c9d77c Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 3 Aug 2016 16:41:49 +0200 Subject: [PATCH] Run rustfmt --- src/interrupts/mod.rs | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/interrupts/mod.rs b/src/interrupts/mod.rs index 9bd8aa6e..2635f10e 100644 --- a/src/interrupts/mod.rs +++ b/src/interrupts/mod.rs @@ -65,22 +65,18 @@ struct ExceptionStackFrame { use vga_buffer::print_error; -extern "C" fn divide_by_zero_handler(stack_frame: *const ExceptionStackFrame) - -> ! -{ +extern "C" fn divide_by_zero_handler(stack_frame: *const ExceptionStackFrame) -> ! { unsafe { - print_error(format_args!("EXCEPTION: DIVIDE BY ZERO\n{:#?}", - *stack_frame)); + print_error(format_args!("EXCEPTION: DIVIDE BY ZERO\n{:#?}", *stack_frame)); } loop {} } -extern "C" fn invalid_opcode_handler(stack_frame: *const ExceptionStackFrame) - -> ! -{ +extern "C" fn invalid_opcode_handler(stack_frame: *const ExceptionStackFrame) -> ! { unsafe { print_error(format_args!("EXCEPTION: INVALID OPCODE at {:#x}\n{:#?}", - (*stack_frame).instruction_pointer, *stack_frame)); + (*stack_frame).instruction_pointer, + *stack_frame)); } loop {} } @@ -95,17 +91,14 @@ bitflags! { } } -extern "C" fn page_fault_handler(stack_frame: *const ExceptionStackFrame, - error_code: u64) -> ! -{ +extern "C" fn page_fault_handler(stack_frame: *const ExceptionStackFrame, error_code: u64) -> ! { use x86::controlregs; unsafe { - print_error(format_args!( - "EXCEPTION: PAGE FAULT while accessing {:#x}\ - \nerror code: {:?}\n{:#?}", - controlregs::cr2(), - PageFaultErrorCode::from_bits(error_code).unwrap(), - *stack_frame)); + print_error(format_args!("EXCEPTION: PAGE FAULT while accessing {:#x}\nerror code: \ + {:?}\n{:#?}", + controlregs::cr2(), + PageFaultErrorCode::from_bits(error_code).unwrap(), + *stack_frame)); } loop {} }