remove conditional errdefer
All checks were successful
Generic zig build / build (push) Successful in 19s
All checks were successful
Generic zig build / build (push) Successful in 19s
This commit is contained in:
parent
91269f604d
commit
5e47d9e71d
1 changed files with 2 additions and 2 deletions
|
|
@ -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.* = .{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue