File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ pub struct StackHandle(*mut u32, usize);
1414
1515impl StackHandle {
1616 /// Get the pointer to the top of the stack
17- pub const fn top ( & mut self ) -> * mut u32 {
17+ pub fn top ( & mut self ) -> * mut u32 {
1818 // SAFETY: The stack was this big when we constructed the handle
1919 unsafe { self . 0 . add ( self . 1 ) }
2020 }
2121
2222 /// Get the pointer to the top of the stack
23- pub const fn bottom ( & mut self ) -> * mut u32 {
23+ pub fn bottom ( & mut self ) -> * mut u32 {
2424 self . 0
2525 }
2626}
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ mod tests {
9696 let mut handle = super :: STACK . take_handle ( ) ;
9797 let top = handle. top ( ) ;
9898 let bottom = handle. bottom ( ) ;
99- let delta = unsafe { top. byte_offset_from ( bottom) } ;
100- assert_eq ! ( delta as usize , super :: STACK_SIZE_WORDS * 4 ) ;
99+ let delta = unsafe { top. offset_from ( bottom) } ;
100+ assert_eq ! ( delta as usize , super :: STACK_SIZE_WORDS ) ;
101101 }
102102}
You can’t perform that action at this time.
0 commit comments