mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-17 08:34:19 +01:00
clippy
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user