glfw: correctly @errorSetCast when returning errors from createWindowSurface

Fixes an issue where `createWindowSurface` would not compile (found when
updating https://github.com/hexops/mach-glfw-vulkan-example to latest.)

Introduced in hexops/mach#115

cc @InKryption

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-12-06 22:14:06 -07:00
parent 3648d6b9c4
commit 9ea4d2aa6f

View file

@ -229,7 +229,7 @@ pub inline fn createWindowSurface(vk_instance: anytype, window: Window, vk_alloc
Error.InvalidValue => @panic("Attempted to use window with client api to create vulkan surface."),
Error.APIUnavailable,
Error.PlatformError,
=> err,
=> @errSetCast(error{ APIUnavailable, PlatformError }, err),
else => unreachable,
};
return v;