Simplied async code
This commit is contained in:
parent
66ce0de3fa
commit
b295c66f0c
|
@ -137,14 +137,13 @@ impl FederationRequestBuilder<'_> {
|
|||
tokio::pin!(sleep);
|
||||
|
||||
let body = async move {
|
||||
Ok(self
|
||||
.send_stream()
|
||||
self.send_stream()
|
||||
.await?
|
||||
.try_fold(Vec::new(), |mut acc, b| async move {
|
||||
acc.extend_from_slice(&b);
|
||||
Ok(acc)
|
||||
})
|
||||
.await?)
|
||||
.await
|
||||
}
|
||||
.fuse();
|
||||
|
||||
|
|
Loading…
Reference in New Issue