diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index daa0cc1e..ea2c003f 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -16,9 +16,9 @@ jobs: uses: actions/checkout@v2 - name: Install dependencies run: sudo apt update && sudo apt install jackd2 libjack-jackd2-0 libjack-jackd2-dev - - name: Lint (No Features) + - name: Lint (Default Features) run: cargo clippy --all-targets -- -D clippy::all - - name: Lint (metadata) - run: cargo clippy --all-targets --no-default-features --features metadata -- -D clippy::all + - name: Lint (No features) + run: cargo clippy --all-targets --no-default-features -- -D clippy::all - name: Cargo Fmt run: cargo fmt --check diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4caa1de6..523aa3cc 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -22,13 +22,15 @@ jobs: run: jackd -r -ddummy -r44100 -p1024 & - name: Install Cargo Nextest uses: taiki-e/install-action@nextest + - name: Build (Default Features) + run: cargo build --verbose - name: Build (No Features) run: cargo build --verbose --no-default-features - - name: Build (metadata) - run: cargo build --verbose --no-default-features --features metadata - name: Build (examples) run: cargo build --verbose --examples - - name: Run Tests - run: cargo nextest run --all-features + - name: Run Tests (Default Features) + run: cargo nextest run + - name: Run Tests (No Features) + run: cargo nextest run --no-default-features - name: Run Doc Tests run: cargo doc && cargo test --doc diff --git a/Cargo.toml b/Cargo.toml index 7f6c57c9..22831053 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,5 +22,4 @@ crossbeam-channel = "0.5" [features] default = ["dynamic_loading", "log"] -dynamic_loading = ["jack-sys/dynamic_loading"] -metadata = [] \ No newline at end of file +dynamic_loading = ["jack-sys/dynamic_loading"] \ No newline at end of file diff --git a/src/client/client_impl.rs b/src/client/client_impl.rs index 932cde07..611a35a2 100644 --- a/src/client/client_impl.rs +++ b/src/client/client_impl.rs @@ -153,7 +153,6 @@ impl Client { /// # Remarks /// /// * Deallocates, not realtime safe. - #[cfg(feature = "metadata")] pub fn uuid(&self) -> j::jack_uuid_t { unsafe { let mut uuid: j::jack_uuid_t = Default::default(); @@ -168,12 +167,10 @@ impl Client { /// Get the numeric `uuid` of a client by name; returns None if client does not exist /// # Remarks /// * Not realtime safe - #[cfg(feature = "metadata")] pub fn uuid_of_client_by_name(&self, name: &str) -> Option { Self::uuid_of_client_by_name_raw(self.raw(), name) } - #[cfg(feature = "metadata")] pub(crate) fn uuid_of_client_by_name_raw( raw: *mut jack_sys::jack_client_t, name: &str, @@ -224,7 +221,6 @@ impl Client { } /// Get the name of a client by its numeric uuid. - #[cfg(feature = "metadata")] pub fn name_by_uuid(&self, uuid: j::jack_uuid_t) -> Option { let mut uuid_s = ['\0' as _; 37]; //jack_uuid_unparse expects an array of length 37 unsafe { @@ -637,7 +633,6 @@ impl Client { /// /// # Panics /// Calling this method more than once on any given client with cause a panic. - #[cfg(feature = "metadata")] pub fn register_property_change_handler( &mut self, handler: H, diff --git a/src/client/test.rs b/src/client/test.rs index 137bae15..bc7f6c4b 100644 --- a/src/client/test.rs +++ b/src/client/test.rs @@ -194,7 +194,6 @@ fn client_uuid() { assert_eq!(c2.name_by_uuid_str(&uuid3s), None); } -#[cfg(feature = "metadata")] #[test] fn client_numeric_uuid() { let (c1, _) = open_test_client("numeric-uuid-client1"); diff --git a/src/lib.rs b/src/lib.rs index de767d4e..ce7c3e28 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,6 +46,7 @@ pub use crate::port::{ Unowned, PORT_NAME_SIZE, PORT_TYPE_SIZE, }; pub use crate::primitive_types::{Frames, PortId, Time}; +pub use crate::properties::*; pub use crate::ringbuffer::{RingBuffer, RingBufferReader, RingBufferWriter}; pub use crate::transport::{ Transport, TransportBBT, TransportBBTValidationError, TransportPosition, TransportState, @@ -56,10 +57,6 @@ pub use crate::transport::{ /// through `jack_sys::library()`. pub use jack_sys; -//only expose metadata if enabled -#[cfg(feature = "metadata")] -pub use crate::properties::*; - mod client; mod jack_enums; mod jack_utils; diff --git a/src/port/port_impl.rs b/src/port/port_impl.rs index 8414debf..e4492c6e 100644 --- a/src/port/port_impl.rs +++ b/src/port/port_impl.rs @@ -319,7 +319,6 @@ impl Port { } } -#[cfg(feature = "metadata")] impl Port { /// Returns the fully-qualified name of all ports currently connected to this one /// Remarks: Not realtime safe diff --git a/src/properties.rs b/src/properties.rs index 74687c39..bcf2e6ee 100644 --- a/src/properties.rs +++ b/src/properties.rs @@ -49,10 +49,8 @@ pub(crate) unsafe extern "C" fn property_changed

( } } -#[cfg(feature = "metadata")] pub use metadata::*; -#[cfg(feature = "metadata")] mod metadata { use super::{j, uuid, PropertyChange, PropertyChangeHandler}; use crate::Error; @@ -189,7 +187,6 @@ mod metadata { } } - #[cfg(feature = "metadata")] impl Client { /// Get a property from a subject. ///