5 ms·
Yeah, i have recently finished a tokio based server. Working with future combinators is very frustrating. I accidentally captured a variable in a closure(should
by xfer 9y ago
Yeah, i have recently finished a tokio based server. Working with future combinators is very frustrating. I accidentally captured a variable in a closure(should be cloned and moved), and it didn't tell me where it happened, just an error saying requires 'static lifetime for the variable.
- steveklabnik 9y agoThe new async/await stuff will help a lot with this; it'll enable borrowing across futures, which will remove this requirement and make things a lot simpler.
- xfer 9y agoAre there any plans to make them happen this year?
- steveklabnik 9y agoNot just this year, but by the third quarter.
- saghm 9y agoI know this won't help you, but there is an issue tracking this: https://github.com/rust-lang/rust/issues/43353 https://github.com/rust-lang/rust/issues/43353