From 783ff3e1fbb31a62e82cd0b00653c217df573ce8 Mon Sep 17 00:00:00 2001 From: xiaopengli89 Date: Tue, 13 Dec 2022 14:25:27 +0800 Subject: [PATCH] Fix clippy --- wgpu-hal/src/dx12/command.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wgpu-hal/src/dx12/command.rs b/wgpu-hal/src/dx12/command.rs index ff75f0d611..d109531ace 100644 --- a/wgpu-hal/src/dx12/command.rs +++ b/wgpu-hal/src/dx12/command.rs @@ -236,7 +236,9 @@ impl crate::CommandEncoder for super::CommandEncoder { if reset_result.is_ok() { break Some(list); } else { - list.destroy(); + unsafe { + list.destroy(); + } } } else { break None; @@ -271,7 +273,9 @@ impl crate::CommandEncoder for super::CommandEncoder { if list.close().into_result().is_ok() { self.free_lists.push(list); } else { - list.destroy(); + unsafe { + list.destroy(); + } } } } @@ -285,7 +289,9 @@ impl crate::CommandEncoder for super::CommandEncoder { if cmd_buf.closed { self.free_lists.push(cmd_buf.raw); } else { - cmd_buf.raw.destroy(); + unsafe { + cmd_buf.raw.destroy(); + } } } self.allocator.reset();