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>>,
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user