From 6e13a4f0953fb4ebe52c30242c29dcefea3ea8a3 Mon Sep 17 00:00:00 2001 From: Jon Moroney Date: Thu, 22 Mar 2018 17:28:05 +0100 Subject: [PATCH] Increment version --- Cargo.toml | 2 +- src/main.rs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f640d4c..fb7bc5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ddh" -version = "0.9.3" +version = "0.9.4" authors = ["Jon Moroney "] [dependencies] diff --git a/src/main.rs b/src/main.rs index a87139f..990ae7f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,7 +66,7 @@ impl Hash for Fileinfo{ fn main() { let arguments = App::new("Directory Difference hTool") - .version("0.9.3") + .version("0.9.4") .author("Jon Moroney jmoroney@hawaii.edu") .about("Compare and contrast directories.\nExample invocation: ddh /home/jon/downloads /home/jon/documents -p shared") .arg(Arg::with_name("directories") @@ -138,8 +138,6 @@ fn main() { let complete_files: Vec = files_of_lengths.into_par_iter().map(|x| differentiate_and_consolidate(x.0, x.1) ).flatten().collect(); - - let (shared_files, unique_files): (Vec<&Fileinfo>, Vec<&Fileinfo>) = complete_files.par_iter().partition(|&x| x.file_paths.len()>1); //Print main output @@ -238,7 +236,7 @@ fn differentiate_and_consolidate(file_length: u64, mut files: Vec) -> } }); //Find unique elements and extend hash for similar-ish files - files.par_sort_unstable_by(|a, b| b.file_hash.cmp(&a.file_hash)); + files.par_sort_unstable_by(|a, b| b.file_hash.cmp(&a.file_hash)); //O(nlog(n)) files.dedup_by(|a, b| if a==b{ //O(n) a.hashed=true; b.hashed=true;