glfw: document why unreachable is valid
This commit is contained in:
parent
0cdac6c68a
commit
bc8ce57e53
8 changed files with 36 additions and 1 deletions
|
|
@ -68,6 +68,7 @@ pub inline fn getRequiredInstanceExtensions() error{APIUnavailable}![][*:0]const
|
|||
Error.APIUnavailable => |e| e,
|
||||
else => unreachable,
|
||||
};
|
||||
// `glfwGetRequiredInstanceExtensions` returns `null` only for errors
|
||||
unreachable;
|
||||
}
|
||||
|
||||
|
|
@ -227,6 +228,7 @@ pub inline fn createWindowSurface(vk_instance: anytype, window: Window, vk_alloc
|
|||
Error.APIUnavailable, Error.PlatformError => |e| e,
|
||||
else => unreachable,
|
||||
};
|
||||
// `glfwCreateWindowSurface` returns `!VK_SUCCESS` only for errors
|
||||
unreachable;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue