switch to fxhash

This commit is contained in:
2025-09-21 16:27:36 -04:00
parent bc9a273831
commit c1f0b16f20
6 changed files with 23 additions and 6 deletions

View File

@@ -55,7 +55,7 @@ impl<'a> PainterCtx<'a> {
textures,
text,
screen_size,
drawing: HashSet::new(),
drawing: HashSet::default(),
}
}

View File

@@ -60,7 +60,7 @@ impl TextData {
attrs: &TextAttrs,
textures: &mut Textures,
) -> (TextureHandle, TextOffset) {
let mut pixels = HashMap::new();
let mut pixels = HashMap::default();
let mut min_x = 0;
let mut min_y = 0;
let mut max_x = 0;

View File

@@ -236,7 +236,7 @@ impl Widgets {
pub fn new() -> Self {
Self {
ids: IdTracker::default(),
map: HashMap::new(),
map: HashMap::default(),
}
}
@@ -298,7 +298,7 @@ impl Widgets {
WidgetData {
widget,
label,
sized_children: HashSet::new(),
sized_children: HashSet::default(),
borrowed: false,
sensor: false,
},

View File

@@ -10,5 +10,5 @@ pub(crate) use id::*;
pub(crate) use math::*;
pub(crate) use refcount::*;
pub type HashMap<K, V> = std::collections::HashMap<K, V>;
pub type HashSet<K> = std::collections::HashSet<K>;
pub type HashMap<K, V> = fxhash::FxHashMap<K, V>;
pub type HashSet<K> = fxhash::FxHashSet<K>;