We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e62af2 commit bf217b3Copy full SHA for bf217b3
src/tlsf.rs
@@ -155,8 +155,7 @@ 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,
159
- // and the size precondition is upheld by the caller.
+ // SAFETY: `layout.align()` is a power of two, and the size precondition 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