From af340092074123540098da6821d10fa64dbc9e9f Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Mon, 26 Feb 2024 13:52:53 +0100 Subject: [PATCH] Fixing format --- src/control_pipe.rs | 11 +++++++---- src/device.rs | 3 +-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/control_pipe.rs b/src/control_pipe.rs index ea95887..0848812 100644 --- a/src/control_pipe.rs +++ b/src/control_pipe.rs @@ -144,7 +144,10 @@ impl ControlPipe<'_, B> { } }; - usb_trace!("Read {count} bytes on EP0-OUT: {:?}", &self.buf[i..(i + count)]); + usb_trace!( + "Read {count} bytes on EP0-OUT: {:?}", + &self.buf[i..(i + count)] + ); self.i += count; if self.i >= self.len { @@ -254,8 +257,8 @@ impl ControlPipe<'_, B> { ControlState::CompleteOut => {} _ => { usb_debug!("Cannot ACK, invalid state: {:?}", self.state); - return Err(UsbError::InvalidState) - }, + return Err(UsbError::InvalidState); + } }; let _ = self.ep_in.write(&[]); @@ -269,7 +272,7 @@ impl ControlPipe<'_, B> { _ => { usb_debug!("EP0-IN cannot ACK, invalid state: {:?}", self.state); return Err(UsbError::InvalidState); - }, + } }; let len = f(&mut self.buf[..])?; diff --git a/src/device.rs b/src/device.rs index 55cd108..a7db4d4 100644 --- a/src/device.rs +++ b/src/device.rs @@ -244,8 +244,7 @@ impl UsbDevice<'_, B> { self.device_state = UsbDeviceState::Addressed; } - - }, + } _ => (), };