on master help sign in
Remove explicit type annotation
19aa878sharkdp
src/bin/bat/main.rs+2−2
@@ -65,12 +65,12 @@ fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
65fn get_syntax_mapping_to_paths<'a>(
65fn get_syntax_mapping_to_paths<'a>(
66 mappings: &[(GlobMatcher, MappingTarget<'a>)],
66 mappings: &[(GlobMatcher, MappingTarget<'a>)],
67) -> HashMap<&'a str, Vec<String>> {
67) -> HashMap<&'a str, Vec<String>> {
68− let mut map: HashMap<&str, Vec<String>> = HashMap::new();
68+ let mut map = HashMap::new();
69 for mapping in mappings {
69 for mapping in mappings {
70 match mapping {
70 match mapping {
71 (_, MappingTarget::MapToUnknown) => {}
71 (_, MappingTarget::MapToUnknown) => {}
72 (matcher, MappingTarget::MapTo(s)) => {
72 (matcher, MappingTarget::MapTo(s)) => {
73− let globs = map.entry(s).or_insert_with(Vec::new);
73+ let globs = map.entry(*s).or_insert_with(Vec::new);
74 globs.push(matcher.glob().glob().into());
74 globs.push(matcher.glob().glob().into());
75 }
75 }
76 }
76 }