Skip to content

Commit 3ec7448

Browse files
committed
Explain use of std::mem::replace
1 parent 3d6a204 commit 3ec7448

File tree

1 file changed

+2
-0
lines changed
  • parquet/src/arrow/async_reader

1 file changed

+2
-0
lines changed

parquet/src/arrow/async_reader/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ where
653653
/// - `Ok(Some(reader))` which holds all the data for the row group.
654654
pub async fn next_row_group(&mut self) -> Result<Option<ParquetRecordBatchReader>> {
655655
loop {
656+
// Take ownership of request state to process, leaving self in a
657+
// valid state
656658
let request_state = std::mem::replace(&mut self.request_state, RequestState::Done);
657659
match request_state {
658660
// No outstanding requests, proceed to setup next row group

0 commit comments

Comments
 (0)