authorgravatar for 17693494+AllanRegush@users.noreply.github.comAllan Regush <17693494+AllanRegush@users.noreply.github.com> 2022-07-27 20:49:06-06:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-08-05 15:41:03+03:00
log44c321c05e0f5755bcb9f4b1a33dc23aeef880aa
treeb755831b0e1633b27c5a9c256ac43f2cf672af7c
parent263b5933d2fd63ae4052c7a29288968cbd8505bc

std.enums: make directEnumArrayLen public


1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/enums.zig+1-1
......@@ -57,7 +57,7 @@ pub fn values(comptime E: type) []const E {
5757/// the total number of items which have no matching enum key (holes in the enum
5858/// numbering). So for example, if an enum has values 1, 2, 5, and 6, max_unused_slots
5959/// must be at least 3, to allow unused slots 0, 3, and 4.
60fn directEnumArrayLen(comptime E: type, comptime max_unused_slots: comptime_int) comptime_int {
60pub fn directEnumArrayLen(comptime E: type, comptime max_unused_slots: comptime_int) comptime_int {
6161 var max_value: comptime_int = -1;
6262 const max_usize: comptime_int = ~@as(usize, 0);
6363 const fields = std.meta.fields(E);