(msg: impl Into<Cow<'static, str>>)
| 8 | |
| 9 | impl Progress { |
| 10 | pub fn start(msg: impl Into<Cow<'static, str>>) -> Progress { |
| 11 | let bar = if is_stdout_tty() { |
| 12 | Some(show_progress(msg)) |
| 13 | } else { |
| 14 | println!("▹▹▹▹▹ {}", msg.into()); |
| 15 | None |
| 16 | }; |
| 17 | Progress { bar } |
| 18 | } |
| 19 | |
| 20 | pub fn finish(&self, msg: &str) { |
| 21 | if let Some(bar) = &self.bar { |
no test coverage detected