Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(primitives): remove Fx* aliases #749

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading