Skip to content

Commit e500690

Browse files
committed
append new line when printing in json/yaml format
1 parent a4840ec commit e500690

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/onefetch/printer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ impl<W: Write> Printer<W> {
2626
match &self.info.config.output {
2727
Some(format) => match format {
2828
SerializationFormat::Json => {
29-
write!(self.writer, "{}", serde_json::to_string_pretty(&self.info).unwrap())?
29+
writeln!(self.writer, "{}", serde_json::to_string_pretty(&self.info).unwrap())?
3030
}
3131
SerializationFormat::Yaml => {
32-
write!(self.writer, "{}", serde_yaml::to_string(&self.info).unwrap())?
32+
writeln!(self.writer, "{}", serde_yaml::to_string(&self.info).unwrap())?
3333
}
3434
},
3535
None => {

0 commit comments

Comments
 (0)