From 8318f0cea51a3fa206d5eb76a63f4030a66e5d5e Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Wed, 28 Feb 2024 11:16:46 +0100 Subject: [PATCH] Fixing build --- src/control_pipe.rs | 3 ++- src/device.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/control_pipe.rs b/src/control_pipe.rs index 0a1b7d3..f72cab6 100644 --- a/src/control_pipe.rs +++ b/src/control_pipe.rs @@ -136,10 +136,11 @@ impl ControlPipe<'_, B> { let count = match self.ep_out.read(&mut self.buf[i..]) { Ok(count) => count, Err(UsbError::WouldBlock) => return Ok(None), - Err(_) => { + Err(_err) => { // Failed to read or buffer overflow (overflow is only possible if the host // sends more data than it indicated in the SETUP request) self.set_error(); + usb_debug!("Failed EP0 read: {:?}", _err); return Ok(None); } }; diff --git a/src/device.rs b/src/device.rs index db6122b..9bff183 100644 --- a/src/device.rs +++ b/src/device.rs @@ -218,7 +218,7 @@ impl UsbDevice<'_, B> { Ok(req) => req, Err(_err) => { // TODO: Propagate error out of `poll()` - usb_debug!("Failed to handle EP0: {_err}"); + usb_debug!("Failed to handle EP0: {}", _err); None } } @@ -230,7 +230,7 @@ impl UsbDevice<'_, B> { Some(req) if req.direction == UsbDirection::In => { if let Err(_err) = self.control_in(classes, req) { // TODO: Propagate error out of `poll()` - usb_debug!("Failed to handle control request: {_err}"); + usb_debug!("Failed to handle control request: {}", _err); } } Some(req) if req.direction == UsbDirection::Out => {