mach: fix compiler error regarding zig changes (#645)

This commit is contained in:
Benjaaaa 2022-12-25 17:19:48 -03:00 committed by GitHub
parent 0e67b92676
commit 052d3a7da8
Failed to generate hash of commit
3 changed files with 10 additions and 11 deletions

View file

@ -28,12 +28,12 @@ pub const Context = struct {
var data: backends.BackendContext = blk: {
if (backend) |b| {
break :blk try @typeInfo(
std.meta.fieldInfo(backends.BackendContext, b).field_type,
std.meta.fieldInfo(backends.BackendContext, b).type,
).Pointer.child.init(allocator, options);
} else {
inline for (std.meta.fields(Backend)) |b, i| {
if (@typeInfo(
std.meta.fieldInfo(backends.BackendContext, @intToEnum(Backend, b.value)).field_type,
std.meta.fieldInfo(backends.BackendContext, @intToEnum(Backend, b.value)).type,
).Pointer.child.init(allocator, options)) |d| {
break :blk d;
} else |err| {