Print the document to stdout.
(document: &JsonDiff)
| 223 | |
| 224 | /// Print the document to stdout. |
| 225 | pub(super) fn print_json(document: &JsonDiff) -> CliResult<()> { |
| 226 | let rendered = |
| 227 | serde_json::to_string_pretty(document).map_err(|e| CliError::Internal(e.into()))?; |
| 228 | println!("{rendered}"); |
| 229 | Ok(()) |
| 230 | } |
| 231 | |
| 232 | #[cfg(test)] |
| 233 | mod tests { |
no outgoing calls
no test coverage detected