| author | |
| committer | |
| log | 530228d9531e8d1dcf7e8ed88e68403e65bcf6bb |
| tree | adba4453c823e623749efbd0b4920f67e973b6e4 |
| parent | 6c598e8341c202a61dc24678f4450fd5af961b4e |
| signature |
1 files changed, 1 insertions(+), 2 deletions(-)
lib/std/enums.zig+1-2| ... | ... | @@ -197,8 +197,7 @@ test "directEnumArrayDefault slice" { |
| 197 | 197 | try testing.expectEqualSlices(u8, "default", array[2]); |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | /// Cast an enum literal, value, or string to the enum value of type E | |
| 201 | /// with the same name. | |
| 200 | /// Deprecated: Use @field(E, @tagName(tag)) or @field(E, string) | |
| 202 | 201 | pub fn nameCast(comptime E: type, comptime value: anytype) E { |
| 203 | 202 | return comptime blk: { |
| 204 | 203 | const V = @TypeOf(value); |