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);
14
14
15
15
impl StackHandle {
16
16
/// 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 {
18
18
// SAFETY: The stack was this big when we constructed the handle
19
19
unsafe { self . 0 . add ( self . 1 ) }
20
20
}
21
21
22
22
/// 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 {
24
24
self . 0
25
25
}
26
26
}
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ mod tests {
96
96
let mut handle = super :: STACK . take_handle ( ) ;
97
97
let top = handle. top ( ) ;
98
98
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 ) ;
101
101
}
102
102
}
You can’t perform that action at this time.
0 commit comments