Skip to content

Commit

Permalink
Fixing format
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-summers committed Feb 26, 2024
1 parent 495c09a commit af34009
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/control_pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ impl<B: UsbBus> 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 {
Expand Down Expand Up @@ -254,8 +257,8 @@ impl<B: UsbBus> 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(&[]);
Expand All @@ -269,7 +272,7 @@ impl<B: UsbBus> ControlPipe<'_, B> {
_ => {
usb_debug!("EP0-IN cannot ACK, invalid state: {:?}", self.state);
return Err(UsbError::InvalidState);
},
}
};

let len = f(&mut self.buf[..])?;
Expand Down
3 changes: 1 addition & 2 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ impl<B: UsbBus> UsbDevice<'_, B> {

self.device_state = UsbDeviceState::Addressed;
}

},
}

_ => (),
};
Expand Down

0 comments on commit af34009

Please sign in to comment.