use ahash::RandomState; use std::{future::Future, pin::Pin}; pub use ahash::AHasher; #[cfg(not(target_arch = "wasm32"))] pub type BoxedFuture<'a, T> = Pin + Send + 'a>>; #[cfg(target_arch = "wasm32")] pub type BoxedFuture<'a, T> = Pin + 'a>>; pub type HashMap = std::collections::HashMap; pub type HashSet = std::collections::HashSet; pub trait HashMapExt { fn with_capacity(cap: usize) -> Self; } impl HashMapExt for HashMap { fn with_capacity(cap: usize) -> Self { HashMap::with_capacity_and_hasher(cap, RandomState::default()) } }