From 701922c3f0f16c6baab89edf2abcb2edb886a475 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sat, 6 May 2023 11:38:10 +0200 Subject: [PATCH] Fix features --- Cargo.toml | 9 +++++---- src/library/beets/executor.rs | 2 +- src/library/mod.rs | 1 + tests/library/mod.rs | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 89d1b95..4ef252b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,14 +21,15 @@ once_cell = "1.17.1" tempfile = "3.5.0" [features] -bin = ["structopt"] +default = ["database-json", "library-beets"] database-json = ["serde_json"] -library-ssh = ["openssh", "tokio"] -tui = ["crossterm", "ratatui"] +library-beets = [] +ssh-library = ["openssh", "tokio"] +tui = ["structopt", "crossterm", "ratatui"] [[bin]] name = "musichoard" -required-features = ["bin", "database-json", "library-ssh", "tui"] +required-features = ["database-json", "library-beets", "ssh-library", "tui"] [package.metadata.docs.rs] all-features = true diff --git a/src/library/beets/executor.rs b/src/library/beets/executor.rs index b1de79f..7d177b9 100644 --- a/src/library/beets/executor.rs +++ b/src/library/beets/executor.rs @@ -74,7 +74,7 @@ impl BeetsLibraryExecutor for BeetsLibraryProcessExecutor { impl BeetsLibraryExecutorPrivate for BeetsLibraryProcessExecutor {} // GRCOV_EXCL_START -#[cfg(feature = "library-ssh")] +#[cfg(feature = "ssh-library")] pub mod ssh { use openssh::{KnownHosts, Session}; diff --git a/src/library/mod.rs b/src/library/mod.rs index 07f9592..e73eb14 100644 --- a/src/library/mod.rs +++ b/src/library/mod.rs @@ -7,6 +7,7 @@ use mockall::automock; use crate::Artist; +#[cfg(feature = "library-beets")] pub mod beets; /// Individual fields that can be queried on. diff --git a/tests/library/mod.rs b/tests/library/mod.rs index 035ac9f..e2a7bee 100644 --- a/tests/library/mod.rs +++ b/tests/library/mod.rs @@ -1 +1,2 @@ +#[cfg(feature = "library-beets")] mod beets;