Skip to content

Commit 1a6d2a7

Browse files
committed
Fix parseTypedFree() to handle all types by default
1 parent 5cde91e commit 1a6d2a7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/nestedtext.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,6 @@ pub const Parser = struct {
787787

788788
fn parseTypedFreeInternal(p: Self, comptime T: type, value: T) void {
789789
switch (@typeInfo(T)) {
790-
.Bool, .Float, .ComptimeFloat, .Int, .ComptimeInt, .Enum => {},
791790
.Optional => {
792791
if (value) |v| {
793792
return p.parseTypedFreeInternal(@TypeOf(v), v);
@@ -830,7 +829,7 @@ pub const Parser = struct {
830829
else => unreachable,
831830
}
832831
},
833-
else => unreachable,
832+
else => {},
834833
}
835834
}
836835

0 commit comments

Comments
 (0)