remove explicit comptime because of miscompilation

This commit is contained in:
2025-10-24 14:20:51 +02:00
parent f78a8eaf1a
commit d39a834f4e

View File

@@ -71,19 +71,18 @@ fn intersect(comptime as: []const @Type(.enum_literal), comptime bs: []const @Ty
/// Checks whether the log is enabled for a specific combination of `tags`. Depends on the `options`
/// set.
pub fn logEnabled(comptime tags: []const @Type(.enum_literal)) bool {
comptime {
// If `tags` has at least one in `options.tags_disabled` then we never log.
if (options.tags_disabled.len > 0) {
if (intersect(tags, options.tags_disabled)) {
return false;
}
}
// If `tags` has at least one in `options.tags_enabled` then we should log.
if (options.tags_enabled.len > 0) {
return intersect(tags, options.tags_enabled);
// If `tags` has at least one in `options.tags_disabled` then we never log.
if (options.tags_disabled.len > 0) {
if (intersect(tags, options.tags_disabled)) {
return false;
}
}
// If `tags` has at least one in `options.tags_enabled` then we should log.
if (options.tags_enabled.len > 0) {
return intersect(tags, options.tags_enabled);
}
// If neither is set then we just log everything.
return true;
}