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