https://pantsbuild.org/ logo
#development
Title
# development
w
e

early-needle-54791

08/29/2019, 5:12 PM
neat. we should clean up some.
w

witty-crayon-22786

08/29/2019, 5:14 PM
the hope is that async/await removes most of these? but we'll see! certainly worth trying
e

early-needle-54791

08/29/2019, 5:38 PM
true true. at least for new futures work I’ll use it.
h

hundreds-breakfast-49010

08/29/2019, 6:27 PM
local scopes are a neat trick in a number of places in rust
I'm not sure what this specific thing does that doing the clone inside the closure doesn't
a

average-vr-56795

08/29/2019, 9:34 PM
clone
takes a reference, so in just a new scope, you just need to borrow the variable long enough to be able to clone it. When you go into a closure, you do the move when the closure is created, so you need to clone before it because otherwise the variable just gets moved (even though the only thing you use it for after the move is to clone it)