remove unwraps
This commit is contained in:
parent
e792f1fce1
commit
86a5d5f932
@ -38,7 +38,10 @@ impl Comparer for CompareMode {
|
||||
Some(r) => { r }
|
||||
};
|
||||
|
||||
let results = compare_snapshots(self.left.clone(), self.right.clone()).unwrap();
|
||||
let results = match compare_snapshots(self.left.clone(), self.right.clone()) {
|
||||
Some(x) => x,
|
||||
None => panic!("Error Comparing Snapshot"),
|
||||
};
|
||||
self.results = results.1;
|
||||
self.result_type = results.0;
|
||||
|
||||
|
@ -30,7 +30,9 @@ impl Comparer for CreateMode {
|
||||
fn run(&mut self) {
|
||||
let snapshot = create_snapshot(self.root_path.as_str(), BLAKE3, vec![]);
|
||||
self.snapshot = snapshot.clone();
|
||||
println!("Total FileHash Entries {}", snapshot.file_hashes.lock().unwrap().len());
|
||||
if let Ok(e) = snapshot.file_hashes.lock() {
|
||||
println!("Total FileHash Entries {}", e.len());
|
||||
}
|
||||
let _ = export_snapshot(self.snapshot.clone(), self.snapshot_path.clone(), true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user