Remove serde feature from uuid and url dependencies #130

Merged
wojtek merged 2 commits from 129---remove-serde-feature-from-uuid-and-url-dependencies into main 2024-02-10 20:58:41 +01:00
6 changed files with 23 additions and 22 deletions

View File

@ -20,6 +20,10 @@ jobs:
RUSTFLAGS: -C instrument-coverage RUSTFLAGS: -C instrument-coverage
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: cargo build --no-default-features --all-targets
- run: cargo test --no-default-features --all-targets --no-fail-fast
- run: cargo build --all-targets
- run: cargo test --all-targets --no-fail-fast
- run: cargo build --all-features --all-targets - run: cargo build --all-features --all-targets
- run: cargo test --all-features --all-targets --no-fail-fast - run: cargo test --all-features --all-targets --no-fail-fast
- run: >- - run: >-
@ -44,5 +48,7 @@ jobs:
container: docker.io/drrobot/musichoard-ci:rust-1.75 container: docker.io/drrobot/musichoard-ci:rust-1.75
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: cargo clippy --no-default-features --all-targets -- -D warnings
- run: cargo clippy --all-targets -- -D warnings
- run: cargo clippy --all-features --all-targets -- -D warnings - run: cargo clippy --all-features --all-targets -- -D warnings
- run: cargo fmt -- --check - run: cargo fmt -- --check

4
Cargo.lock generated
View File

@ -942,7 +942,6 @@ dependencies = [
"form_urlencoded", "form_urlencoded",
"idna", "idna",
"percent-encoding", "percent-encoding",
"serde",
] ]
[[package]] [[package]]
@ -950,9 +949,6 @@ name = "uuid"
version = "1.3.0" version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "vec_map" name = "vec_map"

View File

@ -13,8 +13,8 @@ serde = { version = "1.0.159", features = ["derive"], optional = true }
serde_json = { version = "1.0.95", optional = true} serde_json = { version = "1.0.95", optional = true}
structopt = { version = "0.3.26", optional = true} structopt = { version = "0.3.26", optional = true}
tokio = { version = "1.27.0", features = ["rt"], optional = true} tokio = { version = "1.27.0", features = ["rt"], optional = true}
url = { version = "2.3.1", features = ["serde"] } url = { version = "2.3.1" }
uuid = { version = "1.3.0", features = ["serde"] } uuid = { version = "1.3.0" }
[dev-dependencies] [dev-dependencies]
mockall = "0.11.4" mockall = "0.11.4"

View File

@ -1,2 +1,3 @@
#[cfg(feature = "database-json")] #![cfg(feature = "database-json")]
pub mod json; pub mod json;

View File

@ -1,21 +1,20 @@
#![cfg(feature = "database-json")]
#![cfg(feature = "library-beets")]
mod database; mod database;
mod library; mod library;
mod testlib; mod testlib;
use musichoard::MusicHoard; use musichoard::{
database::json::{backend::JsonDatabaseFileBackend, JsonDatabase},
#[cfg(feature = "database-json")] library::beets::{executor::BeetsLibraryProcessExecutor, BeetsLibrary},
use musichoard::database::json::{backend::JsonDatabaseFileBackend, JsonDatabase}; MusicHoard,
};
#[cfg(feature = "library-beets")]
use musichoard::library::beets::{executor::BeetsLibraryProcessExecutor, BeetsLibrary};
use crate::testlib::COLLECTION; use crate::testlib::COLLECTION;
#[test] #[test]
#[cfg(feature = "database-json")]
#[cfg(feature = "library-beets")]
fn merge_library_then_database() { fn merge_library_then_database() {
// Acquired the lock on the beets config file. We need to own the underlying object so later we // Acquired the lock on the beets config file. We need to own the underlying object so later we
// create a new one. This is okay as the purpose of the lock is to prevent other tests to access // create a new one. This is okay as the purpose of the lock is to prevent other tests to access
@ -39,8 +38,6 @@ fn merge_library_then_database() {
} }
#[test] #[test]
#[cfg(feature = "database-json")]
#[cfg(feature = "library-beets")]
fn merge_database_then_library() { fn merge_database_then_library() {
// Acquired the lock on the beets config file. We need to own the underlying object so later we // Acquired the lock on the beets config file. We need to own the underlying object so later we
// create a new one. This is okay as the purpose of the lock is to prevent other tests to access // create a new one. This is okay as the purpose of the lock is to prevent other tests to access

View File

@ -1,4 +1,5 @@
#[cfg(feature = "library-beets")] #![cfg(feature = "library-beets")]
pub mod beets; pub mod beets;
mod testmod; mod testmod;