Skip to content

Commit

Permalink
Bump bitflags and libloading to next major version (#203)
Browse files Browse the repository at this point in the history
* Bump bitflags from 1 -> 2.
* Bump libloading from version 0.7 -> 0.8
  • Loading branch information
wmedrano authored Sep 9, 2024
1 parent c1e0281 commit 7adb0b1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/RustAudio/rust-jack"
version = "0.12.1"

[dependencies]
bitflags = "1"
bitflags = "2"
jack-sys = {version = "0.5", path = "./jack-sys"}
lazy_static = "1.4"
libc = "0.2"
Expand Down
4 changes: 2 additions & 2 deletions jack-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ version = "0.5.1"
[dependencies]
lazy_static = "1.4"
libc = "0.2"
libloading = "0.7"
libloading = "0.8"
log = "0.4"

[build-dependencies]
bitflags = "1"
bitflags = "2"
pkg-config = "0.3"

[features]
Expand Down
2 changes: 1 addition & 1 deletion src/client/client_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ impl Client {
Some(s) => s,
None => return Err(Error::WeakFunctionNotFound("jack_internal_client_unload")),
};
ClientStatus::from_bits_unchecked(status)
ClientStatus::from_bits_retain(status)
};
if status.is_empty() {
Ok(())
Expand Down
1 change: 1 addition & 0 deletions src/client/client_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use jack_sys as j;

bitflags! {
/// Status flags for JACK clients.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct ClientStatus: j::Enum_JackStatus {
/// Overall operation failed. File an issue if you can get it to appear.
const FAILURE = j::JackFailure;
Expand Down
1 change: 1 addition & 0 deletions src/port/port_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use jack_sys as j;

bitflags! {
/// Flags for specifying port options.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct PortFlags: j::Enum_JackPortFlags {
/// The port can receive data.
const IS_INPUT = j::JackPortIsInput;
Expand Down
9 changes: 7 additions & 2 deletions src/port/test_port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,16 @@ fn port_debug_printing() {
("name", "Ok(\"port_has_debug_string:debug_info\")"),
("connections", "0"),
("port_type", "Ok(\"32 bit float mono audio\")"),
("port_flags", "IS_INPUT"),
("port_flags", "PortFlags(IS_INPUT)"),
("aliases", "[\"this_port_alias\""),
];
for &(k, v) in parts.iter() {
let p = format!("{k}: {v}");
assert!(got.contains(&p));
assert!(
got.contains(&p),
"Output:\n{}\nDoes not contain:\n\t{}",
got,
p
);
}
}

0 comments on commit 7adb0b1

Please sign in to comment.