Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yesterday it took me and my pair like 3 hours to figure out how to iterate over a vector of things asynchronously. Eventually we found collect'ing into a FuturesUnordered, after already implementing a repeated collect into vector of futures and then futures::join_all them.

The error messages we encountered while going through this were not the amazing one's we're used to from sync rust, these were... cryptic, to say the least.



> The error messages we encountered while going through this were not the amazing one's we're used to from sync rust, these were... cryptic, to say the least.

Please file tickets when you encounter these. A lot of the "great errors in rustc" are by their nature reactive: we need to see what people try when they hit corners that haven't gotten as much love. async/await uses multiple somewhat advanced features under the covers that have a tendency to provide either verbose or confusing errors. We're slowly improving them, but having good examples of real world cases is incredibly useful to speed up that process. This is what allows us to have extra information with recommendations.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: