1 2 3 4 5 6 7 8
use termcolor::Color; pub fn get_option<T>(option: &Option<T>) -> (String, Option<Color>) { match option { Some(_) => ("Enabled".to_string(), Some(Color::Green)), None => ("Disabled".to_string(), Some(Color::Yellow)), } }