Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxa21 committed Jun 11, 2024
1 parent a86f026 commit 6efaa23
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/storage/src/table/batch_table/storage_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,13 +648,9 @@ impl<S: StateStore, SD: ValueRowSerde> StorageTableInner<S, SD> {
let row_count = 0;
Ok(stream::unfold(
Some((Box::pin(iter), builders, row_count, self.schema.clone())),
move |state| async move {
if state.is_none() {
// Already reached end or met error
// We will only reach here after condition 2 or 3 below is met
return None;
}
let (mut iter, mut builders, mut row_count, schema) = state.unwrap();
move |mut state| async move {
// When state is None, that means we already reached end or met error (condition 2 or 3 below)
let (mut iter, mut builders, mut row_count, schema) = state.take()?;
match iter.next().await {
Some(Ok(row)) => {
// 1. the row stream returns a valid row
Expand Down

0 comments on commit 6efaa23

Please sign in to comment.