Skip to content

Commit 8292bd6

Browse files
committed
fix: Update to work with Zig master
1 parent 193a210 commit 8292bd6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.name = "lsp-codegen",
33
.version = "0.1.0",
4-
.minimum_zig_version = "0.12.0",
4+
.minimum_zig_version = "0.14.0-dev.1346+31fef6f11",
55
.dependencies = .{},
66
.paths = .{
77
"build.zig",

src/parser.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub fn EnumCustomStringValues(comptime T: type, comptime contains_empty_enum: bo
134134

135135
const kvs = build_kvs: {
136136
const KV = struct { []const u8, T };
137-
const fields = @typeInfo(T).Union.fields;
137+
const fields = @typeInfo(T).@"union".fields;
138138
var kvs_array: [fields.len - 1]KV = undefined;
139139
for (fields[0 .. fields.len - 1], &kvs_array) |field, *kv| {
140140
if (contains_empty_enum and std.mem.eql(u8, field.name, "empty")) {
@@ -362,7 +362,7 @@ fn expectParseEqual(comptime T: type, comptime expected: anytype, s: []const u8)
362362
defer arena_allocator.deinit();
363363
const arena = arena_allocator.allocator();
364364

365-
if (@typeInfo(@TypeOf(expected)) != .ErrorSet) {
365+
if (@typeInfo(@TypeOf(expected)) != .error_set) {
366366
const actual_from_slice = try std.json.parseFromSliceLeaky(T, arena, s, .{});
367367
try std.testing.expectEqualDeep(@as(T, expected), actual_from_slice);
368368

0 commit comments

Comments
 (0)