Skip to content

Commit

Permalink
Fixing build
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-summers committed Feb 28, 2024
1 parent 49ceb08 commit 8318f0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/control_pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ impl<B: UsbBus> 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);
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl<B: UsbBus> 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
}
}
Expand All @@ -230,7 +230,7 @@ impl<B: UsbBus> 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 => {
Expand Down

0 comments on commit 8318f0c

Please sign in to comment.