glfw: document why unreachable is valid
This commit is contained in:
parent
0cdac6c68a
commit
bc8ce57e53
8 changed files with 36 additions and 1 deletions
|
|
@ -69,6 +69,7 @@ pub inline fn create(image: Image, xhot: i32, yhot: i32) error{PlatformError}!Cu
|
|||
Error.PlatformError => |e| e,
|
||||
else => unreachable,
|
||||
};
|
||||
// `glfwCreateCursor` returns `null` only for errors
|
||||
unreachable;
|
||||
}
|
||||
|
||||
|
|
@ -90,6 +91,7 @@ pub inline fn createStandard(shape: Shape) error{PlatformError}!Cursor {
|
|||
Error.PlatformError => |e| e,
|
||||
else => unreachable,
|
||||
};
|
||||
// `glfwCreateStandardCursor` returns `null` only for errors
|
||||
unreachable;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue