fix: build of writeArray with zig-0.14
This commit is contained in:
parent
32505ed465
commit
183248d7f2
1 changed files with 2 additions and 2 deletions
|
@ -126,8 +126,8 @@ pub fn writeMapHeader(writer: anytype, sz: usize) @TypeOf(writer).Error!void {
|
||||||
|
|
||||||
pub fn writeArray(writer: anytype, args: anytype) @TypeOf(writer).Error!void {
|
pub fn writeArray(writer: anytype, args: anytype) @TypeOf(writer).Error!void {
|
||||||
const args_type_info = @typeInfo(@TypeOf(args));
|
const args_type_info = @typeInfo(@TypeOf(args));
|
||||||
if (args_type_info != .Struct) @compileError("expected tuple or struct argument");
|
if (args_type_info != .@"struct") @compileError("expected tuple or struct argument");
|
||||||
const fields_info = args_type_info.Struct.fields;
|
const fields_info = args_type_info.@"struct".fields;
|
||||||
try writeArrayHeader(writer, fields_info.len);
|
try writeArrayHeader(writer, fields_info.len);
|
||||||
inline for (fields_info) |field_info|
|
inline for (fields_info) |field_info|
|
||||||
try writeValue(writer, @field(args, field_info.name));
|
try writeValue(writer, @field(args, field_info.name));
|
||||||
|
|
Loading…
Add table
Reference in a new issue