Skip to content

Commit

Permalink
fix rust fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
o2sh committed Oct 8, 2020
1 parent ca58871 commit e710018
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,9 @@ impl Info {
let author_email = line.split('\t').collect::<Vec<_>>()[1].to_string();
let author_name = line.split('\t').collect::<Vec<_>>()[2].to_string();
let commit_count = authors.entry(author_email.to_string()).or_insert(0);
author_name_by_email.entry(author_email.to_string()).or_insert(author_name);
author_name_by_email
.entry(author_email.to_string())
.or_insert(author_name);
*commit_count += 1;
total_commits += 1;
}
Expand All @@ -509,7 +511,11 @@ impl Info {
.into_iter()
.map(|(author, count)| {
(
author_name_by_email.get(&author).unwrap().trim_matches('\'').to_string(),
author_name_by_email
.get(&author)
.unwrap()
.trim_matches('\'')
.to_string(),
count,
count * 100 / total_commits,
)
Expand Down

0 comments on commit e710018

Please sign in to comment.