[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.)
This commit is contained in:
Jim Blandy 2024-04-15 17:38:56 -07:00 committed by Teodor Tanasoaia
parent 895879b8c6
commit 2b0e3ed01c

View File

@ -23,7 +23,6 @@ use std::sync::Arc;
use thiserror::Error; use thiserror::Error;
/// A struct that keeps lists of resources that are no longer needed by the user. /// A struct that keeps lists of resources that are no longer needed by the user.
#[derive(Default)]
pub(crate) struct ResourceMaps<A: HalApi> { pub(crate) struct ResourceMaps<A: HalApi> {
pub buffers: FastHashMap<TrackerIndex, Arc<Buffer<A>>>, pub buffers: FastHashMap<TrackerIndex, Arc<Buffer<A>>>,
pub staging_buffers: FastHashMap<TrackerIndex, Arc<StagingBuffer<A>>>, pub staging_buffers: FastHashMap<TrackerIndex, Arc<StagingBuffer<A>>>,