Cause great pain to self with cargo-deny + cargo-cranky

This commit is contained in:
Luke D. Jones
2022-12-04 21:49:47 +13:00
parent 2fca7a09c4
commit 2705b08dca
60 changed files with 622 additions and 339 deletions

View File

@@ -11,7 +11,7 @@ impl USBRaw {
for device in rusb::devices()?.iter() {
let device_desc = device.device_descriptor()?;
if device_desc.vendor_id() == 0x0b05 && device_desc.product_id() == id_product {
let handle = Self::get_dev_handle(device)?;
let handle = Self::get_dev_handle(&device)?;
return Ok(Self(handle));
}
}
@@ -23,7 +23,7 @@ impl USBRaw {
}
fn get_dev_handle(
device: Device<rusb::GlobalContext>,
device: &Device<rusb::GlobalContext>,
) -> Result<DeviceHandle<rusb::GlobalContext>> {
// We don't expect this ID to ever change
let mut device = device.open()?;