Skip to content

Commit b4460b5

Browse files
authored
build: support zig 0.16 (#12)
1 parent bc55b9d commit b4460b5

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.name = .msgpack,
33
.version = "0.6.0",
4-
.minimum_zig_version = "0.15.1",
4+
.minimum_zig_version = "0.16.0",
55
.dependencies = .{},
66
.fingerprint = 0x6733a7563cbdeb64,
77
.paths = .{

src/struct.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn isStructFieldUsed(field: std.builtin.Type.StructField, value: anytype, opts:
7575
return true;
7676
}
7777

78-
fn countUsedStructFields(fields: []const std.builtin.Type.StructField, value: anytype, opts: StructAsMapOptions) u16 {
78+
fn countUsedStructFields(comptime fields: []const std.builtin.Type.StructField, value: anytype, opts: StructAsMapOptions) u16 {
7979
var used_field_count: u16 = 0;
8080
inline for (fields) |field| {
8181
if (isStructFieldUsed(field, value, opts)) {

src/union.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ pub fn unpackUnionAsTagged(reader: *std.Io.Reader, allocator: std.mem.Allocator,
244244
const field_name = try unpackStringInto(reader, &tag_value_buffer);
245245
union_field_name = field_name;
246246
},
247-
.field_name_prefix => |_| {
247+
.field_name_prefix => {
248248
const field_name = try unpackStringInto(reader, &tag_value_buffer);
249249
union_field_name = field_name;
250250
},

0 commit comments

Comments
 (0)