switch to fxhash
This commit is contained in:
@@ -55,7 +55,7 @@ impl<'a> PainterCtx<'a> {
|
||||
textures,
|
||||
text,
|
||||
screen_size,
|
||||
drawing: HashSet::new(),
|
||||
drawing: HashSet::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user