Skip to content

Commit

Permalink
fixed features
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Power committed Jan 3, 2017
1 parent c08f113 commit 229f2a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT/Apache-2.0"
name = "tokei"
readme = "README.md"
repository = "https://github.com/Aaronepower/tokei.git"
version = "5.0.3"
version = "5.0.4"

[profile.release]
panic="abort"
Expand Down
29 changes: 14 additions & 15 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ fn main() {

if let Some(format) = output_option {
match_output(format, languages);
return
} else if let Some(sort_category) = sort_option {

for (_, ref mut language) in &mut languages {
Expand Down Expand Up @@ -145,23 +146,21 @@ fn main() {
}
}

if output_option == None {
if !files_option {
println!("{}", ROW);
}
let mut total = Language::new_blank();
for (_, language) in languages {
total += language;
}
println!(" {: <18} {: >6} {:>12} {:>12} {:>12} {:>12}",
"Total",
total.stats.len(),
total.lines,
total.code,
total.comments,
total.blanks);
if !files_option {
println!("{}", ROW);
}
let mut total = Language::new_blank();
for (_, language) in languages {
total += language;
}
println!(" {: <18} {: >6} {:>12} {:>12} {:>12} {:>12}",
"Total",
total.stats.len(),
total.lines,
total.code,
total.comments,
total.blanks);
println!("{}", ROW);
}

fn isnt_empty(&(_, language): &(&LanguageType, &Language)) -> bool {
Expand Down

0 comments on commit 229f2a3

Please sign in to comment.