#[cfg(feature = "colored")]
pub use colored::Colorize;
#[cfg(not(feature = "colored"))]
pub trait Colorize {
fn bold(self) -> String;
fn green(self) -> String;
fn red(self) -> String;
fn yellow(self) -> String;
fn cyan(self) -> String;
fn dimmed(self) -> String;
}
#[cfg(not(feature = "colored"))]
impl<'a> Colorize for &'a str {
fn bold(self) -> String {
self.to_string()
}
fn green(self) -> String {
self.to_string()
}
fn red(self) -> String {
self.to_string()
}
fn yellow(self) -> String {
self.to_string()
}
fn cyan(self) -> String {
self.to_string()
}
fn dimmed(self) -> String {
self.to_string()
}
}
#[cfg(not(feature = "colored"))]
impl Colorize for String {
fn bold(self) -> String {
self
}
fn green(self) -> String {
self
}
fn red(self) -> String {
self
}
fn yellow(self) -> String {
self
}
fn cyan(self) -> String {
self
}
fn dimmed(self) -> String {
self
}
}