fn try_prune<E>(name: &str, f: impl FnOnce() -> Result<usize, E>) -> usizewhere E: Display,
On Err logs a warn and returns 0 so the sweep continues.
Err