mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-02 00:13:30 +02:00
10 lines
344 B
Rust
10 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())
|
|
}
|