summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index d36715c..6cc8ca9 100644
--- a/README.md
+++ b/README.md
@@ -208,11 +208,11 @@ pub fn main() !void {
208 .diagnostic = &diag, 208 .diagnostic = &diag,
209 .allocator = gpa, 209 .allocator = gpa,
210 210
211 // Terminate the parsing of arguments after parsing the first positional (0 is passed here 211 // Terminate the parsing of arguments after parsing the first positional (0 is passed
212 // because parsed positionals are, like slices and arrays, indexed starting at 0). 212 // here because parsed positionals are, like slices and arrays, indexed starting at 0).
213 // 213 //
214 // This will terminate the parsing after parsing the subcommand enum and leave `iter` not 214 // This will terminate the parsing after parsing the subcommand enum and leave `iter`
215 // fully consumed. It can then be reused to parse the arguments for subcommands 215 // not fully consumed. It can then be reused to parse the arguments for subcommands
216 .terminating_positional = 0, 216 .terminating_positional = 0,
217 }) catch |err| { 217 }) catch |err| {
218 diag.report(std.io.getStdErr().writer(), err) catch {}; 218 diag.report(std.io.getStdErr().writer(), err) catch {};
@@ -231,8 +231,8 @@ pub fn main() !void {
231} 231}
232 232
233fn mathMain(gpa: std.mem.Allocator, iter: *std.process.ArgIterator, main_args: MainArgs) !void { 233fn mathMain(gpa: std.mem.Allocator, iter: *std.process.ArgIterator, main_args: MainArgs) !void {
234 // The parent arguments are not used it, but there are cases where it might be useful, so the 234 // The parent arguments are not used it, but there are cases where it might be useful, so
235 // example shows how to pass the arguments around. 235 // the example shows how to pass the arguments around.
236 _ = main_args; 236 _ = main_args;
237 237
238 // The parameters for the subcommand 238 // The parameters for the subcommand