Skip to content

Commit 63bc967

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

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/utils.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ const std = @import("std");
22

33
pub fn NonOptional(comptime T: type) type {
44
const type_info = @typeInfo(T);
5-
if (type_info == .Optional) {
6-
return type_info.Optional.child;
5+
if (type_info == .optional) {
6+
return type_info.optional.child;
77
}
88
return T;
99
}
@@ -13,7 +13,7 @@ pub fn Optional(comptime T: type, comptime is_optional: bool) type {
1313
}
1414

1515
pub inline fn isOptional(comptime T: type) bool {
16-
return @typeInfo(T) == .Optional;
16+
return @typeInfo(T) == .optional;
1717
}
1818

1919
test isOptional {

0 commit comments

Comments
 (0)