Skip to content

Commit 533e6bc

Browse files
committed
specialize *_range methods for RecursivePageTable
1 parent 76773a5 commit 533e6bc

File tree

2 files changed

+740
-1
lines changed

2 files changed

+740
-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},
@@ -752,6 +754,12 @@ pub enum UnmapError {
752754
InvalidFrameAddress(PhysAddr),
753755
}
754756

757+
impl From<Infallible> for UnmapError {
758+
fn from(i: Infallible) -> Self {
759+
match i {}
760+
}
761+
}
762+
755763
/// An error indicating that an `update_flags` call failed.
756764
#[derive(Debug)]
757765
pub enum FlagUpdateError {
@@ -762,6 +770,12 @@ pub enum FlagUpdateError {
762770
ParentEntryHugePage,
763771
}
764772

773+
impl From<Infallible> for FlagUpdateError {
774+
fn from(i: Infallible) -> Self {
775+
match i {}
776+
}
777+
}
778+
765779
/// An error indicating that an `translate` call failed.
766780
#[derive(Debug)]
767781
pub enum TranslateError {

0 commit comments

Comments
 (0)