1#![allow(2 clippy::implicit_hasher,3 reason = "those methods exist exactly because with_capacity is only present for default BuildHasher"4)]567use jrsonnet_gcmodule::Trace;8use rustc_hash::{FxBuildHasher, FxHashMap, FxHashSet};910pub trait WithCapacityExt {11 fn new() -> Self;12 fn with_capacity(capacity: usize) -> Self;13}14impl<V> WithCapacityExt for FxHashSet<V> {15 fn with_capacity(capacity: usize) -> Self {16 Self::with_capacity_and_hasher(capacity, FxBuildHasher)17 }1819 fn new() -> Self {20 Self::with_hasher(FxBuildHasher)21 }22}23impl<K, V> WithCapacityExt for FxHashMap<K, V> {24 fn with_capacity(capacity: usize) -> Self {25 Self::with_capacity_and_hasher(capacity, FxBuildHasher)26 }2728 fn new() -> Self {29 Self::with_hasher(FxBuildHasher)30 }31}3233pub fn assert_trace<T: Trace>(_v: &T) {}