Browse Source

Unique::new() -> Unique::new_unchecked()

master
3moon 8 years ago
parent
commit
9045c8ca3b
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/arch/x86_64/device/vga_console.rs
  2. +1
    -1
      src/arch/x86_64/memory/paging/mapper.rs

+ 1
- 1
src/arch/x86_64/device/vga_console.rs View File

@ -9,7 +9,7 @@ use x86::shared::io;
pub static WRITER: Mutex<Writer> = Mutex::new(Writer {
column_pos: 0, row_pos: 0,
style: CharStyle::new(Color::Cyan, Color::DarkGray),
buffer: unsafe {Unique::new(0xb8000 as *mut _)},
buffer: unsafe {Unique::new_unchecked(0xb8000 as *mut _)},
});
#[allow(dead_code)]


+ 1
- 1
src/arch/x86_64/memory/paging/mapper.rs View File

@ -14,7 +14,7 @@ impl Mapper {
/// Since we cannot guarantee this trivially, the constructor is unsafe.
pub unsafe fn new() -> Mapper {
Mapper {
p4: Unique::new(table::P4),
p4: Unique::new_unchecked(table::P4),
}
}


Loading…
Cancel
Save