Add information output to BM-remove
This commit is contained in:
parent
522f1dccff
commit
4c95e403e9
1 changed files with 13 additions and 7 deletions
|
@ -143,15 +143,21 @@ impl<'a> BM<'a> {
|
|||
let f = file.deref().borrow();
|
||||
self.rt.store().remove(f.id().clone())
|
||||
})
|
||||
.all(|x| x);
|
||||
.fold((0, 0), |acc, succeeded| {
|
||||
let (worked, failed) = acc;
|
||||
if succeeded {
|
||||
(worked + 1, failed)
|
||||
} else {
|
||||
(worked, failed + 1)
|
||||
}
|
||||
});
|
||||
|
||||
if result {
|
||||
info!("Removing succeeded");
|
||||
} else {
|
||||
info!("Removing failed");
|
||||
}
|
||||
let (worked, failed) = result;
|
||||
|
||||
return result;
|
||||
info!("Removing succeeded for {} files", worked);
|
||||
info!("Removing failed for {} files", failed);
|
||||
|
||||
return failed == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue