diff --git a/wgpu-core/src/device/descriptor.rs b/wgpu-core/src/device/descriptor.rs index 891caad2bd..3b350233eb 100644 --- a/wgpu-core/src/device/descriptor.rs +++ b/wgpu-core/src/device/descriptor.rs @@ -141,13 +141,11 @@ impl unsafe fn alloc_descriptor_sets<'a>( &self, pool: &mut B::DescriptorPool, - layouts: impl Iterator, + layouts: impl ExactSizeIterator, sets: &mut impl Extend, ) -> Result<(), gpu_descriptor::DeviceAllocationError> { use gpu_descriptor::DeviceAllocationError as Dae; - //TODO: https://github.com/zakarumych/gpu-descriptor/pull/10 - let temp_layouts = layouts.collect::>(); - match hal::pso::DescriptorPool::allocate(pool, temp_layouts, sets) { + match hal::pso::DescriptorPool::allocate(pool, layouts, sets) { Ok(()) => Ok(()), Err(hal::pso::AllocationError::OutOfMemory(oom)) => Err(match oom { hal::device::OutOfMemory::Host => Dae::OutOfHostMemory,