wgpu/wgpu-core/src/hash_utils.rs
Kevin Reid 7bcbfe0712 wgpu-core: Adjust imports to allow no_std.
Dependencies on `std` that still exist:
* Locks
* `std::error::Error` (waiting for Rust 1.81)
* `std::os::raw::c_char` for FFI
* `thread_local` and `Backtrace` in `snatch`
2025-02-21 08:47:16 +01:00

15 lines
624 B
Rust

//! Module for hashing utilities.
//!
//! Named hash_utils to prevent clashing with the core::hash module.
/// HashMap using a fast, non-cryptographic hash algorithm.
pub type FastHashMap<K, V> =
hashbrown::HashMap<K, V, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>;
/// HashSet using a fast, non-cryptographic hash algorithm.
pub type FastHashSet<K> =
hashbrown::HashSet<K, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>;
/// IndexMap using a fast, non-cryptographic hash algorithm.
pub type FastIndexMap<K, V> =
indexmap::IndexMap<K, V, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>;