summaryrefslogtreecommitdiff
path: root/clap.zig
diff options
context:
space:
mode:
authorGravatar Jakub Konka2022-12-20 12:36:10 +0100
committerGravatar Komari Spaghetti2022-12-20 14:11:37 +0100
commit88edafd00ec25dcc01deb8fc69e9864a16f8717c (patch)
tree499fd994d013bae125976ffcbf5b5b009b10e671 /clap.zig
parentFix cicd (diff)
downloadzig-clap-88edafd00ec25dcc01deb8fc69e9864a16f8717c.tar.gz
zig-clap-88edafd00ec25dcc01deb8fc69e9864a16f8717c.tar.xz
zig-clap-88edafd00ec25dcc01deb8fc69e9864a16f8717c.zip
Update to latest Zig master
Rename `builtin.Struct.field_type` to `builtin.Struct.type`.
Diffstat (limited to '')
-rw-r--r--clap.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/clap.zig b/clap.zig
index 23e267b..f16a97c 100644
--- a/clap.zig
+++ b/clap.zig
@@ -528,7 +528,7 @@ test "parseParams" {
528 }, 528 },
529 .{ 529 .{
530 .id = .{ 530 .id = .{
531 .desc = 531 .desc =
532 \\ This is 532 \\ This is
533 \\ help spanning multiple 533 \\ help spanning multiple
534 \\ lines 534 \\ lines
@@ -769,8 +769,8 @@ pub fn parseEx(
769 // fields to slices and return that. 769 // fields to slices and return that.
770 var result_args = Arguments(Id, params, value_parsers, .slice){}; 770 var result_args = Arguments(Id, params, value_parsers, .slice){};
771 inline for (meta.fields(@TypeOf(arguments))) |field| { 771 inline for (meta.fields(@TypeOf(arguments))) |field| {
772 if (@typeInfo(field.field_type) == .Struct and 772 if (@typeInfo(field.type) == .Struct and
773 @hasDecl(field.field_type, "toOwnedSlice")) 773 @hasDecl(field.type, "toOwnedSlice"))
774 { 774 {
775 const slice = try @field(arguments, field.name).toOwnedSlice(allocator); 775 const slice = try @field(arguments, field.name).toOwnedSlice(allocator);
776 @field(result_args, field.name) = slice; 776 @field(result_args, field.name) = slice;
@@ -922,7 +922,7 @@ fn Arguments(
922 922
923 fields[i] = .{ 923 fields[i] = .{
924 .name = longest.name, 924 .name = longest.name,
925 .field_type = @TypeOf(default_value), 925 .type = @TypeOf(default_value),
926 .default_value = @ptrCast(*const anyopaque, &default_value), 926 .default_value = @ptrCast(*const anyopaque, &default_value),
927 .is_comptime = false, 927 .is_comptime = false,
928 .alignment = @alignOf(@TypeOf(default_value)), 928 .alignment = @alignOf(@TypeOf(default_value)),