diff options
| -rw-r--r-- | embassy-usb-hid/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/embassy-usb-hid/src/lib.rs b/embassy-usb-hid/src/lib.rs index e29d485f4..996de6a5b 100644 --- a/embassy-usb-hid/src/lib.rs +++ b/embassy-usb-hid/src/lib.rs | |||
| @@ -252,6 +252,7 @@ impl<'d, D: Driver<'d>, const N: usize> ReportReader<'d, D, N> { | |||
| 252 | /// `read()`. If the dropped future used the same `buf`, then `buf` will | 252 | /// `read()`. If the dropped future used the same `buf`, then `buf` will |
| 253 | /// contain the full report. | 253 | /// contain the full report. |
| 254 | pub async fn read(&mut self, buf: &mut [u8]) -> Result<usize, ReadError> { | 254 | pub async fn read(&mut self, buf: &mut [u8]) -> Result<usize, ReadError> { |
| 255 | assert!(N != 0); | ||
| 255 | assert!(buf.len() >= N); | 256 | assert!(buf.len() >= N); |
| 256 | 257 | ||
| 257 | // Read packets from the endpoint | 258 | // Read packets from the endpoint |
