2
0
mirror of https://github.com/sharkdp/bat synced 2024-11-18 15:26:16 +00:00

Remove explicit type annotation

This commit is contained in:
sharkdp 2020-06-03 10:15:39 +02:00 committed by David Peter
parent 9f52012443
commit 19aa878a08

View File

@ -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<String>> {
let mut map: HashMap<&str, Vec<String>> = 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());
}
}