@@ -85,14 +85,14 @@ impl<S: PageSize> Page<S> {
8585
8686 /// Returns the start address of the page.
8787 #[ inline]
88- pub fn start_address ( self ) -> VirtAddr {
88+ pub fn start_address ( & self ) -> VirtAddr {
8989 self . start_address
9090 }
9191
9292 /// Returns the size the page (4KB, 2MB or 1GB).
9393 #[ cfg( feature = "const_fn" ) ]
9494 #[ inline]
95- pub const fn size ( self ) -> u64 {
95+ pub const fn size ( & self ) -> u64 {
9696 S :: SIZE
9797 }
9898
@@ -105,13 +105,13 @@ impl<S: PageSize> Page<S> {
105105
106106 /// Returns the level 4 page table index of this page.
107107 #[ inline]
108- pub fn p4_index ( self ) -> PageTableIndex {
108+ pub fn p4_index ( & self ) -> PageTableIndex {
109109 self . start_address ( ) . p4_index ( )
110110 }
111111
112112 /// Returns the level 3 page table index of this page.
113113 #[ inline]
114- pub fn p3_index ( self ) -> PageTableIndex {
114+ pub fn p3_index ( & self ) -> PageTableIndex {
115115 self . start_address ( ) . p3_index ( )
116116 }
117117
@@ -131,7 +131,7 @@ impl<S: PageSize> Page<S> {
131131impl < S : NotGiantPageSize > Page < S > {
132132 /// Returns the level 2 page table index of this page.
133133 #[ inline]
134- pub fn p2_index ( self ) -> PageTableIndex {
134+ pub fn p2_index ( & self ) -> PageTableIndex {
135135 self . start_address ( ) . p2_index ( )
136136 }
137137}
@@ -188,7 +188,7 @@ impl Page<Size4KiB> {
188188
189189 /// Returns the level 1 page table index of this page.
190190 #[ inline]
191- pub fn p1_index ( self ) -> PageTableIndex {
191+ pub fn p1_index ( & self ) -> PageTableIndex {
192192 self . start_address ( ) . p1_index ( )
193193 }
194194}
0 commit comments