This commit is contained in:
jamesk 2024-03-18 18:37:17 -04:00
parent 16cc0dc1ba
commit 71b9555d6b
3 changed files with 5 additions and 5 deletions

View File

@ -37,6 +37,6 @@ impl Comparer for CompareMode {
let results = compare_snapshots(self.left.clone(), self.right.clone()).unwrap();
self.results = results.1;
self.result_type = results.0;
println!("Result: {:?}", results.1)
println!("Result: {:?}", self.results);
}
}

View File

@ -21,7 +21,7 @@ impl CreateMode {
}
impl Comparer for CreateMode {
fn run(&self) {
fn run(&mut self) {
let snapshot = create_snapshot(self.in_path.as_str(), BLAKE3);
println!("Total FileHash Entries {}", snapshot.file_hashes.lock().unwrap().len());
let _ = export_snapshot(snapshot, self.out_path.clone());

View File

@ -33,7 +33,7 @@ impl SysCompareApp {
None => {panic!("Missing output path as third argument")}
Some(r) => {not_empty(r)}
};
let create = CreateMode::new(self.args.clone(), in_path.clone(), out_path.clone());
let mut create = CreateMode::new(self.args.clone(), in_path.clone(), out_path.clone());
create.run()
}
SysCompareMode::Compare => {
@ -46,7 +46,7 @@ impl SysCompareApp {
Some(r) => {not_empty(r)}
};
let compare = CompareMode::new(self.args.clone(), left, right);
let mut compare = CompareMode::new(self.args.clone(), left, right);
compare.run()
}
}
@ -68,5 +68,5 @@ impl Default for SysCompareApp {
}
pub trait Comparer {
fn run(&self);
fn run(&mut self);
}