Merge 'Random cleanups' from Pekka Enberg

Build got pretty noisy recently, let's clean up some things.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #559
This commit is contained in:
Pekka Enberg
2024-12-27 10:56:35 +02:00
6 changed files with 8 additions and 21 deletions

View File

@@ -526,7 +526,7 @@ impl Limbo {
break;
}
Ok(StepResult::Busy) => {
self.writeln("database is busy");
let _ = self.writeln("database is busy");
break;
}
Err(err) => {
@@ -565,7 +565,7 @@ impl Limbo {
Ok(StepResult::Interrupt) => break,
Ok(StepResult::Done) => break,
Ok(StepResult::Busy) => {
self.writeln("database is busy");
let _ = self.writeln("database is busy");
break;
}
Err(err) => {
@@ -619,7 +619,7 @@ impl Limbo {
StepResult::Interrupt => break,
StepResult::Done => break,
StepResult::Busy => {
self.writeln("database is busy");
let _ = self.writeln("database is busy");
break;
}
}
@@ -676,7 +676,7 @@ impl Limbo {
StepResult::Interrupt => break,
StepResult::Done => break,
StepResult::Busy => {
self.writeln("database is busy");
let _ = self.writeln("database is busy");
break;
}
}

View File

@@ -1,4 +1,4 @@
use std::collections::{HashMap, HashSet};
use std::collections::HashMap;
use std::sync::atomic::{AtomicU32, Ordering};
use std::sync::RwLock;
use std::{cell::RefCell, rc::Rc, sync::Arc};
@@ -16,7 +16,6 @@ use crate::{Completion, Page};
use self::sqlite3_ondisk::{checksum_wal, PageContent, WAL_MAGIC_BE, WAL_MAGIC_LE};
use super::buffer_pool::BufferPool;
use super::page_cache::PageCacheKey;
use super::pager::{PageRef, Pager};
use super::sqlite3_ondisk::{self, begin_write_btree_page, WalHeader};

View File

@@ -369,7 +369,6 @@ fn update_pragma(
query_pragma("journal_mode", header, program)?;
Ok(())
}
_ => todo!("pragma `{name}`"),
}
}
@@ -396,9 +395,6 @@ fn query_pragma(
dest: register,
});
}
_ => {
todo!("pragma `{name}`");
}
}
program.emit_insn(Insn::ResultRow {

View File

@@ -1,8 +1,5 @@
use super::{
optimizer::Optimizable,
plan::{
Aggregate, BTreeTableReference, Direction, GroupBy, Plan, ResultSetColumn, SourceOperator,
},
use super::plan::{
Aggregate, BTreeTableReference, Direction, GroupBy, Plan, ResultSetColumn, SourceOperator,
};
use crate::{
function::Func,
@@ -267,7 +264,7 @@ pub fn prepare_select_plan<'a>(schema: &Schema, select: ast::Select) -> Result<P
columns,
from,
where_clause,
mut group_by,
group_by,
..
} => {
let col_count = columns.len();

View File

@@ -59,10 +59,6 @@ impl ProgramBuilder {
reg
}
pub fn next_free_register(&self) -> usize {
self.next_free_register
}
pub fn alloc_cursor_id(
&mut self,
table_identifier: Option<String>,

View File

@@ -1,5 +1,4 @@
use super::{Insn, InsnReference, OwnedValue, Program};
use crate::types::LimboText;
use std::rc::Rc;
pub fn insn_to_str(