From 44c321c05e0f5755bcb9f4b1a33dc23aeef880aa Mon Sep 17 00:00:00 2001 From: Allan Regush <17693494+AllanRegush@users.noreply.github.com> Date: Wed, 27 Jul 2022 20:49:06 -0600 Subject: [PATCH] std.enums: make directEnumArrayLen public --- lib/std/enums.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/enums.zig b/lib/std/enums.zig index 31bc367e64..08781767de 100644 --- a/lib/std/enums.zig +++ b/lib/std/enums.zig @@ -57,7 +57,7 @@ pub fn values(comptime E: type) []const E { /// the total number of items which have no matching enum key (holes in the enum /// numbering). So for example, if an enum has values 1, 2, 5, and 6, max_unused_slots /// must be at least 3, to allow unused slots 0, 3, and 4. -fn directEnumArrayLen(comptime E: type, comptime max_unused_slots: comptime_int) comptime_int { +pub fn directEnumArrayLen(comptime E: type, comptime max_unused_slots: comptime_int) comptime_int { var max_value: comptime_int = -1; const max_usize: comptime_int = ~@as(usize, 0); const fields = std.meta.fields(E);