From 8a48a193a9e522c04d12fd7b628304b14cc1c215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Laitl?= Date: Mon, 19 Aug 2024 15:34:46 +0200 Subject: [PATCH] Bump libusb1-sys to allow newest rusb ...which fixes a panic in dev builds / undefined behavior in release builds: https://github.com/a1ien/rusb/pull/195 See https://github.com/cameleon-rs/cameleon/pull/188#issuecomment-2296597805 and above. --- device/Cargo.toml | 2 +- device/src/u3v/device_builder.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device/Cargo.toml b/device/Cargo.toml index 1a570877..369bd996 100644 --- a/device/Cargo.toml +++ b/device/Cargo.toml @@ -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] diff --git a/device/src/u3v/device_builder.rs b/device/src/u3v/device_builder.rs index 8e6bc974..dac13ca9 100644 --- a/device/src/u3v/device_builder.rs +++ b/device/src/u3v/device_builder.rs @@ -61,7 +61,7 @@ impl DeviceBuilder { fn build(self) -> Result { // 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())?; }