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