This commit is contained in:
2025-10-24 14:21:58 +02:00
parent d39a834f4e
commit 2dea92dcd9

View File

@@ -73,14 +73,14 @@ fn intersect(comptime as: []const @Type(.enum_literal), comptime bs: []const @Ty
pub fn logEnabled(comptime tags: []const @Type(.enum_literal)) bool { pub fn logEnabled(comptime tags: []const @Type(.enum_literal)) bool {
// If `tags` has at least one in `options.tags_disabled` then we never log. // If `tags` has at least one in `options.tags_disabled` then we never log.
if (options.tags_disabled.len > 0) { if (options.tags_disabled.len > 0) {
if (intersect(tags, options.tags_disabled)) { if (comptime intersect(tags, options.tags_disabled)) {
return false; return false;
} }
} }
// If `tags` has at least one in `options.tags_enabled` then we should log. // If `tags` has at least one in `options.tags_enabled` then we should log.
if (options.tags_enabled.len > 0) { if (options.tags_enabled.len > 0) {
return intersect(tags, options.tags_enabled); return comptime intersect(tags, options.tags_enabled);
} }
// If neither is set then we just log everything. // If neither is set then we just log everything.