We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
debug_assert
1 parent c86e098 commit db1d003Copy full SHA for db1d003
library/std/src/sys/windows/alloc.rs
@@ -223,10 +223,7 @@ unsafe impl GlobalAlloc for System {
223
224
// SAFETY: `heap` is a non-null handle returned by `GetProcessHeap`,
225
// `block` is a pointer to the start of an allocated block.
226
- unsafe {
227
- let err = HeapFree(heap, 0, block as c::LPVOID);
228
- debug_assert!(err != 0, "Failed to free heap memory: {}", c::GetLastError());
229
- }
+ unsafe { HeapFree(heap, 0, block as c::LPVOID) };
230
}
231
232
#[inline]
0 commit comments