From 3ac5318c94e8aae861c65e911d9b31a26f51177c Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 11 Dec 2019 16:47:40 +0100 Subject: [PATCH] Remove now unneeded unsafe block The `map_to` method is safe since x86_64 0.8.1. --- src/allocator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/allocator.rs b/src/allocator.rs index 0d1f3b73..e47a40cc 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -27,7 +27,7 @@ pub fn init_heap( .allocate_frame() .ok_or(MapToError::FrameAllocationFailed)?; let flags = PageTableFlags::PRESENT | PageTableFlags::WRITABLE; - unsafe { mapper.map_to(page, frame, flags, frame_allocator)?.flush() }; + mapper.map_to(page, frame, flags, frame_allocator)?.flush(); } unsafe {