diff options
author | Aaron Power <theaaronepower@gmail.com> | 2016-11-27 18:13:30 +0000 |
---|---|---|
committer | Aaron Power <theaaronepower@gmail.com> | 2016-11-27 18:13:30 +0000 |
commit | bf304dd8ebb1b215776ceba221e4875ef4e3eb06 (patch) | |
tree | 9b1999eef63adfcdad2c328dea224bf1d03e1f2d | |
parent | 02c8ebe122d5d5bb47aad906e6b457ac9fef9737 (diff) |
Fix for languages with no single line comments panicing4.5.2
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | cli.yml | 2 | ||||
-rw-r--r-- | src/language/languages.rs | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -1,6 +1,6 @@ [root] name = "tokei" -version = "4.5.0" +version = "4.5.2" dependencies = [ "clap 2.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8,7 +8,7 @@ license = "MIT/Apache-2.0" name = "tokei" readme = "README.md" repository = "https://github.com/Aaronepower/tokei.git" -version = "4.5.1" +version = "4.5.2" [build-dependencies] serde = "~0.8.0" serde_json = "~0.8.0" @@ -5,7 +5,7 @@ about: Count Code, Quickly. author: Aaron P. <theaaronepower@gmail.com> bin_name: Tokei name: Tokei -version: 4.5.1 +version: 4.5.2 args: - exclude: help: Ignore all files & directories containing the word. diff --git a/src/language/languages.rs b/src/language/languages.rs index 2053bc9..74e7b3e 100644 --- a/src/language/languages.rs +++ b/src/language/languages.rs @@ -105,7 +105,7 @@ fn count_files(mut language_tuple: (&LanguageType, &mut Language)) { &mut stack, &mut quote ); - } else { + } else if language.line_comment.len() != 0 { let mut skip: u8 = 0; let window_size = language.line_comment.iter() .map(|a| a.len()) |