Skip to content

Commit db1d003

Browse files
committed
Remove debug_assert
1 parent c86e098 commit db1d003

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

library/std/src/sys/windows/alloc.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,7 @@ unsafe impl GlobalAlloc for System {
223223

224224
// SAFETY: `heap` is a non-null handle returned by `GetProcessHeap`,
225225
// `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-
}
226+
unsafe { HeapFree(heap, 0, block as c::LPVOID) };
230227
}
231228

232229
#[inline]

0 commit comments

Comments
 (0)