diff --git a/packages/core/Cargo.toml b/packages/core/Cargo.toml index 827968655..37f78f04d 100644 --- a/packages/core/Cargo.toml +++ b/packages/core/Cargo.toml @@ -18,7 +18,7 @@ keywords = ["dom", "ui", "gui", "react", "wasm"] bumpalo = { version = "3.6", features = ["collections", "boxed"] } # faster hashmaps -fxhash = "0.2" +rustc-hash = "1.1.0" # Used in diffing longest-increasing-subsequence = "0.1.0" diff --git a/packages/core/src/diff.rs b/packages/core/src/diff.rs index 8abf8b4ee..e893cd2b5 100644 --- a/packages/core/src/diff.rs +++ b/packages/core/src/diff.rs @@ -11,7 +11,7 @@ use crate::{ AttributeValue, TemplateNode, }; -use fxhash::{FxHashMap, FxHashSet}; +use rustc_hash::{FxHashMap, FxHashSet}; use DynamicNode::*; impl<'b> VirtualDom { @@ -434,7 +434,7 @@ impl<'b> VirtualDom { // The stack is empty upon entry. fn diff_keyed_children(&mut self, old: &'b [VNode<'b>], new: &'b [VNode<'b>]) { if cfg!(debug_assertions) { - let mut keys = fxhash::FxHashSet::default(); + let mut keys = rustc_hash::FxHashSet::default(); let mut assert_unique_keys = |children: &'b [VNode<'b>]| { keys.clear(); for child in children { diff --git a/packages/core/src/mutations.rs b/packages/core/src/mutations.rs index 2512ae9fa..ecca2a678 100644 --- a/packages/core/src/mutations.rs +++ b/packages/core/src/mutations.rs @@ -1,4 +1,4 @@ -use fxhash::FxHashSet; +use rustc_hash::FxHashSet; use crate::{arena::ElementId, ScopeId, Template}; diff --git a/packages/core/src/scopes.rs b/packages/core/src/scopes.rs index c46bbd4f0..241418fa7 100644 --- a/packages/core/src/scopes.rs +++ b/packages/core/src/scopes.rs @@ -10,7 +10,7 @@ use crate::{ Attribute, AttributeValue, Element, Event, Properties, TaskId, }; use bumpalo::{boxed::Box as BumpBox, Bump}; -use fxhash::{FxHashMap, FxHashSet}; +use rustc_hash::{FxHashMap, FxHashSet}; use std::{ any::{Any, TypeId}, cell::{Cell, RefCell}, diff --git a/packages/core/src/virtual_dom.rs b/packages/core/src/virtual_dom.rs index 7a7c516f6..42ba90437 100644 --- a/packages/core/src/virtual_dom.rs +++ b/packages/core/src/virtual_dom.rs @@ -14,7 +14,7 @@ use crate::{ AttributeValue, Element, Event, Scope, SuspenseContext, }; use futures_util::{pin_mut, StreamExt}; -use fxhash::FxHashMap; +use rustc_hash::FxHashMap; use slab::Slab; use std::{any::Any, borrow::BorrowMut, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};