mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Eliminate `Namer::namespace_index` and remove namespace indices from `Namer::unique` keys. Instead, implement `Namer::namespace` by just swapping in a fresh table for the duration of the call. Create the fresh hash table with the right initial capacity. The prior implementation did manage to avoid allocations by sharing a hash table, and we'd like to not lose that advantage entirely. This has no effect on generated code.