Simplied async code

This commit is contained in:
Natty 2024-03-12 19:32:31 +01:00
parent 66ce0de3fa
commit b295c66f0c
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 2 additions and 3 deletions

View File

@ -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();