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>>,
}
impl PseudoCursor {
pub fn new() -> Self {
impl Default for PseudoCursor {
fn default() -> Self {
Self {
record_cursor: RecordCursor::new(),
current: RefCell::new(None),
}
}
}
impl PseudoCursor {
pub fn record(&self) -> Ref<Option<ImmutableRecord>> {
self.current.borrow()
}

View File

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

View File

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