summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Power <theaaronepower@gmail.com>2016-11-27 18:13:30 +0000
committerAaron Power <theaaronepower@gmail.com>2016-11-27 18:13:30 +0000
commitbf304dd8ebb1b215776ceba221e4875ef4e3eb06 (patch)
tree9b1999eef63adfcdad2c328dea224bf1d03e1f2d
parent02c8ebe122d5d5bb47aad906e6b457ac9fef9737 (diff)
Fix for languages with no single line comments panicing4.5.2
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--cli.yml2
-rw-r--r--src/language/languages.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock
index c6a7326..f22a1f0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -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)",
diff --git a/Cargo.toml b/Cargo.toml
index bdc524f..3a15b44 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"
diff --git a/cli.yml b/cli.yml
index e59cdfc..7202bd6 100644
--- a/cli.yml
+++ b/cli.yml
@@ -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())