blob: 3f2841e03842f15241fb4a9f8a52c60b3fdd361b (
plain)
1
2
3
4
5
6
7
8
9
|
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())
}
|