Skip to content

Commit 6f7f133

Browse files
authored
Make metadata a default feature. (#212)
1 parent 2923d0f commit 6f7f133

File tree

8 files changed

+11
-23
lines changed

8 files changed

+11
-23
lines changed

.github/workflows/linting.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
uses: actions/checkout@v2
1717
- name: Install dependencies
1818
run: sudo apt update && sudo apt install jackd2 libjack-jackd2-0 libjack-jackd2-dev
19-
- name: Lint (No Features)
19+
- name: Lint (Default Features)
2020
run: cargo clippy --all-targets -- -D clippy::all
21-
- name: Lint (metadata)
22-
run: cargo clippy --all-targets --no-default-features --features metadata -- -D clippy::all
21+
- name: Lint (No features)
22+
run: cargo clippy --all-targets --no-default-features -- -D clippy::all
2323
- name: Cargo Fmt
2424
run: cargo fmt --check

.github/workflows/testing.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ jobs:
2222
run: jackd -r -ddummy -r44100 -p1024 &
2323
- name: Install Cargo Nextest
2424
uses: taiki-e/install-action@nextest
25+
- name: Build (Default Features)
26+
run: cargo build --verbose
2527
- name: Build (No Features)
2628
run: cargo build --verbose --no-default-features
27-
- name: Build (metadata)
28-
run: cargo build --verbose --no-default-features --features metadata
2929
- name: Build (examples)
3030
run: cargo build --verbose --examples
31-
- name: Run Tests
32-
run: cargo nextest run --all-features
31+
- name: Run Tests (Default Features)
32+
run: cargo nextest run
33+
- name: Run Tests (No Features)
34+
run: cargo nextest run --no-default-features
3335
- name: Run Doc Tests
3436
run: cargo doc && cargo test --doc

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ crossbeam-channel = "0.5"
2222

2323
[features]
2424
default = ["dynamic_loading", "log"]
25-
dynamic_loading = ["jack-sys/dynamic_loading"]
26-
metadata = []
25+
dynamic_loading = ["jack-sys/dynamic_loading"]

src/client/client_impl.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ impl Client {
153153
/// # Remarks
154154
///
155155
/// * Deallocates, not realtime safe.
156-
#[cfg(feature = "metadata")]
157156
pub fn uuid(&self) -> j::jack_uuid_t {
158157
unsafe {
159158
let mut uuid: j::jack_uuid_t = Default::default();
@@ -168,12 +167,10 @@ impl Client {
168167
/// Get the numeric `uuid` of a client by name; returns None if client does not exist
169168
/// # Remarks
170169
/// * Not realtime safe
171-
#[cfg(feature = "metadata")]
172170
pub fn uuid_of_client_by_name(&self, name: &str) -> Option<jack_sys::jack_uuid_t> {
173171
Self::uuid_of_client_by_name_raw(self.raw(), name)
174172
}
175173

176-
#[cfg(feature = "metadata")]
177174
pub(crate) fn uuid_of_client_by_name_raw(
178175
raw: *mut jack_sys::jack_client_t,
179176
name: &str,
@@ -224,7 +221,6 @@ impl Client {
224221
}
225222

226223
/// Get the name of a client by its numeric uuid.
227-
#[cfg(feature = "metadata")]
228224
pub fn name_by_uuid(&self, uuid: j::jack_uuid_t) -> Option<String> {
229225
let mut uuid_s = ['\0' as _; 37]; //jack_uuid_unparse expects an array of length 37
230226
unsafe {
@@ -637,7 +633,6 @@ impl Client {
637633
///
638634
/// # Panics
639635
/// Calling this method more than once on any given client with cause a panic.
640-
#[cfg(feature = "metadata")]
641636
pub fn register_property_change_handler<H: PropertyChangeHandler + 'static>(
642637
&mut self,
643638
handler: H,

src/client/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ fn client_uuid() {
194194
assert_eq!(c2.name_by_uuid_str(&uuid3s), None);
195195
}
196196

197-
#[cfg(feature = "metadata")]
198197
#[test]
199198
fn client_numeric_uuid() {
200199
let (c1, _) = open_test_client("numeric-uuid-client1");

src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub use crate::port::{
4646
Unowned, PORT_NAME_SIZE, PORT_TYPE_SIZE,
4747
};
4848
pub use crate::primitive_types::{Frames, PortId, Time};
49+
pub use crate::properties::*;
4950
pub use crate::ringbuffer::{RingBuffer, RingBufferReader, RingBufferWriter};
5051
pub use crate::transport::{
5152
Transport, TransportBBT, TransportBBTValidationError, TransportPosition, TransportState,
@@ -56,10 +57,6 @@ pub use crate::transport::{
5657
/// through `jack_sys::library()`.
5758
pub use jack_sys;
5859

59-
//only expose metadata if enabled
60-
#[cfg(feature = "metadata")]
61-
pub use crate::properties::*;
62-
6360
mod client;
6461
mod jack_enums;
6562
mod jack_utils;

src/port/port_impl.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ impl<PS> Port<PS> {
319319
}
320320
}
321321

322-
#[cfg(feature = "metadata")]
323322
impl<PS> Port<PS> {
324323
/// Returns the fully-qualified name of all ports currently connected to this one
325324
/// Remarks: Not realtime safe

src/properties.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ pub(crate) unsafe extern "C" fn property_changed<P>(
4949
}
5050
}
5151

52-
#[cfg(feature = "metadata")]
5352
pub use metadata::*;
5453

55-
#[cfg(feature = "metadata")]
5654
mod metadata {
5755
use super::{j, uuid, PropertyChange, PropertyChangeHandler};
5856
use crate::Error;
@@ -189,7 +187,6 @@ mod metadata {
189187
}
190188
}
191189

192-
#[cfg(feature = "metadata")]
193190
impl Client {
194191
/// Get a property from a subject.
195192
///

0 commit comments

Comments
 (0)