remove conditional errdefer
All checks were successful
Generic zig build / build (push) Successful in 19s

This commit is contained in:
Emil Lerch 2026-04-10 17:01:25 -07:00
parent 91269f604d
commit 5e47d9e71d
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -1336,9 +1336,9 @@ pub fn iterator(reader: *std.Io.Reader, allocator: std.mem.Allocator, options: P
// create an arena allocator for everytyhing related to parsing // create an arena allocator for everytyhing related to parsing
const arena: *std.heap.ArenaAllocator = try allocator.create(std.heap.ArenaAllocator); const arena: *std.heap.ArenaAllocator = try allocator.create(std.heap.ArenaAllocator);
errdefer if (options.diagnostics == null) allocator.destroy(arena); errdefer allocator.destroy(arena);
arena.* = .init(allocator); arena.* = .init(allocator);
errdefer if (options.diagnostics == null) arena.deinit(); errdefer arena.deinit();
const aa = arena.allocator(); const aa = arena.allocator();
const state = try aa.create(RecordIterator.State); const state = try aa.create(RecordIterator.State);
state.* = .{ state.* = .{