Switch to rustc-hash

See gfx-rs/rspirv#221 for the rationale behind this change
This commit is contained in:
bjorn3
2021-11-16 17:06:00 +01:00
committed by Dzmitry Malyshau
parent 30a0a37af0
commit 38366e382f
3 changed files with 4 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ all-features = true
bitflags = "1"
bit-set = "0.5"
codespan-reporting = { version = "0.11.0", optional = true }
fxhash = "0.2"
rustc-hash = "1.1.0"
indexmap = "1.6" # 1.7 has MSRV 1.49
log = "0.4"
num-traits = "0.2"

View File

@@ -547,7 +547,7 @@ pub struct Parser<I> {
switch_cases: indexmap::IndexMap<
spirv::Word,
(BodyIndex, Vec<i32>),
std::hash::BuildHasherDefault<fxhash::FxHasher>,
std::hash::BuildHasherDefault<rustc_hash::FxHasher>,
>,
/// Tracks usage of builtins, used to cull unused builtins since they can

View File

@@ -215,11 +215,6 @@ pub mod valid;
pub use crate::arena::{Arena, Handle, Range, UniqueArena};
use std::{
collections::{HashMap, HashSet},
hash::BuildHasherDefault,
};
pub use crate::span::{Span, SpanContext, WithSpan};
#[cfg(feature = "deserialize")]
use serde::Deserialize;
@@ -230,9 +225,9 @@ use serde::Serialize;
pub const BOOL_WIDTH: Bytes = 1;
/// Hash map that is faster but not resilient to DoS attacks.
pub type FastHashMap<K, T> = HashMap<K, T, BuildHasherDefault<fxhash::FxHasher>>;
pub type FastHashMap<K, T> = rustc_hash::FxHashMap<K, T>;
/// Hash set that is faster but not resilient to DoS attacks.
pub type FastHashSet<K> = HashSet<K, BuildHasherDefault<fxhash::FxHasher>>;
pub type FastHashSet<K> = rustc_hash::FxHashSet<K>;
/// Map of expressions that have associated variable names
pub(crate) type NamedExpressions = FastHashMap<Handle<Expression>, String>;