summaryrefslogtreecommitdiff
path: root/clap.zig
diff options
context:
space:
mode:
Diffstat (limited to 'clap.zig')
-rw-r--r--clap.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/clap.zig b/clap.zig
index 69be5bd..8b2357b 100644
--- a/clap.zig
+++ b/clap.zig
@@ -337,7 +337,7 @@ pub const ParseOptions = struct {
337 /// `parse`, `parseEx` does not wrap the allocator so the heap allocator can be 337 /// `parse`, `parseEx` does not wrap the allocator so the heap allocator can be
338 /// quite expensive. (TODO: Can we pick a better default? For `parse`, this allocator 338 /// quite expensive. (TODO: Can we pick a better default? For `parse`, this allocator
339 /// is fine, as it wraps it in an arena) 339 /// is fine, as it wraps it in an arena)
340 allocator: *mem.Allocator = heap.page_allocator, 340 allocator: mem.Allocator = heap.page_allocator,
341 diagnostic: ?*Diagnostic = null, 341 diagnostic: ?*Diagnostic = null,
342}; 342};
343 343
@@ -350,7 +350,7 @@ pub fn parse(
350 var iter = try args.OsIterator.init(opt.allocator); 350 var iter = try args.OsIterator.init(opt.allocator);
351 const clap = try parseEx(Id, params, &iter, .{ 351 const clap = try parseEx(Id, params, &iter, .{
352 // Let's reuse the arena from the `OSIterator` since we already have it. 352 // Let's reuse the arena from the `OSIterator` since we already have it.
353 .allocator = &iter.arena.allocator, 353 .allocator = iter.arena.allocator(),
354 .diagnostic = opt.diagnostic, 354 .diagnostic = opt.diagnostic,
355 }); 355 });
356 356