diff --git a/src/vulkan/vk_swapchain.rs b/src/vulkan/vk_swapchain.rs index 53a16c7..7ce2992 100644 --- a/src/vulkan/vk_swapchain.rs +++ b/src/vulkan/vk_swapchain.rs @@ -159,18 +159,14 @@ impl VkSwapchain { .clipped(true) .image_array_layers(1) } +} - fn drop_swapchain(&mut self) { +impl Drop for VkSwapchain { + fn drop(&mut self) { if let Some(swapchain) = self.swapchain { unsafe { self.device.swapchain_loader.destroy_swapchain(swapchain, None); } self.swapchain = None; log::debug!(target: LOG_TARGET, "Swapchain destroyed ({swapchain:?})"); } } -} - -impl Drop for VkSwapchain { - fn drop(&mut self) { - self.drop_swapchain() - } } \ No newline at end of file