(text: &str)
| 192 | } |
| 193 | |
| 194 | fn strip_ansi(text: &str) -> String { |
| 195 | let mut output = String::with_capacity(text.len()); |
| 196 | let mut chars = text.chars(); |
| 197 | while let Some(c) = chars.next() { |
| 198 | if c == '\x1b' { |
| 199 | for escape in chars.by_ref() { |
| 200 | if escape == 'm' { |
| 201 | break; |
| 202 | } |
| 203 | } |
| 204 | } else { |
| 205 | output.push(c); |
| 206 | } |
| 207 | } |
| 208 | output |
| 209 | } |
| 210 | |
| 211 | fn output_text(output: &Output) -> String { |
| 212 | format!( |
no test coverage detected