diff options
| author | wooster0 <wooster0@proton.me> | 2025-05-11 17:38:16 +0900 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-05-13 07:28:41 +0200 |
| commit | a365971a337116dd23df2b1bc86468d54885b4b2 (patch) | |
| tree | 070dfe739796151d4d1256a3cedd83989609be42 /src/Value.zig | |
| parent | a3693aae3a9417c4298788af570762945b21ccba (diff) | |
| download | zig-a365971a337116dd23df2b1bc86468d54885b4b2.tar.gz zig-a365971a337116dd23df2b1bc86468d54885b4b2.zip | |
std.meta.intToEnum -> std.enums.fromInt
Also use an optional as the return type instead of an error code.
Diffstat (limited to 'src/Value.zig')
| -rw-r--r-- | src/Value.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Value.zig b/src/Value.zig index cac4134e58..6d041bc5d2 100644 --- a/src/Value.zig +++ b/src/Value.zig @@ -3814,7 +3814,7 @@ pub fn interpret(val: Value, comptime T: type, pt: Zcu.PerThread) error{ OutOfMe .@"enum" => switch (interpret_mode) { .direct => { const int = val.getUnsignedInt(zcu) orelse return error.TypeMismatch; - return std.meta.intToEnum(T, int) catch error.TypeMismatch; + return std.enums.fromInt(T, int) orelse error.TypeMismatch; }, .by_name => { const field_index = ty.enumTagFieldIndex(val, zcu) orelse return error.TypeMismatch; |
