-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add DeviceHandle::into_raw() #97
Conversation
Looks good. But I need a little time to think it over. |
We may want to make the function explicitely unsafe? |
Following Rust idioms,I don't think the function should be unsafe. @a1ien what do you think? thanks |
I don't like just one thing it's unwrap calls |
ok, but why? |
|
As exotic as it may be, libusbredir requires to give the device handle ownership to the library. This function helps to achieve this, without having to leak the a DeviceHandle with mem::forget. Signed-off-by: Marc-André Lureau <[email protected]>
LGTM. Thanks! |
As exotic as it may be, libusbredir requires to give the device handle
ownership to the library. This function helps to achieve this, without
having to leak the a DeviceHandle with mem::forget.