mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-23 19:24:19 +01:00
Add clippy CI, fix or ignore warnings where appropriate
This commit is contained in:
@@ -67,7 +67,7 @@ pub struct sqlite3_stmt<'a> {
|
||||
pub(crate) row: RefCell<Option<limbo_core::Row<'a>>>,
|
||||
}
|
||||
|
||||
impl<'a> sqlite3_stmt<'a> {
|
||||
impl sqlite3_stmt<'_> {
|
||||
pub fn new(stmt: limbo_core::Statement) -> Self {
|
||||
let row = RefCell::new(None);
|
||||
Self { stmt, row }
|
||||
@@ -998,9 +998,7 @@ pub unsafe extern "C" fn sqlite3_threadsafe() -> ffi::c_int {
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn sqlite3_libversion() -> *const std::ffi::c_char {
|
||||
ffi::CStr::from_bytes_with_nul(b"3.42.0\0")
|
||||
.unwrap()
|
||||
.as_ptr()
|
||||
c"3.42.0".as_ptr()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
@@ -1094,7 +1092,7 @@ pub unsafe extern "C" fn sqlite3_wal_checkpoint_v2(
|
||||
}
|
||||
let db: &mut sqlite3 = &mut *db;
|
||||
// TODO: Checkpointing modes and reporting back log size and checkpoint count to caller.
|
||||
if let Err(e) = db.conn.checkpoint() {
|
||||
if db.conn.checkpoint().is_err() {
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
SQLITE_OK
|
||||
|
||||
Reference in New Issue
Block a user