Skip to content

Commit

Permalink
limit language stat to one decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
o2sh committed Nov 5, 2019
1 parent e44d736 commit 8b710bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl std::fmt::Display for Info {
};

for (cnt, language) in languages.iter().enumerate() {
let formatted_number = format!("{:.*}", 2, language.1);
let formatted_number = format!("{:.*}", 1, language.1);
if cnt != 0 && cnt % 3 == 0 {
s = s + &format!("\n{}{} ({} %) ", pad, language.0, formatted_number);
} else {
Expand Down

0 comments on commit 8b710bd

Please sign in to comment.