#![cfg_attr(coverage_nightly, coverage(off))]
use super::types::SymbolInfo;
#[must_use]
pub fn count_by_type(symbols: &[SymbolInfo]) -> std::collections::HashMap<String, usize> {
let mut counts = std::collections::HashMap::with_capacity(64);
for symbol in symbols {
*counts.entry(symbol.kind.clone()).or_insert(0) += 1;
}
counts
}
#[must_use]
pub fn count_by_visibility(symbols: &[SymbolInfo]) -> std::collections::HashMap<String, usize> {
let mut counts = std::collections::HashMap::with_capacity(64);
for symbol in symbols {
*counts.entry(symbol.visibility.clone()).or_insert(0) += 1;
}
counts
}