From 2b0e3ed01cfcc4bcccc7fd63b2581b260c00b089 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Mon, 15 Apr 2024 17:38:56 -0700 Subject: [PATCH] [core] Don't derive `Default` for `ResourceMaps`. The derivation is only effective if the generic type parameter `A` also implements `Default`, which `HalApi` implementations generally don't, so this derivation never actually took place. (This is why `ResourceMaps::new` is written out the way it is.) --- wgpu-core/src/device/life.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/wgpu-core/src/device/life.rs b/wgpu-core/src/device/life.rs index 78c6c77b1..85bf439f5 100644 --- a/wgpu-core/src/device/life.rs +++ b/wgpu-core/src/device/life.rs @@ -23,7 +23,6 @@ use std::sync::Arc; use thiserror::Error; /// A struct that keeps lists of resources that are no longer needed by the user. -#[derive(Default)] pub(crate) struct ResourceMaps { pub buffers: FastHashMap>>, pub staging_buffers: FastHashMap>>,