From 19aa878a0875a309ef9a5402d31ba10aa8dc3f06 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 3 Jun 2020 10:15:39 +0200 Subject: [PATCH] Remove explicit type annotation --- src/bin/bat/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs index a643d3e5..65129fa7 100644 --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -65,12 +65,12 @@ fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> { fn get_syntax_mapping_to_paths<'a>( mappings: &[(GlobMatcher, MappingTarget<'a>)], ) -> HashMap<&'a str, Vec> { - let mut map: HashMap<&str, Vec> = HashMap::new(); + let mut map = HashMap::new(); for mapping in mappings { match mapping { (_, MappingTarget::MapToUnknown) => {} (matcher, MappingTarget::MapTo(s)) => { - let globs = map.entry(s).or_insert_with(Vec::new); + let globs = map.entry(*s).or_insert_with(Vec::new); globs.push(matcher.glob().glob().into()); } }