(&self, f: impl FnOnce(&mut Progress))
| 429 | } |
| 430 | |
| 431 | pub fn update(&self, f: impl FnOnce(&mut Progress)) { |
| 432 | if self.enabled() { |
| 433 | f(&mut self.state.lock().unwrap_or_else(|e| e.into_inner())); |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | pub fn finish(&mut self) { |
| 438 | self.complete = true; |