Skip to content

Commit

Permalink
rustfmt: want an ~egg~
Browse files Browse the repository at this point in the history
  • Loading branch information
barzamin committed Oct 22, 2018
1 parent 252ea2f commit bf07fb2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/arch/x86_64/interrupts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ use x86_64::structures::idt::{ExceptionStackFrame, InterruptDescriptorTable};
use x86_64::structures::tss::TaskStateSegment;
use x86_64::VirtAddr;

use arch::x86_64::device::pic::PICS;
use arch::x86_64::memory::paging::FrameAllocator;
use arch::x86_64::memory::MemoryController;
use arch::x86_64::device::pic::PICS;

pub use x86_64::instructions::interrupts::without_interrupts;

Expand Down Expand Up @@ -92,5 +92,7 @@ extern "x86-interrupt" fn double_fault_handler(
}

extern "x86-interrupt" fn timer_handler(_stack_frame: &mut ExceptionStackFrame) {
unsafe { PICS.write().eoi(INT_TIMER_PIT as u8); }
unsafe {
PICS.write().eoi(INT_TIMER_PIT as u8);
}
}
3 changes: 2 additions & 1 deletion src/arch/x86_64/memory/paging/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ impl ActivePageTable {
Cr3::write(
PhysFrame::from_start_address(PhysAddr::new(
new_table.p4_frame.start_address() as u64
)).unwrap(),
))
.unwrap(),
Cr3::read().1,
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ extern crate x86_64;
pub mod macros;
pub mod alloca;
pub mod arch;
pub mod panic;
mod logger;
mod consts;
mod logger;
pub mod panic;

use alloca::Allocator;

Expand Down
4 changes: 2 additions & 2 deletions src/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub extern "C" fn panic(info: &PanicInfo) -> ! {

#[cfg(feature = "panic-console")]
{
use ::arch::x86_64::device::vga_console;
use arch::x86_64::device::vga_console;
vga_console::WRITER
.lock()
.set_style(vga_console::CharStyle::new(
Expand All @@ -36,7 +36,7 @@ pub extern "C" fn panic(info: &PanicInfo) -> ! {

#[cfg(feature = "panic-serial")]
{
use ::arch::x86_64::device::serial;
use arch::x86_64::device::serial;
use core::fmt::Write;
let mut port = serial::COM1.write();

Expand Down

0 comments on commit bf07fb2

Please sign in to comment.