mirror of
https://github.com/notohh/rustlings.git
synced 2024-12-18 06:58:10 -05:00
9 lines
344 B
Rust
9 lines
344 B
Rust
use foldhash::fast::FixedState;
|
|
|
|
/// DOS attacks aren't a concern for Rustlings. Therefore, we use `foldhash` with a fixed state.
|
|
pub type HashSet<T> = std::collections::HashSet<T, FixedState>;
|
|
|
|
#[inline]
|
|
pub fn hash_set_with_capacity<T>(capacity: usize) -> HashSet<T> {
|
|
HashSet::with_capacity_and_hasher(capacity, FixedState::default())
|
|
}
|