Skip to content

Commit

Permalink
chore(primitives): remove Fx* aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Sep 25, 2024
1 parent 5be0a31 commit edb79e8
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions crates/primitives/src/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
//! `no_std` environments.
//! - [`IndexMap`] and [`IndexSet`] from the `indexmap` crate, if the "map-indexmap" feature is
//! enabled.
//! - The previously-listed hash map types prefixed with `Fx` if the "map-fxhash" feature is
//! enabled. These are type aliases with [`FxBuildHasher`] as the hasher builder.
//! - The previously-listed hash map types prefixed with `Fb`. These are type aliases with
//! [`FixedBytes<N>`][fb] as the key, and [`FbBuildHasher`] as the hasher builder. This hasher is
//! optimized for hashing fixed-size byte arrays, and wraps around the default hasher builder. It
Expand Down Expand Up @@ -106,13 +104,8 @@ cfg_if! {
///
/// This is [`rustc_hash::FxBuildHasher`], unless both the "std" and "rand" features are
/// enabled, in which case it will be [`rustc_hash::FxRandomState`] for better security at
/// very little cost. If this is not preferred, consider using the `Fx*` aliases directly.
/// very little cost.
pub type FxBuildHasher = FxBuildHasherInner;

/// A [`HashMap`] using [`FxHasher`] as its hasher.
pub type FxHashMap<K, V> = HashMap<K, V, FxBuildHasher>;
/// A [`HashSet`] using [`FxHasher`] as its hasher.
pub type FxHashSet<V> = HashSet<V, FxBuildHasher>;
}
}

Expand Down Expand Up @@ -149,15 +142,6 @@ cfg_if! {
///
/// See [`IndexSet`](indexmap::IndexSet) for more information.
pub type IndexSet<V, S = DefaultHashBuilder> = indexmap::IndexSet<V, S>;

cfg_if! {
if #[cfg(feature = "map-fxhash")] {
/// An [`IndexMap`] using [`FxHasher`] as its hasher.
pub type FxIndexMap<K, V> = IndexMap<K, V, FxBuildHasher>;
/// An [`IndexSet`] using [`FxHasher`] as its hasher.
pub type FxIndexSet<V> = IndexSet<V, FxBuildHasher>;
}
}
}
}

Expand Down

0 comments on commit edb79e8

Please sign in to comment.