summaryrefslogtreecommitdiff
path: root/clap.zig
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2023-12-13 08:53:06 +0100
committerGravatar Komari Spaghetti2023-12-13 08:59:38 +0100
commitcf3a4e763831dd7e0845fef4f209f5c780eda375 (patch)
tree071a86610548ebed5b8bec0617cf79cbeeee65fd /clap.zig
parentFix short only params not getting fields in `Arguments` (diff)
downloadzig-clap-cf3a4e763831dd7e0845fef4f209f5c780eda375.tar.gz
zig-clap-cf3a4e763831dd7e0845fef4f209f5c780eda375.tar.xz
zig-clap-cf3a4e763831dd7e0845fef4f209f5c780eda375.zip
Remove the default allocator from `ParseOptions`
fixes #111
Diffstat (limited to 'clap.zig')
-rw-r--r--clap.zig7
1 files changed, 1 insertions, 6 deletions
diff --git a/clap.zig b/clap.zig
index 302c8bb..e8a43d0 100644
--- a/clap.zig
+++ b/clap.zig
@@ -641,12 +641,7 @@ test "Diagnostic.report" {
641 641
642/// Options that can be set to customize the behavior of parsing. 642/// Options that can be set to customize the behavior of parsing.
643pub const ParseOptions = struct { 643pub const ParseOptions = struct {
644 /// The allocator used for all memory allocations. Defaults to the `heap.page_allocator`. 644 allocator: mem.Allocator,
645 /// Note: You should probably override this allocator if you are calling `parseEx`. Unlike
646 /// `parse`, `parseEx` does not wrap the allocator so the heap allocator can be
647 /// quite expensive. (TODO: Can we pick a better default? For `parse`, this allocator
648 /// is fine, as it wraps it in an arena)
649 allocator: mem.Allocator = heap.page_allocator,
650 diagnostic: ?*Diagnostic = null, 645 diagnostic: ?*Diagnostic = null,
651}; 646};
652 647