Skip to content

Commit

Permalink
Remove debug_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
CDirkx committed Apr 2, 2021
1 parent c86e098 commit db1d003
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions library/std/src/sys/windows/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,7 @@ unsafe impl GlobalAlloc for System {

// SAFETY: `heap` is a non-null handle returned by `GetProcessHeap`,
// `block` is a pointer to the start of an allocated block.
unsafe {
let err = HeapFree(heap, 0, block as c::LPVOID);
debug_assert!(err != 0, "Failed to free heap memory: {}", c::GetLastError());
}
unsafe { HeapFree(heap, 0, block as c::LPVOID) };
}

#[inline]
Expand Down

0 comments on commit db1d003

Please sign in to comment.