| ... | ... | @@ -86,7 +86,7 @@ pub fn enumValueWithIndex(r: Random, comptime EnumType: type, comptime Index: ty |
| 86 | 86 | const values = comptime std.enums.values(EnumType); |
| 87 | 87 | comptime assert(values.len > 0); // can't return anything |
| 88 | 88 | comptime assert(maxInt(Index) >= values.len - 1); // can't access all values |
| 89 | | comptime if (values.len == 1) return values[0]; |
| 89 | if (values.len == 1) return values[0]; |
| 90 | 90 | |
| 91 | 91 | const index = if (comptime values.len - 1 == maxInt(Index)) |
| 92 | 92 | r.int(Index) |