core: silence some unused warnings when building without default features

This commit is contained in:
Jorge López
2025-02-09 01:13:12 +01:00
parent c07c08aa98
commit 83b158fb3a
5 changed files with 9 additions and 1 deletions

View File

@@ -153,6 +153,7 @@ impl Database {
}
pub fn register_builtins(&self) -> Result<(), String> {
#[allow(unused_variables)]
let ext_api = self.build_limbo_ext();
#[cfg(feature = "uuid")]
if unsafe { !limbo_uuid::register_extension_static(&ext_api).is_ok() } {

View File

@@ -166,14 +166,17 @@ impl Buffer {
cfg_block! {
#[cfg(all(target_os = "linux", feature = "io_uring"))] {
mod io_uring;
#[cfg(feature = "fs")]
pub use io_uring::UringIO;
mod unix;
#[cfg(feature = "fs")]
pub use unix::UnixIO;
pub use io_uring::UringIO as PlatformIO;
}
#[cfg(any(all(target_os = "linux",not(feature = "io_uring")), target_os = "macos"))] {
mod unix;
#[cfg(feature = "fs")]
pub use unix::UnixIO;
pub use unix::UnixIO as PlatformIO;
}

View File

@@ -22,6 +22,7 @@ pub struct UnixIO {
}
impl UnixIO {
#[cfg(feature = "fs")]
pub fn new() -> Result<Self> {
debug!("Using IO backend 'syscall'");
Ok(Self {

View File

@@ -1,4 +1,6 @@
use crate::{error::LimboError, io::Completion, Buffer, Result};
#[cfg(feature = "fs")]
use crate::error::LimboError;
use crate::{io::Completion, Buffer, Result};
use std::{cell::RefCell, rc::Rc};
/// DatabaseStorage is an interface a database file that consists of pages.

View File

@@ -159,6 +159,7 @@ macro_rules! expect_arguments_min {
}};
}
#[allow(unused_macros)]
macro_rules! expect_arguments_even {
(
$args:expr,