switch to fxhash
This commit is contained in:
16
Cargo.lock
generated
16
Cargo.lock
generated
@@ -256,6 +256,12 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder-lite"
|
||||
version = "0.1.0"
|
||||
@@ -676,6 +682,15 @@ version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
|
||||
|
||||
[[package]]
|
||||
name = "fxhash"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gethostname"
|
||||
version = "0.4.3"
|
||||
@@ -2352,6 +2367,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"cosmic-text",
|
||||
"fxhash",
|
||||
"image",
|
||||
"pollster",
|
||||
"unicode-segmentation",
|
||||
|
||||
@@ -13,4 +13,5 @@ bytemuck = "1.23.1"
|
||||
image = "0.25.6"
|
||||
cosmic-text = "0.14.2"
|
||||
unicode-segmentation = "1.12.0"
|
||||
fxhash = "0.2.1"
|
||||
|
||||
|
||||
@@ -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