fickle 0.3.0

Tools for handling fickle (flaky) tests in rust.
Documentation
use colored::Colorize;

pub(crate) enum Pretty {
    Success,
    Warning,
    Error,
}

impl Pretty {
    pub(crate) fn print<T: ToString>(&self, msg: T) {
        let string = msg.to_string();
        let formatted = match self {
            Pretty::Success => string.green(),
            Pretty::Warning => string.yellow(),
            Pretty::Error => string.red(),
        };
        println!("{}", formatted)
    }
}