Issue 3223: Second phase of migration to Rust Edition
Reformat via `cargo fmt`
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user