(format: Option<&OutputFormat>, info: impl Serialize)
| 116 | } |
| 117 | |
| 118 | fn print_config(format: Option<&OutputFormat>, info: impl Serialize) -> Result<()> { |
| 119 | match format { |
| 120 | Some(OutputFormat::Json) => { |
| 121 | serde_json::to_writer_pretty(std::io::stdout(), &info).into_diagnostic() |
| 122 | } |
| 123 | _ => serde_yml::to_writer(std::io::stdout(), &info).into_diagnostic(), |
| 124 | } |
| 125 | } |