Print settings list in plain text format with colors
(settings: &[SettingInfo])
| 136 | |
| 137 | /// Print settings list in plain text format with colors |
| 138 | fn print_settings_plain(settings: &[SettingInfo]) { |
| 139 | for setting in settings { |
| 140 | println!("{}", setting.key.as_str().cyan().bold()); |
| 141 | println!(" Description: {}", setting.description); |
| 142 | match &setting.current_value { |
| 143 | Some(value) => println!(" Current: {}", value.to_string().green()), |
| 144 | None => println!(" Current: {}", "not set".dim()), |
| 145 | } |
| 146 | println!(); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | /// Print settings list in JSON or JSON Pretty format |
| 151 | fn print_settings_json(settings: &[SettingInfo], pretty: bool) -> Result<()> { |
no outgoing calls
no test coverage detected