changed formatting

This commit is contained in:
Aaronepower 2016-03-20 19:37:53 +00:00
parent f33c615f15
commit 8d7496905b
3 changed files with 12 additions and 12 deletions

10
Cargo.lock generated
View File

@ -1,8 +1,8 @@
[root]
name = "tokei"
version = "1.3.1"
version = "1.4.0"
dependencies = [
"clap 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"maplit 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -10,7 +10,7 @@ dependencies = [
[[package]]
name = "ansi_term"
version = "0.7.1"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -20,10 +20,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "clap"
version = "2.0.1"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ansi_term 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ansi_term 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"vec_map 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -96,7 +96,7 @@ impl<'a> fmt::Display for Language<'a> {
self.total
};
write!(f,
" {: <10} {: >10} {:>10} {:>10} {:>10} {:>10}",
" {: <12} {: >12} {:>12} {:>12} {:>12} {:>12}",
self.name,
total,
self.lines,

View File

@ -26,7 +26,7 @@ use language::Language;
use fsutil::contains_comments;
const ROW: &'static str = "-----------------------------------------------------------------------\
---------";
--------";
const BLANKS: &'static str = "blanks";
const COMMENTS: &'static str = "comments";
const CODE: &'static str = "code";
@ -90,7 +90,7 @@ fn main() {
let yaml = Language::new_single("YAML", "#");
// Languages are placed inside a BTreeMap, in order to print alphabetically by default
let mut languages = btreemap! {
let languages = btreemap! {
"as" => &action_script,
"bat" => &batch,
"btm" => &batch,
@ -201,7 +201,7 @@ fn main() {
let sort_empty = sort.is_empty();
println!("{}", ROW);
println!(" {:<10} {:>10} {:>10} {:>10} {:>10} {:>10}",
println!(" {:<12} {:>12} {:>12} {:>12} {:>12} {:>12}",
"Language",
"Files",
"Total",
@ -219,7 +219,7 @@ fn main() {
let extension = unwrap_opt_cont!(unwrap_opt_cont!(path.extension())
.to_str());
let lowercase = extension.to_lowercase();
unwrap_opt_cont!(languages.get_mut(&*lowercase))
unwrap_opt_cont!(languages.get(&*lowercase))
};
language.borrow_mut().files.push(path);
@ -244,7 +244,7 @@ fn main() {
let extension = unwrap_opt_cont!(unwrap_opt_cont!(entry.path().extension())
.to_str());
let lowercase = extension.to_lowercase();
unwrap_opt_cont!(languages.get_mut(&*lowercase))
unwrap_opt_cont!(languages.get(&*lowercase))
};
language.borrow_mut().files.push(entry.path().to_owned());
@ -253,7 +253,7 @@ fn main() {
}
let mut total = Language::new_raw("Total");
for (_, language) in &mut languages {
for (_, language) in &languages {
if language.borrow().printed {
continue;