From 22acc5b7e0d8365d92c10568e5a039e51639ac0e Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Sat, 26 Oct 2024 10:55:41 +0800 Subject: [PATCH] #[cfg] is required --- src/host.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/host.rs b/src/host.rs index ee36279..20df83f 100644 --- a/src/host.rs +++ b/src/host.rs @@ -286,9 +286,11 @@ impl UsbDeviceHandler for NusbUsbHostDeviceHandler { if cfg!(not(target_os = "windows")) { if setup.request_type & 0x80 == 0 { // control out + #[cfg(not(target_os = "windows"))] handle.control_out_blocking(control, req, timeout).ok(); } else { // control in + #[cfg(not(target_os = "windows"))] if let Ok(len) = handle.control_in_blocking(control, &mut buffer, timeout) { return Ok(Vec::from(&buffer[..len])); }