@@ -62,15 +62,15 @@ fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
6262 Ok(())
6363}
6464
65−fn get_syntax_mapping_to_paths(
66− mappings: &[(GlobMatcher, MappingTarget)],
67−) -> HashMap<String, Vec<String>> {
68− let mut map: HashMap<String, Vec<String>> = HashMap::new();
65+fn get_syntax_mapping_to_paths<'a>(
66+ mappings: &[(GlobMatcher, MappingTarget<'a>)],
67+) -> HashMap<&'a str, Vec<String>> {
68+ let mut map: HashMap<&str, Vec<String>> = HashMap::new();
6969 for mapping in mappings {
7070 match mapping {
7171 (_, MappingTarget::MapToUnknown) => {}
7272 (matcher, MappingTarget::MapTo(s)) => {
73− let globs = map.entry((*s).into()).or_insert_with(Vec::new);
73+ let globs = map.entry(s).or_insert_with(Vec::new);
7474 globs.push(matcher.glob().glob().into());
7575 }
7676 }
@@ -91,7 +91,7 @@ pub fn list_languages(config: &Config) -> Result<()> {
9191 let configured_languages = get_syntax_mapping_to_paths(config.syntax_mapping.mappings());
9292
9393 for lang in languages.iter_mut() {
94− if let Some(additional_paths) = configured_languages.get(&lang.name) {
94+ if let Some(additional_paths) = configured_languages.get(lang.name.as_str()) {
9595 lang.file_extensions
9696 .extend(additional_paths.iter().cloned());
9797 }