mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-09 10:14:21 +01:00
Remove unused imports and consolidate ordering comparison
This commit is contained in:
@@ -2017,6 +2017,8 @@ impl BTreeCursor {
|
||||
{
|
||||
BTreeCell::IndexInteriorCell(IndexInteriorCell { payload, .. })
|
||||
| BTreeCell::IndexLeafCell(IndexLeafCell { payload, .. }) => {
|
||||
// TODO: implement efficient comparison of records
|
||||
// e.g. https://github.com/sqlite/sqlite/blob/master/src/vdbeaux.c#L4719
|
||||
read_record(
|
||||
payload,
|
||||
self.get_immutable_record_or_create().as_mut().unwrap(),
|
||||
@@ -2027,10 +2029,7 @@ impl BTreeCursor {
|
||||
self.get_immutable_record().as_ref().unwrap().get_values(),
|
||||
);
|
||||
match order {
|
||||
Ordering::Less => {
|
||||
break;
|
||||
}
|
||||
Ordering::Equal => {
|
||||
Ordering::Less | Ordering::Equal => {
|
||||
break;
|
||||
}
|
||||
Ordering::Greater => {}
|
||||
@@ -2044,7 +2043,7 @@ impl BTreeCursor {
|
||||
}
|
||||
|
||||
pub fn seek_end(&mut self) -> Result<CursorResult<()>> {
|
||||
assert!(self.mv_cursor.is_none());
|
||||
assert!(self.mv_cursor.is_none()); // unsure about this -_-
|
||||
self.move_to_root();
|
||||
loop {
|
||||
let mem_page = self.stack.top();
|
||||
|
||||
@@ -7,7 +7,6 @@ use crate::translate::ProgramBuilderOpts;
|
||||
use crate::translate::QueryMode;
|
||||
use crate::util::PRIMARY_KEY_AUTOMATIC_INDEX_NAME_PREFIX;
|
||||
use crate::vdbe::builder::CursorType;
|
||||
use crate::vdbe::insn::RegisterOrLiteral;
|
||||
use crate::vdbe::insn::{CmpInsFlags, Insn};
|
||||
use crate::LimboError;
|
||||
use crate::{bail_parse_error, Result};
|
||||
|
||||
Reference in New Issue
Block a user