Use rustc-hash for most of our HashMap and HashSet instances

This commit is contained in:
Héctor Ramón Jiménez 2024-04-01 11:59:46 +02:00
parent 14ed71e09b
commit f5bcfec821
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
19 changed files with 60 additions and 49 deletions

View file

@ -1,6 +1,7 @@
//! Load and draw raster graphics.
use crate::{Hasher, Rectangle, Size};
use crate::{Rectangle, Size};
use rustc_hash::FxHasher;
use std::hash::{Hash, Hasher as _};
use std::path::PathBuf;
use std::sync::Arc;
@ -50,7 +51,7 @@ impl Handle {
}
fn from_data(data: Data) -> Handle {
let mut hasher = Hasher::default();
let mut hasher = FxHasher::default();
data.hash(&mut hasher);
Handle {