From 9045c8ca3bc8603630877f4dfffa75a29d4b1dd4 Mon Sep 17 00:00:00 2001 From: Erin Date: Sat, 16 Sep 2017 09:18:57 -0500 Subject: [PATCH] Unique::new() -> Unique::new_unchecked() --- src/arch/x86_64/device/vga_console.rs | 2 +- src/arch/x86_64/memory/paging/mapper.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/x86_64/device/vga_console.rs b/src/arch/x86_64/device/vga_console.rs index 4b8ae13..f6a572b 100644 --- a/src/arch/x86_64/device/vga_console.rs +++ b/src/arch/x86_64/device/vga_console.rs @@ -9,7 +9,7 @@ use x86::shared::io; pub static WRITER: Mutex = 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)] diff --git a/src/arch/x86_64/memory/paging/mapper.rs b/src/arch/x86_64/memory/paging/mapper.rs index 3389b9a..597935e 100644 --- a/src/arch/x86_64/memory/paging/mapper.rs +++ b/src/arch/x86_64/memory/paging/mapper.rs @@ -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), } }