Stop the spinner and print a `(successful) {msg}` line in green.
(self, msg: &str)
| 142 | impl Spinner { |
| 143 | /// Stop the spinner and print a `(successful) {msg}` line in green. |
| 144 | pub fn done(self, msg: &str) { |
| 145 | // Drop stops the thread and clears the line; the result line goes right after. |
| 146 | drop(self); |
| 147 | if plain() { |
| 148 | eprintln!(" (successful) {msg}"); |
| 149 | } else { |
| 150 | eprintln!(" {} {msg}", "(successful)".green()); |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | /// Stop the spinner and print an `(unsuccessful) {msg}` line in red. |
| 155 | pub fn fail(self, msg: &str) { |