Skip to content

Commit

Permalink
Add a new line feed to the end of an output format
Browse files Browse the repository at this point in the history
  • Loading branch information
Luni-4 committed Oct 28, 2020
1 parent d352880 commit 634aff2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust-code-analysis-cli/src/formats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ impl Format {
} else {
serde_json::to_string(&space).unwrap()
};
write!(stdout, "{}", json_data)
write!(stdout, "{}\n", json_data)
}
Format::Toml => {
let toml_data = if pretty {
toml::to_string_pretty(&space).unwrap()
} else {
toml::to_string(&space).unwrap()
};
write!(stdout, "{}", toml_data)
write!(stdout, "{}\n", toml_data)
}
Format::Yaml => write!(stdout, "{}", serde_yaml::to_string(&space).unwrap()),
Format::Yaml => write!(stdout, "{}\n", serde_yaml::to_string(&space).unwrap()),
}
} else {
let format_ext = match self {
Expand Down

0 comments on commit 634aff2

Please sign in to comment.