diff options
Diffstat (limited to 'lib/std/heap/debug_allocator.zig')
| -rw-r--r-- | lib/std/heap/debug_allocator.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/heap/debug_allocator.zig b/lib/std/heap/debug_allocator.zig index 296014aa3f..44e7a4c943 100644 --- a/lib/std/heap/debug_allocator.zig +++ b/lib/std/heap/debug_allocator.zig @@ -1070,7 +1070,7 @@ test "small allocations - free in reverse order" { try list.append(ptr); } - while (list.popOrNull()) |ptr| { + while (list.pop()) |ptr| { allocator.destroy(ptr); } } @@ -1227,7 +1227,7 @@ test "shrink large object to large object with larger alignment" { try stuff_to_free.append(slice); slice = try allocator.alignedAlloc(u8, 16, alloc_size); } - while (stuff_to_free.popOrNull()) |item| { + while (stuff_to_free.pop()) |item| { allocator.free(item); } slice[0] = 0x12; @@ -1299,7 +1299,7 @@ test "realloc large object to larger alignment" { try stuff_to_free.append(slice); slice = try allocator.alignedAlloc(u8, 16, default_page_size * 2 + 50); } - while (stuff_to_free.popOrNull()) |item| { + while (stuff_to_free.pop()) |item| { allocator.free(item); } slice[0] = 0x12; |
