Skip to content

Commit 7adb0b1

Browse files
authored
Bump bitflags and libloading to next major version (#203)
* Bump bitflags from 1 -> 2. * Bump libloading from version 0.7 -> 0.8
1 parent c1e0281 commit 7adb0b1

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/RustAudio/rust-jack"
1111
version = "0.12.1"
1212

1313
[dependencies]
14-
bitflags = "1"
14+
bitflags = "2"
1515
jack-sys = {version = "0.5", path = "./jack-sys"}
1616
lazy_static = "1.4"
1717
libc = "0.2"

jack-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ version = "0.5.1"
1111
[dependencies]
1212
lazy_static = "1.4"
1313
libc = "0.2"
14-
libloading = "0.7"
14+
libloading = "0.8"
1515
log = "0.4"
1616

1717
[build-dependencies]
18-
bitflags = "1"
18+
bitflags = "2"
1919
pkg-config = "0.3"
2020

2121
[features]

src/client/client_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ impl Client {
400400
Some(s) => s,
401401
None => return Err(Error::WeakFunctionNotFound("jack_internal_client_unload")),
402402
};
403-
ClientStatus::from_bits_unchecked(status)
403+
ClientStatus::from_bits_retain(status)
404404
};
405405
if status.is_empty() {
406406
Ok(())

src/client/client_status.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use jack_sys as j;
33

44
bitflags! {
55
/// Status flags for JACK clients.
6+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
67
pub struct ClientStatus: j::Enum_JackStatus {
78
/// Overall operation failed. File an issue if you can get it to appear.
89
const FAILURE = j::JackFailure;

src/port/port_flags.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use jack_sys as j;
33

44
bitflags! {
55
/// Flags for specifying port options.
6+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
67
pub struct PortFlags: j::Enum_JackPortFlags {
78
/// The port can receive data.
89
const IS_INPUT = j::JackPortIsInput;

src/port/test_port.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,16 @@ fn port_debug_printing() {
178178
("name", "Ok(\"port_has_debug_string:debug_info\")"),
179179
("connections", "0"),
180180
("port_type", "Ok(\"32 bit float mono audio\")"),
181-
("port_flags", "IS_INPUT"),
181+
("port_flags", "PortFlags(IS_INPUT)"),
182182
("aliases", "[\"this_port_alias\""),
183183
];
184184
for &(k, v) in parts.iter() {
185185
let p = format!("{k}: {v}");
186-
assert!(got.contains(&p));
186+
assert!(
187+
got.contains(&p),
188+
"Output:\n{}\nDoes not contain:\n\t{}",
189+
got,
190+
p
191+
);
187192
}
188193
}

0 commit comments

Comments
 (0)