From c47d061fe650aecd7aaa6ca3afd16c345ae76786 Mon Sep 17 00:00:00 2001 From: Skye Jensen Date: Fri, 7 Aug 2020 16:25:14 -0400 Subject: [PATCH] Combine write calls in output::launch --- src/output.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output.rs b/src/output.rs index d005617..70aebff 100644 --- a/src/output.rs +++ b/src/output.rs @@ -27,8 +27,8 @@ where eprintln!("Invalid message with sender id {}", message.sender_id); continue; } - let serialized = serde_json::to_vec(&blocks).unwrap(); + let mut serialized = serde_json::to_vec(&blocks).unwrap(); + serialized.extend_from_slice(b",\n"); stdout.write_all(&serialized).await?; - stdout.write_all(b",\n").await?; } }