mirror of
https://github.com/XAMPPRocky/tokei
synced 2024-10-05 23:39:28 +00:00
fixes #39
This commit is contained in:
parent
2b1bfa9f7d
commit
f65a8c9825
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -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)",
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue