Skip to content

Commit 8be0761

Browse files
committed
specialize *_range methods for RecursivePageTable
1 parent 43ad4c0 commit 8be0761

File tree

2 files changed

+734
-1
lines changed

2 files changed

+734
-1
lines changed

src/structures/paging/mapper/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ pub use self::offset_page_table::OffsetPageTable;
66
#[cfg(feature = "instructions")]
77
pub use self::recursive_page_table::{InvalidPageTable, RecursivePageTable};
88

9+
use core::convert::Infallible;
10+
911
use crate::structures::paging::{
1012
frame::PhysFrameRange,
1113
frame_alloc::{FrameAllocator, FrameDeallocator},
@@ -744,6 +746,12 @@ pub enum UnmapError {
744746
InvalidFrameAddress(PhysAddr),
745747
}
746748

749+
impl From<Infallible> for UnmapError {
750+
fn from(i: Infallible) -> Self {
751+
match i {}
752+
}
753+
}
754+
747755
/// An error indicating that an `update_flags` call failed.
748756
#[derive(Debug)]
749757
pub enum FlagUpdateError {
@@ -754,6 +762,12 @@ pub enum FlagUpdateError {
754762
ParentEntryHugePage,
755763
}
756764

765+
impl From<Infallible> for FlagUpdateError {
766+
fn from(i: Infallible) -> Self {
767+
match i {}
768+
}
769+
}
770+
757771
/// An error indicating that an `translate` call failed.
758772
#[derive(Debug)]
759773
pub enum TranslateError {

0 commit comments

Comments
 (0)