From 060e97296238049726135fd79a51c6c14979d796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20H=C3=BCsser?= Date: Wed, 25 Dec 2024 00:51:36 +0100 Subject: [PATCH] Fixes for windows --- src/platform/windows_winusb/device.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform/windows_winusb/device.rs b/src/platform/windows_winusb/device.rs index 4c151c7..28916eb 100644 --- a/src/platform/windows_winusb/device.rs +++ b/src/platform/windows_winusb/device.rs @@ -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) } @@ -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) }