r4cppp
r4cppp copied to clipboard
The captured values are moved when the closure is called, not when it's constructed
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.