flags: further cleanup after Zig 0.10

Long live the self hosted compiler!
This commit is contained in:
Isaac Freund
2023-01-08 17:01:14 +01:00
parent 09f3f141ae
commit 2c0c606596
4 changed files with 6 additions and 13 deletions

View File

@ -63,12 +63,10 @@ pub fn main() !void {
}
fn _main() !void {
// This line is here because of https://github.com/ziglang/zig/issues/7807
const argv: [][*:0]const u8 = os.argv;
const result = flags.parser([*:0]const u8, &.{
.{ .name = "h", .kind = .boolean },
.{ .name = "version", .kind = .boolean },
}).parse(argv[1..]) catch {
}).parse(os.argv[1..]) catch {
try io.getStdErr().writeAll(usage);
os.exit(1);
};