Skip to content

Commit

Permalink
Bump libusb1-sys to allow newest rusb
Browse files Browse the repository at this point in the history
...which fixes a panic in dev builds / undefined behavior in release builds: a1ien/rusb#195

See #188 (comment) and above.
  • Loading branch information
strohel committed Aug 19, 2024
1 parent 456a20e commit 8a48a19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion device/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cfg-if = "1.0.0"
cameleon-impl = { path = "../impl", version = "0.1.12" }

rusb = { version = "0.9.0", optional = true }
libusb1-sys = { version = "0.6.0", optional = true }
libusb1-sys = { version = "0.7.0", optional = true }
libc = { version = "0.2", optional = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion device/src/u3v/device_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl DeviceBuilder {

fn build(self) -> Result<Device> {
// TODO: Log it when device is broken or invalid.
let mut dev_channel = self.device.open()?;
let dev_channel = self.device.open()?;
if dev_channel.active_configuration()? != self.config_desc.number() {
dev_channel.set_active_configuration(self.config_desc.number())?;
}
Expand Down

0 comments on commit 8a48a19

Please sign in to comment.