1#![doc(hidden)]
2#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
3
4pub type Result<T, E = ohno::AppError> = core::result::Result<T, E>;
21pub(crate) type HashMap<K, V> = rustc_hash::FxHashMap<K, V>;
22pub(crate) type HashSet<V> = rustc_hash::FxHashSet<V>;
23
24pub(crate) fn hash_map_with_capacity<K, V>(capacity: usize) -> HashMap<K, V> {
25 HashMap::with_capacity_and_hasher(capacity, rustc_hash::FxBuildHasher)
26}
27
28pub(crate) fn hash_set_with_capacity<V>(capacity: usize) -> HashSet<V> {
29 HashSet::with_capacity_and_hasher(capacity, rustc_hash::FxBuildHasher)
30}
31
32macro_rules! declare_modules {
33 ($($mod:ident),+ $(,)?) => {
34 $(
35 #[cfg(debug_assertions)]
36 pub mod $mod;
37 #[cfg(not(debug_assertions))]
38 mod $mod;
39 )+
40 };
41}
42
43declare_modules!(commands, expr, facts, metrics, reports);
44
45pub use crate::commands::{Host, run};