Skip to content

Commit

Permalink
Concat -> simple push (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejhirsz authored Jun 7, 2021
1 parent 3f804de commit d5ba2bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/src/server/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ pub async fn collect_batch_response(rx: mpsc::UnboundedReceiver<String>) -> Stri
let mut buf = String::with_capacity(2048);
buf.push('[');
let mut buf = rx
.fold(buf, |mut acc, response| async {
acc = [acc, response].concat();
.fold(buf, |mut acc, response| async move {
acc.push_str(&response);
acc.push(',');
acc
})
Expand Down

0 comments on commit d5ba2bd

Please sign in to comment.