Zig 0.16: meta.intToEnum -> enums.fromInt

This commit is contained in:
LN Liberda 2026-05-22 22:05:49 +02:00
parent f2f2fad521
commit 4595a791b5

View file

@ -233,8 +233,8 @@ const CborVal = struct {
fn etype(v: *const CborVal) model.EType {
const n = v.int(i32);
return std.meta.intToEnum(model.EType, n)
catch if (n < 0) .pattern else .nonreg;
return std.enums.fromInt(model.EType, n)
orelse if (n < 0) .pattern else .nonreg;
}
fn itemref(v: *const CborVal, cur: u64) u64 {