on master help sign in
Remove explicit type annotation
commit19aa878a0875a309ef9a5402d31ba10aa8dc3f06 authorsharkdp <davidpeter@web.de> dateWed 3 Jun 2020, 10:15 (6 years ago) parent9f52012
1 file changed+2−2
src/bin/bat/main.rs+2−2
src/bin/bat/main.rs+2−2
@@ -65,12 +65,12 @@ fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
6565fn get_syntax_mapping_to_paths<'a>(
6666 mappings: &[(GlobMatcher, MappingTarget<'a>)],
6767) -> HashMap<&'a str, Vec<String>> {
68− let mut map: HashMap<&str, Vec<String>> = HashMap::new();
68+ let mut map = HashMap::new();
6969 for mapping in mappings {
7070 match mapping {
7171 (_, MappingTarget::MapToUnknown) => {}
7272 (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);
7474 globs.push(matcher.glob().glob().into());
7575 }
7676 }