1 2 3 4 5 6 7 8 9 10 11
use std::borrow::Cow; #[ctor::ctor] fn init() { console::set_colors_enabled(false); console::set_colors_enabled_stderr(false); } pub fn without_ansi(s: &str) -> Cow<'_, str> { console::strip_ansi_codes(s) }