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

The captured values are moved when the closure is called, not when it's constructed #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aaronmcdaid
Copy link

WARNING I'm a n00b to Rust, so this is likely incorrect! Please review carefully, and apologies if this is incorrect 😀.

While closures can capture some environment by moving, it's not entirely clear to me when this happens. I guess it happens when the closure is called, not when the closure is created.

Hence, I'm proposing to add a few words. I don't think this is made entirely clear elsewhere in the document.

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 this pull request may close these issues.

1 participant