diff --git a/Cargo.lock b/Cargo.lock index 440fcd7..a5ca6d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "tokei" -version = "2.0.0" +version = "2.1.1" dependencies = [ "clap 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 653d15b..21f2643 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,8 +14,8 @@ build = "build.rs" # For building serde in stable. [build-dependencies] -serde_codegen = "0.10.0" -syntex = "0.7.5" +serde_codegen = "0.7.5" +syntex = "0.32.0" # Dependencies, and why they are used. # - Clap: For CLI argument parsing. diff --git a/src/stats.rs b/src/stats.rs index fe972f2..18e3e2d 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -19,7 +19,11 @@ impl Stats { impl fmt::Display for Stats { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = if self.name.len() > 24 { + let name_length = self.name.len(); + + let name = if name_length == 25 { + self.name.clone() + } else if self.name.len() > 24 { let mut name = String::from("|"); name.push_str(&self.name[self.name.len() - 24..]); name