diff --git a/src/arch/x86_64/memory/paging/mod.rs b/src/arch/x86_64/memory/paging/mod.rs index 735671f..ef2b618 100644 --- a/src/arch/x86_64/memory/paging/mod.rs +++ b/src/arch/x86_64/memory/paging/mod.rs @@ -3,7 +3,7 @@ //! Extremely ripped off from Phil Oppermann's tutorials, because I don't feel like writing //! a paging system off the top of my head today. -use core::ops::{Deref, DerefMut}; +use core::ops::{Add, Deref, DerefMut}; use multiboot2::BootInformation; use super::PAGE_SIZE; use super::{Frame, FrameAllocator}; @@ -158,6 +158,14 @@ impl Page { } } +impl Add for Page { + type Output = Page; + + fn add(self, rhs: usize) -> Page { + Page { index: self.index + rhs } + } +} + pub struct PageIter { start: Page, end: Page,