diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -55,7 +55,7 @@ The simplest way to use this library is to just call the `clap.parse` function. | |||
| 55 | 55 | ||
| 56 | ```zig | 56 | ```zig |
| 57 | pub fn main() !void { | 57 | pub fn main() !void { |
| 58 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | 58 | var gpa = std.heap.DebugAllocator(.{}){}; |
| 59 | defer _ = gpa.deinit(); | 59 | defer _ = gpa.deinit(); |
| 60 | 60 | ||
| 61 | // First we specify what parameters our program can take. | 61 | // First we specify what parameters our program can take. |
| @@ -109,7 +109,7 @@ if you want some other mapping. | |||
| 109 | 109 | ||
| 110 | ```zig | 110 | ```zig |
| 111 | pub fn main() !void { | 111 | pub fn main() !void { |
| 112 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | 112 | var gpa = std.heap.DebugAllocator(.{}){}; |
| 113 | defer _ = gpa.deinit(); | 113 | defer _ = gpa.deinit(); |
| 114 | 114 | ||
| 115 | // First we specify what parameters our program can take. | 115 | // First we specify what parameters our program can take. |
| @@ -190,7 +190,7 @@ const main_params = clap.parseParamsComptime( | |||
| 190 | const MainArgs = clap.ResultEx(clap.Help, &main_params, main_parsers); | 190 | const MainArgs = clap.ResultEx(clap.Help, &main_params, main_parsers); |
| 191 | 191 | ||
| 192 | pub fn main() !void { | 192 | pub fn main() !void { |
| 193 | var gpa_state = std.heap.GeneralPurposeAllocator(.{}){}; | 193 | var gpa_state = std.heap.DebugAllocator(.{}){}; |
| 194 | const gpa = gpa_state.allocator(); | 194 | const gpa = gpa_state.allocator(); |
| 195 | defer _ = gpa_state.deinit(); | 195 | defer _ = gpa_state.deinit(); |
| 196 | 196 | ||
| @@ -347,7 +347,7 @@ is passed to `help` to control how the help message is printed. | |||
| 347 | 347 | ||
| 348 | ```zig | 348 | ```zig |
| 349 | pub fn main() !void { | 349 | pub fn main() !void { |
| 350 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | 350 | var gpa = std.heap.DebugAllocator(.{}){}; |
| 351 | defer _ = gpa.deinit(); | 351 | defer _ = gpa.deinit(); |
| 352 | 352 | ||
| 353 | const params = comptime clap.parseParamsComptime( | 353 | const params = comptime clap.parseParamsComptime( |
| @@ -389,7 +389,7 @@ $ zig-out/bin/help --help | |||
| 389 | 389 | ||
| 390 | ```zig | 390 | ```zig |
| 391 | pub fn main() !void { | 391 | pub fn main() !void { |
| 392 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | 392 | var gpa = std.heap.DebugAllocator(.{}){}; |
| 393 | defer _ = gpa.deinit(); | 393 | defer _ = gpa.deinit(); |
| 394 | 394 | ||
| 395 | const params = comptime clap.parseParamsComptime( | 395 | const params = comptime clap.parseParamsComptime( |