Skip to content

Commit

Permalink
Use DefaultHasher
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Dec 14, 2024
1 parent ff7906b commit 1ff8ff2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_data_structures/src/fx.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use std::hash::BuildHasherDefault;
use std::hash::{BuildHasherDefault, DefaultHasher};

pub use rustc_hash::{FxHashMap, FxHashSet, FxHasher};

pub type StdEntry<'a, K, V> = std::collections::hash_map::Entry<'a, K, V>;

pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
pub type FxIndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<FxHasher>>;
pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<DefaultHasher>>;
pub type FxIndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<DefaultHasher>>;
pub type IndexEntry<'a, K, V> = indexmap::map::Entry<'a, K, V>;
pub type IndexOccupiedEntry<'a, K, V> = indexmap::map::OccupiedEntry<'a, K, V>;

Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_type_ir/src/data_structures/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::hash::BuildHasherDefault;
use std::hash::{BuildHasherDefault, DefaultHasher};

use rustc_hash::FxHasher;
pub use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet};

pub type IndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
pub type IndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<FxHasher>>;
pub type IndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<DefaultHasher>>;
pub type IndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<DefaultHasher>>;

mod delayed_map;

Expand Down

0 comments on commit 1ff8ff2

Please sign in to comment.