Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instead of Option<&[u8]> for the various extra fields, just return a &[u8] #90

Closed
raphaelcohn opened this issue Jul 27, 2021 · 0 comments · Fixed by #111
Closed

Instead of Option<&[u8]> for the various extra fields, just return a &[u8] #90

raphaelcohn opened this issue Jul 27, 2021 · 0 comments · Fixed by #111

Comments

@raphaelcohn
Copy link

I've written lots of code to do length checks today on the various extra fields, and its unnecessarily painful. What you might want to do instead is use Option just in case libusb returns a null - it seems unlikely, as the pointer it's using is self-referential, but I wouldn't trust a third party C library to do the right thing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant