Skip to content

Commit

Permalink
style: small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tensorush committed Jul 20, 2024
1 parent d3b46aa commit ca329d5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const clap = @import("clap");
const sandblast = @import("sandblast.zig");

const PARAMS = clap.parseParamsComptime(
\\-h, --help Display help menu.
\\-h, --help Display help.
\\<str> Input directory path.
\\
);
Expand All @@ -18,11 +18,7 @@ pub fn main() !void {
defer arena.deinit();
const allocator = arena.allocator();

var diag = clap.Diagnostic{};
var res = clap.parse(clap.Help, &PARAMS, clap.parsers.default, .{ .allocator = allocator, .diagnostic = &diag }) catch |err| {
diag.report(std.io.getStdErr().writer(), err) catch {};
return err;
};
var res = try clap.parse(clap.Help, &PARAMS, clap.parsers.default, .{ .allocator = allocator });
defer res.deinit();

const input_dir_path = res.positionals[0];
Expand Down

0 comments on commit ca329d5

Please sign in to comment.