(
mut stream: std::pin::Pin<
Box<dyn futures_core::Stream<Item = Result<pb::DiffChunk, Status>> + Send>,
>,
)
| 510 | /// would fork the error surface. |
| 511 | #[allow(clippy::result_large_err)] |
| 512 | async fn collect_chunks( |
| 513 | mut stream: std::pin::Pin< |
| 514 | Box<dyn futures_core::Stream<Item = Result<pb::DiffChunk, Status>> + Send>, |
| 515 | >, |
| 516 | ) -> Result<Vec<pb::DiffChunk>, Status> { |
| 517 | let mut chunks = Vec::new(); |
| 518 | while let Some(chunk) = tokio_stream::StreamExt::next(&mut stream).await { |
| 519 | chunks.push(chunk?); |
| 520 | } |
| 521 | Ok(chunks) |
| 522 | } |
| 523 | |
| 524 | /// Collect a reactor client's tonic streaming response (same `Status` |
| 525 | /// error surface as every reactor call). |
no test coverage detected