Cargo fmt, minor fix

This commit is contained in:
Stephen Seo 2024-03-01 14:51:15 +09:00
parent e60ea4d131
commit 57d8a971c6

View file

@ -99,7 +99,11 @@ impl VulkanApp {
};
let vk_result = unsafe {
ffi_vk::vkCreateInstance(std::ptr::addr_of!(create_info), std::ptr::null(), std::ptr::addr_of_mut!(self.vk_instance))
ffi_vk::vkCreateInstance(
std::ptr::addr_of!(create_info),
std::ptr::null(),
std::ptr::addr_of_mut!(self.vk_instance),
)
};
if vk_result != ffi_vk::VkResult_VK_SUCCESS {
@ -112,6 +116,10 @@ impl VulkanApp {
panic!("ERROR: Cannot execute main loop if window is null!");
}
if self.vk_instance.is_null() {
panic!("ERROR: Cannot execute main loop if vk_instance is null!");
}
loop {
unsafe {
if ffi_glfw::glfwWindowShouldClose(self.window) != 0 {