Deprecating hashbrown reexports (#11721)

# 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.
This commit is contained in:
andristarr 2024-02-06 19:04:46 +01:00 committed by GitHub
parent e169b2b217
commit 9f2eabb02f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,6 +100,9 @@ pub type HashMap<K, V> = hashbrown::HashMap<K, V, BuildHasherDefault<AHasher>>;
/// using the same Bevy version on the same device. /// using the same Bevy version on the same device.
/// ///
/// aHash is designed for performance and is NOT cryptographically secure. /// 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>; pub type StableHashMap<K, V> = hashbrown::HashMap<K, V, FixedState>;
/// A [`HashSet`][hashbrown::HashSet] implementing aHash, a high /// A [`HashSet`][hashbrown::HashSet] implementing aHash, a high
@ -119,6 +122,9 @@ pub type HashSet<K> = hashbrown::HashSet<K, BuildHasherDefault<AHasher>>;
/// using the same Bevy version on the same device. /// using the same Bevy version on the same device.
/// ///
/// aHash is designed for performance and is NOT cryptographically secure. /// 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>; 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. /// A pre-hashed value of a specific type. Pre-hashing enables memoization of hashes that are expensive to compute.