-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
If get_configuration_descriptors throws an error (e.g. because of a buffer overflow), the error will exit the .accept() call and then get dropped by the .ok() (which will convert errors to None and drop the error). This makes it somewhat more difficult to debug when the configuration descriptors are too long (for example).
I'm not entirely sure what the correct behaviour should be. One option would be to unwrap() and panic (which is probably reasonable here, since it'll always panic essentially when the device boots, so it's easy to detect). The other option would be to make get_descriptor (and therefore control_in) return Result, which is probably the much more invasive solution (it'd be difficult to integrate with various class drivers).
Metadata
Metadata
Assignees
Labels
No labels