Combine write calls in output::launch

This commit is contained in:
Skye Jensen 2020-08-07 16:25:14 -04:00
parent ce0ceba2f2
commit c47d061fe6

View file

@ -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?;
}
}