This commit is contained in:
Jussi Saurio
2025-10-09 19:00:40 +03:00
parent 27a88b86dc
commit edf40cc65b
3 changed files with 7 additions and 6 deletions

View File

@@ -10,14 +10,16 @@ pub struct PseudoCursor {
current: RefCell<Option<ImmutableRecord>>, current: RefCell<Option<ImmutableRecord>>,
} }
impl PseudoCursor { impl Default for PseudoCursor {
pub fn new() -> Self { fn default() -> Self {
Self { Self {
record_cursor: RecordCursor::new(), record_cursor: RecordCursor::new(),
current: RefCell::new(None), current: RefCell::new(None),
} }
} }
}
impl PseudoCursor {
pub fn record(&self) -> Ref<Option<ImmutableRecord>> { pub fn record(&self) -> Ref<Option<ImmutableRecord>> {
self.current.borrow() self.current.borrow()
} }

View File

@@ -1389,7 +1389,7 @@ pub fn op_open_pseudo(
); );
{ {
let cursors = &mut state.cursors; let cursors = &mut state.cursors;
let cursor = PseudoCursor::new(); let cursor = PseudoCursor::default();
cursors cursors
.get_mut(*cursor_id) .get_mut(*cursor_id)
.unwrap() .unwrap()

View File

@@ -280,9 +280,8 @@ impl Sorter {
// TODO: blocking will be unnecessary here with IO completions // TODO: blocking will be unnecessary here with IO completions
let mut completions = vec![]; let mut completions = vec![];
for chunk_idx in 0..self.chunks.len() { for chunk_idx in 0..self.chunks.len() {
match self.push_to_chunk_heap(chunk_idx)? { if let Some(c) = self.push_to_chunk_heap(chunk_idx)? {
Some(c) => completions.push(c), completions.push(c);
None => (),
}; };
} }
self.init_chunk_heap_state = InitChunkHeapState::Start; self.init_chunk_heap_state = InitChunkHeapState::Start;