Issue 3223: Second phase of migration to Rust Edition

Reformat via `cargo fmt`
This commit is contained in:
Alexander McLin
2026-04-02 16:08:06 -04:00
parent efbddeaeee
commit fcd6c3f127
40 changed files with 468 additions and 496 deletions

View File

@@ -175,15 +175,17 @@ impl Stack {
}
#[inline(always)]
unsafe fn alloc(&mut self, frame_size: usize) -> Result<NonNull<u8>, AllocError> { unsafe {
loop {
let ptr = self.buf.alloc(frame_size);
if let Some(ptr) = NonNull::new(ptr) {
return Ok(ptr);
unsafe fn alloc(&mut self, frame_size: usize) -> Result<NonNull<u8>, AllocError> {
unsafe {
loop {
let ptr = self.buf.alloc(frame_size);
if let Some(ptr) = NonNull::new(ptr) {
return Ok(ptr);
}
self.buf.grow()?;
}
self.buf.grow()?;
}
}}
}
pub(crate) fn allocate_and_frame(&mut self, num_cells: usize) -> Result<usize, AllocError> {
let frame_size = AndFrame::size_of(num_cells);