We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf217b3 commit f072c3cCopy full SHA for f072c3c
src/tlsf.rs
@@ -155,7 +155,8 @@ unsafe impl GlobalAlloc for Heap {
155
}
156
157
unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
158
- // SAFETY: `layout.align()` is a power of two, and the size precondition is upheld by the caller.
+ // SAFETY: `layout.align()` is a power of two, and the size precondition
159
+ // is upheld by the caller.
160
let new_layout =
161
unsafe { core::alloc::Layout::from_size_align_unchecked(new_size, layout.align()) };
162
self.realloc(ptr, new_layout)
0 commit comments