From 6640ecb200fecb7135bee914649e85491f208919 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Thu, 11 Nov 2021 10:11:26 +0100 Subject: [PATCH] instance: Make enumerate_physical_device_groups unsafe All Vulkan functions are marked `unsafe` and `enumerate_physical_device_groups` should not be an exception to that. --- ash/src/instance.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ash/src/instance.rs b/ash/src/instance.rs index ee1763a0e..432bfdf65 100644 --- a/ash/src/instance.rs +++ b/ash/src/instance.rs @@ -59,16 +59,14 @@ impl Instance { } #[doc = ""] - pub fn enumerate_physical_device_groups( + pub unsafe fn enumerate_physical_device_groups( &self, out: &mut [vk::PhysicalDeviceGroupProperties], ) -> VkResult<()> { - unsafe { - let mut group_count = out.len() as u32; - self.instance_fn_1_1 - .enumerate_physical_device_groups(self.handle(), &mut group_count, out.as_mut_ptr()) - .into() - } + let mut group_count = out.len() as u32; + self.instance_fn_1_1 + .enumerate_physical_device_groups(self.handle(), &mut group_count, out.as_mut_ptr()) + .into() } #[doc = ""]