collections.rs

 1#[cfg(feature = "test-support")]
 2#[derive(Clone, Default)]
 3pub struct DeterministicState;
 4
 5#[cfg(feature = "test-support")]
 6impl std::hash::BuildHasher for DeterministicState {
 7    type Hasher = seahash::SeaHasher;
 8
 9    fn build_hasher(&self) -> Self::Hasher {
10        seahash::SeaHasher::new()
11    }
12}
13
14#[cfg(feature = "test-support")]
15pub type HashMap<K, V> = std::collections::HashMap<K, V, DeterministicState>;
16
17#[cfg(feature = "test-support")]
18pub type HashSet<T> = std::collections::HashSet<T, DeterministicState>;
19
20#[cfg(not(feature = "test-support"))]
21pub type HashMap<K, V> = std::collections::HashMap<K, V>;
22
23#[cfg(not(feature = "test-support"))]
24pub type HashSet<T> = std::collections::HashSet<T>;
25
26use std::any::TypeId;
27pub use std::collections::*;
28
29// NEW TYPES
30
31#[derive(Default)]
32pub struct CommandPaletteFilter {
33    pub hidden_namespaces: HashSet<&'static str>,
34    pub hidden_action_types: HashSet<TypeId>,
35}