Skip to content

Commit c6cf191

Browse files
committed
fix: native-tls and rustls-tls are mutually exclusive
1 parent c092d23 commit c6cf191

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
uses: taiki-e/install-action@cargo-hack
7676

7777
- name: Check workspace (each feature combination)
78-
run: cargo hack check --workspace --each-feature
78+
run: cargo hack check --workspace --each-feature --exclude-all-features --exclude-no-default-features
7979

8080
- name: Upload artifacts
8181
uses: actions/upload-artifact@v4

.github/workflows/quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ jobs:
6666
uses: taiki-e/install-action@cargo-hack
6767

6868
- name: Run clippy (each feature combination)
69-
run: cargo hack clippy --workspace --each-feature
69+
run: cargo hack clippy --workspace --each-feature --exclude-all-features --exclude-no-default-features

core/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ extern crate log;
33

44
use librespot_protocol as protocol;
55

6+
#[cfg(all(feature = "native-tls", feature = "rustls-tls"))]
7+
compile_error!("Features 'native-tls' and 'rustls-tls' are mutually exclusive. Enable only one.");
8+
9+
#[cfg(not(any(feature = "native-tls", feature = "rustls-tls")))]
10+
compile_error!("Either feature \"native-tls\" or \"rustls-tls\" must be enabled for this crate.");
11+
612
#[macro_use]
713
mod component;
814

0 commit comments

Comments
 (0)