3 Commits
0.0.2 ... 0.0.3

Author SHA1 Message Date
sreedev
3a7ac7a332 version 0.0.3 2023-01-07 07:04:03 -05:00
Sreedev Kodichath
51521f1641 Merge pull request #5 from sreedevk/v003
Version 0.0.3
2023-01-07 07:02:40 -05:00
sreedev
b23db06847 fix: cyrillic characters output fix 2023-01-07 07:01:29 -05:00
3 changed files with 7 additions and 5 deletions

2
Cargo.lock generated
View File

@@ -269,7 +269,7 @@ dependencies = [
[[package]]
name = "deduplicator"
version = "0.0.1"
version = "0.0.3"
dependencies = [
"anyhow",
"chrono",

View File

@@ -1,6 +1,6 @@
[package]
name = "deduplicator"
version = "0.0.2"
version = "0.0.3"
edition = "2021"
description = "find,filter,delete Duplicates"
license = "MIT"

View File

@@ -8,10 +8,12 @@ use crate::params::Params;
fn format_path(path: &String, opts: &Params) -> String {
let display_path = path.replace(&opts.get_directory().unwrap(), "");
let display_range = if display_path.len() > 32 {
&display_path[(display_path.len() - 32)..]
let text_vec = display_path.chars().collect::<Vec<_>>();
let display_range = if text_vec.len() > 32 {
text_vec[(display_path.len() - 32)..].into_iter().collect::<String>()
} else {
&display_path[..]
display_path
};
format!("...{}", display_range)