Wouldn't that also move any referenced variables too? Unlike the block example that would make this code not identical to what it's replacing.
No, unless you ask for it via the `move` keyword in front of the closure.
This works fine: https://play.rust-lang.org/?version=stable&mode=debug&editio...
No, unless you ask for it via the `move` keyword in front of the closure.
This works fine: https://play.rust-lang.org/?version=stable&mode=debug&editio...