From 2183d4ee18fafe55e9c12e83076f5a1714991e7e Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Wed, 28 Oct 2020 17:25:58 +0100 Subject: [PATCH] Add a new line feed to the end of an output format --- rust-code-analysis-cli/src/formats.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust-code-analysis-cli/src/formats.rs b/rust-code-analysis-cli/src/formats.rs index 6a8bcf7f3..86b6667c8 100644 --- a/rust-code-analysis-cli/src/formats.rs +++ b/rust-code-analysis-cli/src/formats.rs @@ -42,7 +42,7 @@ impl Format { } else { serde_json::to_string(&space).unwrap() }; - write!(stdout, "{}", json_data) + writeln!(stdout, "{}", json_data) } Format::Toml => { let toml_data = if pretty { @@ -50,9 +50,9 @@ impl Format { } else { toml::to_string(&space).unwrap() }; - write!(stdout, "{}", toml_data) + writeln!(stdout, "{}", toml_data) } - Format::Yaml => write!(stdout, "{}", serde_yaml::to_string(&space).unwrap()), + Format::Yaml => writeln!(stdout, "{}", serde_yaml::to_string(&space).unwrap()), } } else { let format_ext = match self {