diff options
| author | Meghan Denny <hello@nektro.net> | 2025-02-09 20:21:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-10 04:21:31 +0000 |
| commit | 91424823724de866776c8b6a999ea45f1ca9d374 (patch) | |
| tree | 43c794431c7e5d83dc434117cca5884d8e01c672 /lib/std/heap/debug_allocator.zig | |
| parent | 75df7e502c05e7e6a9b00a5a28854ae4a1aa8ea6 (diff) | |
| download | zig-91424823724de866776c8b6a999ea45f1ca9d374.tar.gz zig-91424823724de866776c8b6a999ea45f1ca9d374.zip | |
std.ArrayList: popOrNull() -> pop() [v2] (#22720)
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; |
