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

Missing function Easy::into_inner #586

Open
jscheid opened this issue Nov 16, 2024 · 1 comment
Open

Missing function Easy::into_inner #586

jscheid opened this issue Nov 16, 2024 · 1 comment

Comments

@jscheid
Copy link

jscheid commented Nov 16, 2024

I can move (in the sense of transferring ownership) a handler into an Easy (via Easy::new), and the Easy into a Multi (via Multi::add).

I can later move the Easy out of the Multi (via Multi::remove). But, I can't move the handler out of the Easy, I can only get a reference via get_ref or get_mut. It would be useful to be able to do that. I believe the function would be called into_inner by convention, like in RefCell::into_inner.

This applies to Easy2 as well. Would you accept a PR for adding the function in both places or is there a reason it doesn't exist?

@sagebind
Copy link
Collaborator

This sounds like a useful addition to me, go for it!

jscheid added a commit to jscheid/curl-rust that referenced this issue Nov 17, 2024
jscheid added a commit to jscheid/curl-rust that referenced this issue Nov 20, 2024
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

No branches or pull requests

2 participants