Print a step completion message like "[2/5] Done ✓", overwriting the previous step indicator printed by [`print_step`] in-place, and then move to the next line.
(step: usize, total: usize, msg: &str)
| 96 | /// Print a step completion message like "[2/5] Done ✓", overwriting the previous step |
| 97 | /// indicator printed by [`print_step`] in-place, and then move to the next line. |
| 98 | pub fn print_step_done(step: usize, total: usize, msg: &str) { |
| 99 | let prefix = success_style().apply_to(format!("[{step}/{total}]")); |
| 100 | let check = success_style().apply_to("✓"); |
| 101 | // Clear the current line, print the done message, and move to next line |
| 102 | println!("\r\x1b[2K{prefix} {msg} {check}"); |
| 103 | } |
| 104 | |
| 105 | /// Print a noticeable callout box with a title and body lines. |
| 106 | /// |