use std::collections::HashMap; use std::collections::HashSet; use std::path::PathBuf; use super::SkillMetadata; /// Counts how often each skill name appears (exact and ASCII-lowercase), excluding disabled paths. pub fn build_skill_name_counts( skills: &[SkillMetadata], disabled_paths: &HashSet, ) -> (HashMap, HashMap) { let mut exact_counts: HashMap = HashMap::new(); let mut lower_counts: HashMap = HashMap::new(); for skill in skills { if disabled_paths.contains(&skill.path_to_skills_md) { continue; } *exact_counts.entry(skill.name.clone()).or_insert(0) += 1; *lower_counts .entry(skill.name.to_ascii_lowercase()) .or_insert(0) += 1; } (exact_counts, lower_counts) }