diff --git a/src/io/ipc/read/stream_async.rs b/src/io/ipc/read/stream_async.rs index 9e054cd07ce..bd10ada166d 100644 --- a/src/io/ipc/read/stream_async.rs +++ b/src/io/ipc/read/stream_async.rs @@ -153,12 +153,12 @@ async fn maybe_next( } /// A [`Stream`] over an Arrow IPC stream that asynchronously yields [`Chunk`]s. -pub struct AsyncStreamReader { +pub struct AsyncStreamReader<'a, R: AsyncRead + Unpin + Send + 'a> { metadata: StreamMetadata, - future: Option>>>>, + future: Option>>>>, } -impl AsyncStreamReader { +impl<'a, R: AsyncRead + Unpin + Send + 'a> AsyncStreamReader<'a, R> { /// Creates a new [`AsyncStreamReader`] pub fn new(reader: R, metadata: StreamMetadata) -> Self { let state = ReadState { @@ -178,7 +178,7 @@ impl AsyncStreamReader { } } -impl Stream for AsyncStreamReader { +impl<'a, R: AsyncRead + Unpin + Send> Stream for AsyncStreamReader<'a, R> { type Item = Result>>; fn poll_next(