Skip to content

Commit 0e10f07

Browse files
committed
ash runner: fix lints
1 parent 8c7bfe7 commit 0e10f07

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

examples/runners/ash/src/graphics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl MyRenderer {
314314
),
315315
]),
316316
);
317-
pipeline.render(&device, cmd, frame.image_view, frame.extent, push_constants)?;
317+
pipeline.render(device, cmd, frame.image_view, frame.extent, push_constants)?;
318318
device.cmd_pipeline_barrier2(
319319
cmd,
320320
&vk::DependencyInfo::default().image_memory_barriers(&[

examples/runners/ash/src/swapchain.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ use raw_window_handle::{HasDisplayHandle, HasWindowHandle};
55
use std::sync::Arc;
66

77
/// A binary semaphore for swapchain operations
8-
pub struct SwapchainSync {
8+
struct SwapchainSync {
99
acquire_semaphore: vk::Semaphore,
1010
render_semaphore: vk::Semaphore,
1111
render_fence: vk::Fence,
1212
}
1313

1414
impl SwapchainSync {
15-
pub unsafe fn new(device: &MyDevice) -> anyhow::Result<Self> {
15+
unsafe fn new(device: &MyDevice) -> anyhow::Result<Self> {
1616
unsafe {
1717
let signaled_fence =
1818
vk::FenceCreateInfo::default().flags(vk::FenceCreateFlags::SIGNALED);
@@ -26,7 +26,7 @@ impl SwapchainSync {
2626
}
2727
}
2828

29-
pub unsafe fn destroy(&self, device: &MyDevice) {
29+
unsafe fn destroy(&self, device: &MyDevice) {
3030
unsafe {
3131
device.destroy_semaphore(self.acquire_semaphore, None);
3232
device.destroy_semaphore(self.render_semaphore, None);
@@ -263,7 +263,7 @@ pub struct DrawFrame {
263263
pub extent: vk::Extent2D,
264264
/// the [`vk::Image`] to draw to
265265
pub image: vk::Image,
266-
/// the [`vk::ImageImage`] to draw to, created from `image`
266+
/// the [`vk::Image`] to draw to, created from `image`
267267
pub image_view: vk::ImageView,
268268
/// the `acquire_image` semaphore that must be waited for before draw commands are executed
269269
pub acquire_semaphore: vk::Semaphore,
@@ -340,8 +340,7 @@ impl MySwapchainManager {
340340
}
341341
}
342342
panic!(
343-
"looped {} times trying to acquire swapchain image and failed repeatedly!",
344-
RECREATE_ATTEMPTS
343+
"looped {RECREATE_ATTEMPTS} times trying to acquire swapchain image and failed repeatedly!"
345344
);
346345
}
347346
}

0 commit comments

Comments
 (0)