Skip to content

Commit c569d11

Browse files
committed
specialize *_range methods for RecursivePageTable
1 parent 91da0b2 commit c569d11

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,
@@ -736,6 +738,12 @@ pub enum UnmapError {
736738
InvalidFrameAddress(PhysAddr),
737739
}
738740

741+
impl From<Infallible> for UnmapError {
742+
fn from(i: Infallible) -> Self {
743+
match i {}
744+
}
745+
}
746+
739747
/// An error indicating that an `update_flags` call failed.
740748
#[derive(Debug)]
741749
pub enum FlagUpdateError {
@@ -746,6 +754,12 @@ pub enum FlagUpdateError {
746754
ParentEntryHugePage,
747755
}
748756

757+
impl From<Infallible> for FlagUpdateError {
758+
fn from(i: Infallible) -> Self {
759+
match i {}
760+
}
761+
}
762+
749763
/// An error indicating that an `translate` call failed.
750764
#[derive(Debug)]
751765
pub enum TranslateError {

0 commit comments

Comments
 (0)