From 96c6c89e9388f9c86e2559c891cee559f26814c9 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 24 Mar 2023 14:45:49 -0400 Subject: [PATCH] refactor(d3d12): use `mut_self` instead of round-tripping w/ `mut_void` --- wgpu-hal/src/auxil/dxgi/factory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-hal/src/auxil/dxgi/factory.rs b/wgpu-hal/src/auxil/dxgi/factory.rs index c6d05304c..ec3c74c19 100644 --- a/wgpu-hal/src/auxil/dxgi/factory.rs +++ b/wgpu-hal/src/auxil/dxgi/factory.rs @@ -44,7 +44,7 @@ pub fn enumerate_adapters(factory: d3d12::DxgiFactory) -> Vec::null(); - let hr = unsafe { factory.EnumAdapters1(cur_index, adapter1.mut_void() as *mut *mut _) }; + let hr = unsafe { factory.EnumAdapters1(cur_index, adapter1.mut_self()) }; if hr == winerror::DXGI_ERROR_NOT_FOUND { break;