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

@ -177,7 +177,6 @@ fn initHint(hint: InitHint, value: anytype) Error!void {
else => @compileError("expected a int or bool, got " ++ @typeName(@TypeOf(value))),
}
getError() catch |err| return switch (err) {
Error.InvalidEnum => unreachable, // impossible for any valid 'InitHint' value
Error.InvalidValue => err,
else => unreachable,
};