Skip to content

Commit

Permalink
favor replace
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 committed Feb 14, 2024
1 parent dbe9fd7 commit e1106d6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/daft-scan/src/scan_task_iters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ impl Iterator for MergeByFileSize {
};

if next_item.size_bytes().is_none() || !self.can_merge(&next_item) {
let curr_acc = self.accumulator.take().map(Ok);
self.accumulator = Some(next_item);
return curr_acc;
return self.accumulator.replace(next_item).map(Ok);
}

self.accumulator = Some(Arc::new(
Expand Down

0 comments on commit e1106d6

Please sign in to comment.