Use an opaque Id type for image::Handle

Hashing pointers is a terrible idea.
This commit is contained in:
Héctor Ramón Jiménez 2024-05-01 01:39:43 +02:00
parent f5bc336d69
commit b52c7bb610
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
6 changed files with 59 additions and 36 deletions

View file

@ -38,8 +38,8 @@ impl Memory {
/// Caches image raster data
#[derive(Debug, Default)]
pub struct Cache {
map: FxHashMap<u64, Memory>,
hits: FxHashSet<u64>,
map: FxHashMap<image::Id, Memory>,
hits: FxHashSet<image::Id>,
should_trim: bool,
}