Skip to content

Commit

Permalink
Deprecating hashbrown reexports (#11721)
Browse files Browse the repository at this point in the history
# Objective

- The exported hashtypes are just re-exports from hashbrown, we want to
drop that dependency and (in the future) let the user import their own
choice.
- Fixes #11717

## Solution

- Adding a deprecated tag on the re-exports, so in future releases these
can be safely removed.
  • Loading branch information
andristarr committed Feb 6, 2024
1 parent e169b2b commit 9f2eabb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bevy_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ pub type HashMap<K, V> = hashbrown::HashMap<K, V, BuildHasherDefault<AHasher>>;
/// using the same Bevy version on the same device.
///
/// aHash is designed for performance and is NOT cryptographically secure.
#[deprecated(
note = "Will be required to use the hash library of your choice. Alias for: hashbrown::HashMap<K, V, FixedState>"
)]
pub type StableHashMap<K, V> = hashbrown::HashMap<K, V, FixedState>;

/// A [`HashSet`][hashbrown::HashSet] implementing aHash, a high
Expand All @@ -119,6 +122,9 @@ pub type HashSet<K> = hashbrown::HashSet<K, BuildHasherDefault<AHasher>>;
/// using the same Bevy version on the same device.
///
/// aHash is designed for performance and is NOT cryptographically secure.
#[deprecated(
note = "Will be required to use the hash library of your choice. Alias for: hashbrown::HashSet<K, FixedState>"
)]
pub type StableHashSet<K> = hashbrown::HashSet<K, FixedState>;

/// A pre-hashed value of a specific type. Pre-hashing enables memoization of hashes that are expensive to compute.
Expand Down

0 comments on commit 9f2eabb

Please sign in to comment.