glfw: Eliminate InvalidEnum

This commit is contained in:
InKryption 2021-11-23 23:16:56 +01:00 committed by Stephen Gutekanst
parent a465d2e021
commit fb0c695bd1
5 changed files with 31 additions and 64 deletions

View file

@ -243,7 +243,6 @@ pub const Key = enum(c_int) {
internal_debug.assertInitialized();
const scancode = cc.glfwGetKeyScancode(@enumToInt(self));
getError() catch |err| return switch (err) {
Error.InvalidEnum => unreachable, // Should be unreachable for any valid 'Key' value.
Error.PlatformError => err,
else => unreachable,
};