From 45d2767719e612e189c5044aa9e2e9aef7343953 Mon Sep 17 00:00:00 2001 From: Emil Date: Sun, 21 Jun 2026 01:02:20 +0300 Subject: [PATCH] fix: clean up dead code warnings in vulkan.rs Remove unused fields from VulkanRenderer: pixel_w, pixel_h, physical_device, queue_family, swapchain_format. Mark unused device param in create_swapchain as _device. Only winit deprecation warnings remain (create_window, run). --- src/render/vulkan.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/render/vulkan.rs b/src/render/vulkan.rs index 5c7fea4..1d6dd0d 100644 --- a/src/render/vulkan.rs +++ b/src/render/vulkan.rs @@ -39,21 +39,16 @@ struct PushConstants { pub struct VulkanRenderer { grid_w: usize, grid_h: usize, - pixel_w: u32, - pixel_h: u32, entry: ash::Entry, instance: ash::Instance, surface: vk::SurfaceKHR, - physical_device: vk::PhysicalDevice, device: ash::Device, graphics_queue: vk::Queue, - queue_family: u32, swapchain_loader: ash::khr::swapchain::Device, swapchain: vk::SwapchainKHR, swapchain_image_views: Vec, - swapchain_format: vk::Format, swapchain_extent: vk::Extent2D, render_pass: vk::RenderPass, @@ -148,11 +143,11 @@ impl VulkanRenderer { update_descriptor_set(&device, descriptor_set, atlas_view, atlas_sampler); Ok(Self { - grid_w, grid_h, pixel_w, pixel_h, - entry, instance, surface, physical_device, device, - graphics_queue, queue_family, + grid_w, grid_h, + entry, instance, surface, device, + graphics_queue, swapchain_loader, swapchain, swapchain_image_views, - swapchain_format, swapchain_extent, + swapchain_extent, render_pass, pipeline, pipeline_layout, framebuffers, command_pool, command_buffers, image_available, render_finished, in_flight, frame_index: 0, @@ -422,7 +417,7 @@ fn create_device(instance: &ash::Instance, pd: vk::PhysicalDevice, qf: u32) -> R } fn create_swapchain( - device: &ash::Device, + _device: &ash::Device, sl: &ash::khr::swapchain::Device, surface_loader: &ash::khr::surface::Instance, pd: vk::PhysicalDevice,