Use futures::future::try_join_all

This commit is contained in:
calinanca99
2024-02-13 17:27:44 +01:00
parent 863e26d29a
commit 1c64de709d

View File

@@ -154,9 +154,7 @@ struct JoinOnDrop(Vec<tokio::task::JoinHandle<()>>);
impl JoinOnDrop {
/// Checks all the futures for panics.
pub async fn join_all(self) {
for handle in self.0 {
handle.await.unwrap()
}
futures::future::try_join_all(self.0).await.unwrap();
}
}