Skip to content

Commit

Permalink
Fixes for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatekii committed Dec 24, 2024
1 parent d251863 commit 060e972
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/platform/windows_winusb/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ impl WindowsDevice {

if driver.eq_ignore_ascii_case("winusb") {
match handles.entry(0) {
Entry::Occupied(mut e) => e.get_mut().claim_interface(self, interface_number),
Entry::Occupied(mut e) => e.get_mut().claim_interface(self, interface_number).await,
Entry::Vacant(e) => {
let path = get_winusb_device_path(self.devinst)?;
let mut handle = WinusbFileHandle::new(&path, 0)?;
let intf = handle.claim_interface(self, interface_number)?;
let intf = handle.claim_interface(self, interface_number).await?;
e.insert(handle);
Ok(intf)
}
Expand All @@ -137,11 +137,11 @@ impl WindowsDevice {
}

match handles.entry(first_interface) {
Entry::Occupied(mut e) => e.get_mut().claim_interface(self, interface_number),
Entry::Occupied(mut e) => e.get_mut().claim_interface(self, interface_number).await,
Entry::Vacant(e) => {
let path = get_usbccgp_winusb_device_path(child_dev)?;
let mut handle = WinusbFileHandle::new(&path, first_interface)?;
let intf = handle.claim_interface(self, interface_number)?;
let intf = handle.claim_interface(self, interface_number).await?;
e.insert(handle);
Ok(intf)
}
Expand Down

0 comments on commit 060e972

Please sign in to comment.