Skip to content

Commit 7b2ee0e

Browse files
author
jules
committed
fix: update references to std.builtin.Type via @typeinfo to v0.14 format
fix: update references to std.builtin.Type via @typeinfo to v0.14 format
1 parent 63bc967 commit 7b2ee0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/struct.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn isStructFieldUsed(field: std.builtin.Type.StructField, value: anytype, opts:
6666
}
6767

6868
if (opts.omit_nulls) {
69-
if (field_type_info == .Optional) {
69+
if (field_type_info == .optional) {
7070
if (field_value == null) {
7171
return false;
7272
}
@@ -250,7 +250,7 @@ pub fn unpackStructAsMap(reader: anytype, allocator: std.mem.Allocator, comptime
250250
}
251251

252252
pub fn unpackStructAsArray(reader: anytype, allocator: std.mem.Allocator, comptime T: type, comptime opts: StructAsArrayOptions) !T {
253-
const len = if (@typeInfo(T) == .Optional)
253+
const len = if (@typeInfo(T) == .optional)
254254
try unpackArrayHeader(reader, ?u16) orelse return null
255255
else
256256
try unpackArrayHeader(reader, u16);

0 commit comments

Comments
 (0)