We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2af593 commit 3d53949Copy full SHA for 3d53949
1 file changed
src/sink/gcp_pubsub.rs
@@ -162,20 +162,16 @@ impl Sink for GcpPubsubSink {
162
.await;
163
164
// Wait for all messages to be confirmed concurrently.
165
- let futures: Vec<_> = awaiters
166
- .into_iter()
167
- .map(|awaiter| async move {
168
- awaiter.get().await.map_err(|e| {
169
- etl::etl_error!(
170
- etl::error::ErrorKind::DestinationError,
171
- "Failed to publish message to Pub/Sub",
172
- e.to_string()
173
- )
174
- })
+ try_join_all(awaiters.into_iter().map(|awaiter| async move {
+ awaiter.get().await.map_err(|e| {
+ etl::etl_error!(
+ etl::error::ErrorKind::DestinationError,
+ "Failed to publish message to Pub/Sub",
+ e.to_string()
+ )
175
})
176
- .collect();
177
-
178
- try_join_all(futures).await?;
+ }))
+ .await?;
179
180
Ok(())
181
}
0 commit comments