diff --git a/core/ext/mod.rs b/core/ext/mod.rs index 52761741b..7e5cb375a 100644 --- a/core/ext/mod.rs +++ b/core/ext/mod.rs @@ -4,9 +4,11 @@ mod vtab_xconnect; use crate::schema::{Schema, Table}; #[cfg(all(target_os = "linux", feature = "io_uring"))] use crate::UringIO; -use crate::{function::ExternalFunc, Connection, Database, LimboError, IO}; +use crate::{function::ExternalFunc, Connection, Database}; use crate::{vtab::VirtualTable, SymbolTable}; #[cfg(feature = "fs")] +use crate::{LimboError, IO}; +#[cfg(feature = "fs")] pub use dynamic::{add_builtin_vfs_extensions, add_vfs_module, list_vfs_modules, VfsMod}; use std::{ ffi::{c_char, c_void, CStr, CString}, @@ -168,6 +170,7 @@ impl Database { syms, schema: schema_mutex_ptr as *mut c_void, })); + #[allow(unused)] let mut ext_api = ExtensionApi { ctx: ctx as *mut c_void, register_scalar_function, diff --git a/core/io/unix.rs b/core/io/unix.rs index d15a23a53..c07285bc9 100644 --- a/core/io/unix.rs +++ b/core/io/unix.rs @@ -16,7 +16,9 @@ use std::{ }; use std::{io::ErrorKind, sync::Arc}; -use tracing::{debug, instrument, trace, Level}; +#[cfg(feature = "fs")] +use tracing::debug; +use tracing::{instrument, trace, Level}; struct OwnedCallbacks(UnsafeCell); // We assume we locking on IO level is done by user. @@ -25,6 +27,7 @@ unsafe impl Sync for OwnedCallbacks {} struct BorrowedCallbacks<'io>(UnsafeCell<&'io mut Callbacks>); impl OwnedCallbacks { + #[allow(dead_code)] fn new() -> Self { Self(UnsafeCell::new(Callbacks::new())) } @@ -57,6 +60,7 @@ impl BorrowedCallbacks<'_> { struct EventsHandler(UnsafeCell); impl EventsHandler { + #[allow(dead_code)] fn new() -> Self { Self(UnsafeCell::new(Events::new())) } @@ -87,6 +91,7 @@ impl BorrowedPollHandler<'_> { } impl PollHandler { + #[allow(dead_code)] fn new() -> Self { Self(UnsafeCell::new(Poller::new().unwrap())) } diff --git a/core/lib.rs b/core/lib.rs index 946898db8..e1b5c0491 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -45,6 +45,7 @@ use crate::storage::sqlite3_ondisk::is_valid_page_size; use crate::storage::{header_accessor, wal::DummyWAL}; use crate::translate::optimizer::optimize_plan; use crate::translate::pragma::TURSO_CDC_DEFAULT_TABLE_NAME; +#[cfg(feature = "fs")] use crate::util::{OpenMode, OpenOptions}; use crate::vtab::VirtualTable; use core::str; @@ -935,6 +936,7 @@ impl Connection { } pub fn list_vfs(&self) -> Vec { + #[allow(unused_mut)] let mut all_vfs = vec![String::from("memory")]; #[cfg(feature = "fs")] { diff --git a/core/util.rs b/core/util.rs index 4e485d7d6..d6df82059 100644 --- a/core/util.rs +++ b/core/util.rs @@ -1,3 +1,4 @@ +#![allow(unused)] use crate::translate::expr::WalkControl; use crate::types::IOResult; use crate::IO; diff --git a/core/vdbe/execute.rs b/core/vdbe/execute.rs index ef9aa97ad..855658201 100644 --- a/core/vdbe/execute.rs +++ b/core/vdbe/execute.rs @@ -89,9 +89,10 @@ use crate::{ }; use super::{make_record, Program, ProgramState, Register}; -use crate::{ - bail_constraint_error, must_be_btree_cursor, resolve_ext_path, MvStore, Pager, Result, -}; + +#[cfg(feature = "fs")] +use crate::resolve_ext_path; +use crate::{bail_constraint_error, must_be_btree_cursor, MvStore, Pager, Result}; macro_rules! return_if_io { ($expr:expr) => {