Skip to content

Commit

Permalink
style: fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag committed Feb 18, 2024
1 parent afe7472 commit 82416f2
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/mito2/src/memtable/merge_tree/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,15 @@ impl Iterator for Iter {
type Item = Result<DataBatch>;

fn next(&mut self) -> Option<Self::Item> {
while let Some(mut top) = self.heap.pop() {
let top_batch = top.source.current_batch();
if let Err(e) = top.source.next() {
return Some(Err(e));
}
if top.source.is_valid() {
self.heap.push(top);
}
return Some(Ok(top_batch));
let mut top = self.heap.pop()?;
let top_batch = top.source.current_batch();
if let Err(e) = top.source.next() {
return Some(Err(e));
}
if top.source.is_valid() {
self.heap.push(top);
}
None
Some(Ok(top_batch))
}
}

Expand Down

0 comments on commit 82416f2

Please sign in to comment.