Skip to content

Commit 7ff6b36

Browse files
committed
feat: add forwarding impl PageTableFrameMapping for &P
1 parent 7f4d2bb commit 7ff6b36

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/structures/paging/mapper/mapped_page_table.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,3 +881,10 @@ pub unsafe trait PageTableFrameMapping {
881881
/// Translate the given physical frame to a virtual page table pointer.
882882
fn frame_to_pointer(&self, frame: PhysFrame) -> *mut PageTable;
883883
}
884+
885+
unsafe impl<P: PageTableFrameMapping + ?Sized> PageTableFrameMapping for &P {
886+
#[inline]
887+
fn frame_to_pointer(&self, frame: PhysFrame) -> *mut PageTable {
888+
(**self).frame_to_pointer(frame)
889+
}
890+
}

0 commit comments

Comments
 (0)