Skip to content

Commit 251babc

Browse files
Marc PabstWumpf
authored andcommitted
fix clippy warnings
1 parent 4bf8427 commit 251babc

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

wgpu-hal/src/dx12/mod.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -537,15 +537,6 @@ struct SwapChain {
537537
present_mode: wgt::PresentMode,
538538
format: wgt::TextureFormat,
539539
size: wgt::Extent3d,
540-
options: wgt::Dx12BackendOptions,
541-
}
542-
543-
impl SwapChain {
544-
/// Returns the waitable handle associated with this swap chain, if any.
545-
/// Handle is only valid while the swap chain is alive.
546-
pub unsafe fn waitable_handle(&self) -> Option<Foundation::HANDLE> {
547-
self.waitable
548-
}
549540
}
550541

551542
enum SurfaceTarget {
@@ -574,13 +565,10 @@ impl Surface {
574565
Some(self.swap_chain.read().as_ref()?.raw.clone())
575566
}
576567

577-
/// Returns the waitable handle of the swapchain, if it exists.
568+
/// Returns the waitable handle associated with this swap chain, if any.
569+
/// Handle is only valid while the swap chain is alive.
578570
pub unsafe fn waitable_handle(&self) -> Option<Foundation::HANDLE> {
579-
let swapchain = self.swap_chain.read();
580-
if let Some(swap_chain) = swapchain.as_ref() {
581-
return swap_chain.waitable.clone();
582-
}
583-
None
571+
self.swap_chain.read().as_ref()?.waitable
584572
}
585573
}
586574

@@ -1424,7 +1412,6 @@ impl crate::Surface for Surface {
14241412
present_mode: config.present_mode,
14251413
format: config.format,
14261414
size: config.extent,
1427-
options: device.options.clone(),
14281415
});
14291416

14301417
Ok(())

0 commit comments

Comments
 (0)