mirror of
https://github.com/sreedevk/deduplicator.git
synced 2026-08-31 20:45:34 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a7ac7a332 | ||
|
|
51521f1641 | ||
|
|
b23db06847 |
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -269,7 +269,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deduplicator"
|
name = "deduplicator"
|
||||||
version = "0.0.1"
|
version = "0.0.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "deduplicator"
|
name = "deduplicator"
|
||||||
version = "0.0.2"
|
version = "0.0.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "find,filter,delete Duplicates"
|
description = "find,filter,delete Duplicates"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ use crate::params::Params;
|
|||||||
|
|
||||||
fn format_path(path: &String, opts: &Params) -> String {
|
fn format_path(path: &String, opts: &Params) -> String {
|
||||||
let display_path = path.replace(&opts.get_directory().unwrap(), "");
|
let display_path = path.replace(&opts.get_directory().unwrap(), "");
|
||||||
let display_range = if display_path.len() > 32 {
|
let text_vec = display_path.chars().collect::<Vec<_>>();
|
||||||
&display_path[(display_path.len() - 32)..]
|
|
||||||
|
let display_range = if text_vec.len() > 32 {
|
||||||
|
text_vec[(display_path.len() - 32)..].into_iter().collect::<String>()
|
||||||
} else {
|
} else {
|
||||||
&display_path[..]
|
display_path
|
||||||
};
|
};
|
||||||
|
|
||||||
format!("...{}", display_range)
|
format!("...{}", display_range)
|
||||||
|
|||||||
Reference in New Issue
Block a user