diff --git a/src/structures/paging/mapper/mod.rs b/src/structures/paging/mapper/mod.rs index a73f2d8c4..64f2e16d5 100644 --- a/src/structures/paging/mapper/mod.rs +++ b/src/structures/paging/mapper/mod.rs @@ -382,7 +382,7 @@ pub struct MapperFlush(Page); impl MapperFlush { /// Create a new flush promise #[inline] - fn new(page: Page) -> Self { + pub fn new(page: Page) -> Self { MapperFlush(page) } @@ -403,14 +403,14 @@ impl MapperFlush { /// The old mapping might be still cached in the translation lookaside buffer (TLB), so it needs /// to be flushed from the TLB before it's accessed. This type is returned from a function that /// made the change to ensure that the TLB flush is not forgotten. -#[derive(Debug)] +#[derive(Debug, Default)] #[must_use = "Page Table changes must be flushed or ignored."] pub struct MapperFlushAll(()); impl MapperFlushAll { /// Create a new flush promise #[inline] - fn new() -> Self { + pub fn new() -> Self { MapperFlushAll(()) }