Merge branch 'master' into zig-0.14

This commit is contained in:
CJ van den Berg 2025-02-20 21:22:59 +01:00
commit c41cd07085
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
7 changed files with 54 additions and 36 deletions

View file

@ -623,6 +623,13 @@ fn config_eql(comptime T: type, a: T, b: T) bool {
}
switch (@typeInfo(T)) {
.bool, .int, .float, .@"enum" => return a == b,
.optional => |info| {
if (a == null and b == null)
return true;
if (a == null or b == null)
return false;
return config_eql(info.child, a.?, b.?);
},
else => {},
}
@compileError("unsupported config type " ++ @typeName(T));