fix: replace fxhash with rustc-hash

This commit is contained in:
Sam Schmeink committed 2022-12-10 03:56:48 +01:00
1 parent 1b7fe3fcde
commit 6166d4eb73
5 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ keywords = ["dom", "ui", "gui", "react", "wasm"]
bumpalo = { version = "3.6", features = ["collections", "boxed"] } bumpalo = { version = "3.6", features = ["collections", "boxed"] }
# faster hashmaps # faster hashmaps
fxhash = "0.2" rustc-hash = "1.1.0"
# Used in diffing # Used in diffing
longest-increasing-subsequence = "0.1.0" longest-increasing-subsequence = "0.1.0"
+2 -2
View File
@@ -11,7 +11,7 @@ use crate::{
AttributeValue, TemplateNode, AttributeValue, TemplateNode,
}; };
use fxhash::{FxHashMap, FxHashSet}; use rustc_hash::{FxHashMap, FxHashSet};
use DynamicNode::*; use DynamicNode::*;
impl<'b> VirtualDom { impl<'b> VirtualDom {
@@ -434,7 +434,7 @@ impl<'b> VirtualDom {
// The stack is empty upon entry. // The stack is empty upon entry.
fn diff_keyed_children(&mut self, old: &'b [VNode<'b>], new: &'b [VNode<'b>]) { fn diff_keyed_children(&mut self, old: &'b [VNode<'b>], new: &'b [VNode<'b>]) {
if cfg!(debug_assertions) { 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>]| { let mut assert_unique_keys = |children: &'b [VNode<'b>]| {
keys.clear(); keys.clear();
for child in children { for child in children {
+1 -1
View File
@@ -1,4 +1,4 @@
use fxhash::FxHashSet; use rustc_hash::FxHashSet;
use crate::{arena::ElementId, ScopeId, Template}; use crate::{arena::ElementId, ScopeId, Template};
+1 -1
View File
@@ -10,7 +10,7 @@ use crate::{
Attribute, AttributeValue, Element, Event, Properties, TaskId, Attribute, AttributeValue, Element, Event, Properties, TaskId,
}; };
use bumpalo::{boxed::Box as BumpBox, Bump}; use bumpalo::{boxed::Box as BumpBox, Bump};
use fxhash::{FxHashMap, FxHashSet}; use rustc_hash::{FxHashMap, FxHashSet};
use std::{ use std::{
any::{Any, TypeId}, any::{Any, TypeId},
cell::{Cell, RefCell}, cell::{Cell, RefCell},
+1 -1
View File
@@ -14,7 +14,7 @@ use crate::{
AttributeValue, Element, Event, Scope, SuspenseContext, AttributeValue, Element, Event, Scope, SuspenseContext,
}; };
use futures_util::{pin_mut, StreamExt}; use futures_util::{pin_mut, StreamExt};
use fxhash::FxHashMap; use rustc_hash::FxHashMap;
use slab::Slab; use slab::Slab;
use std::{any::Any, borrow::BorrowMut, cell::Cell, collections::BTreeSet, future::Future, rc::Rc}; use std::{any::Any, borrow::BorrowMut, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};