Skip to content

Commit 6418e8d

Browse files
committed
specialize *_range methods for RecursivePageTable
1 parent 76f1c2b commit 6418e8d

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, frame_alloc::FrameAllocator, page::PageRange,
1113
page_table::PageTableFlags, FrameDeallocator, Page, PageSize, PhysFrame, Size1GiB, Size2MiB,
@@ -742,6 +744,12 @@ pub enum UnmapError {
742744
InvalidFrameAddress(PhysAddr),
743745
}
744746

747+
impl From<Infallible> for UnmapError {
748+
fn from(i: Infallible) -> Self {
749+
match i {}
750+
}
751+
}
752+
745753
/// An error indicating that an `update_flags` call failed.
746754
#[derive(Debug)]
747755
pub enum FlagUpdateError {
@@ -752,6 +760,12 @@ pub enum FlagUpdateError {
752760
ParentEntryHugePage,
753761
}
754762

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

0 commit comments

Comments
 (0)