Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: coldWater <forsaken628@gmail.com>
  • Loading branch information
forsaken628 committed Oct 23, 2024
1 parent 3d19b30 commit bd28372
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ where
}

if let Some(block) = self.output_data.take() {
debug_assert!(matches!(self.state, State::MergeFinal | State::Finish));
assert!(matches!(self.state, State::MergeFinal | State::Finish));
self.output_block(block);
return Ok(Event::NeedConsume);
}

if matches!(self.state, State::Finish) {
debug_assert!(self.input.is_finished());
assert!(self.input.is_finished());
self.output.finish();
return Ok(Event::Finished);
}
Expand Down Expand Up @@ -179,6 +179,7 @@ where
if meta.is_none() {
// It means we get the last block.
// We can launch external merge sort now.
self.input.finish();
self.state = State::Merging;
}
self.input_data = Some(block);
Expand Down

0 comments on commit bd28372

Please sign in to comment.