(&mut self)
| 2820 | |
| 2821 | impl Drop for SlowImportProgress { |
| 2822 | fn drop(&mut self) { |
| 2823 | // Any early return — an error return, a `?`, or a panic unwind — |
| 2824 | // closes the heartbeat channel so the spinner thread stops instead of |
| 2825 | // spinning on a disconnected channel (review CB-9C R7). |
| 2826 | if let Some(done) = self.done.take() { |
| 2827 | let _ = done.send(()); |
| 2828 | } |
| 2829 | if let Some(handle) = self.handle.take() { |
| 2830 | let _ = handle.join(); |
| 2831 | } |
| 2832 | } |
| 2833 | } |
| 2834 | |
| 2835 | fn truncate_for_progress(input: &str, max_chars: usize) -> String { |
nothing calls this directly
no outgoing calls
no test coverage detected