<https://twitter.com/oetzn/status/1166912187174023...
# development
w
e
neat. we should clean up some.
w
the hope is that async/await removes most of these? but we'll see! certainly worth trying
e
true true. at least for new futures work I’ll use it.
h
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
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)