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