Skip to content

Commit

Permalink
refactor(rust): Workaround for rust-analyzer bug (#19134)
Browse files Browse the repository at this point in the history
  • Loading branch information
orlp authored Oct 8, 2024
1 parent 9dada18 commit 133bf47
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,11 @@ where
fn finalize(&mut self, _context: &PExecutionContext) -> PolarsResult<FinalizedSink> {
let dfs = self.pre_finalize()?;
let payload = if self.ooc_state.ooc {
let mut iot = self.ooc_state.io_thread.lock().unwrap();
// make sure that we reset the shared states
// the OOC group_by will call split as well and it should
// not send continue spilling to disk
let mut guard = self.ooc_state.io_thread.lock().unwrap();
// Type hint fixes rust-analyzer thinking .take() is an iterator method.
let iot: &mut Option<_> = &mut *guard;
// Make sure that we reset the shared states. The OOC group_by will
// call split as well and it should not send continue spilling to disk.
let iot = iot.take().unwrap();
self.ooc_state.ooc = false;

Expand Down

0 comments on commit 133bf47

Please sign in to comment.