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();
|
let f = file.deref().borrow();
|
||||||
self.rt.store().remove(f.id().clone())
|
self.rt.store().remove(f.id().clone())
|
||||||
})
|
})
|
||||||
.all(|x| x);
|
.fold((0, 0), |acc, succeeded| {
|
||||||
|
let (worked, failed) = acc;
|
||||||
if result {
|
if succeeded {
|
||||||
info!("Removing succeeded");
|
(worked + 1, failed)
|
||||||
} else {
|
} else {
|
||||||
info!("Removing failed");
|
(worked, failed + 1)
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return result;
|
let (worked, failed) = result;
|
||||||
|
|
||||||
|
info!("Removing succeeded for {} files", worked);
|
||||||
|
info!("Removing failed for {} files", failed);
|
||||||
|
|
||||||
|
return failed == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue