From 543a25599ce67d6e2d8da3c2e4eba18fd0df14d4 Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Sun, 24 Dec 2023 13:31:46 +0100 Subject: [PATCH] Simplify the feature gates for `stor` commands (#11416) All of them depend on feature `sqlite` so just conditionally `use` the parent module. --- crates/nu-command/src/lib.rs | 1 + crates/nu-command/src/stor/mod.rs | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/crates/nu-command/src/lib.rs b/crates/nu-command/src/lib.rs index 44be17a87..c7376cdd1 100644 --- a/crates/nu-command/src/lib.rs +++ b/crates/nu-command/src/lib.rs @@ -23,6 +23,7 @@ mod random; mod removed; mod shells; mod sort_utils; +#[cfg(feature = "sqlite")] mod stor; mod strings; mod system; diff --git a/crates/nu-command/src/stor/mod.rs b/crates/nu-command/src/stor/mod.rs index 83da124ba..0f56618ce 100644 --- a/crates/nu-command/src/stor/mod.rs +++ b/crates/nu-command/src/stor/mod.rs @@ -1,35 +1,19 @@ -#[cfg(feature = "sqlite")] mod create; -#[cfg(feature = "sqlite")] mod delete; -#[cfg(feature = "sqlite")] mod export; -#[cfg(feature = "sqlite")] mod import; -#[cfg(feature = "sqlite")] mod insert; -#[cfg(feature = "sqlite")] mod open; -#[cfg(feature = "sqlite")] mod reset; mod stor_; -#[cfg(feature = "sqlite")] mod update; -#[cfg(feature = "sqlite")] pub use create::StorCreate; -#[cfg(feature = "sqlite")] pub use delete::StorDelete; -#[cfg(feature = "sqlite")] pub use export::StorExport; -#[cfg(feature = "sqlite")] pub use import::StorImport; -#[cfg(feature = "sqlite")] pub use insert::StorInsert; -#[cfg(feature = "sqlite")] pub use open::StorOpen; -#[cfg(feature = "sqlite")] pub use reset::StorReset; pub use stor_::Stor; -#[cfg(feature = "sqlite")] pub use update::StorUpdate;