Skip to content

Comment on A guide to closures in Rustparent

Comments

The lack of asynchronous closures does make it awkward, as you often need to put an `async move` block inside the closure for things to work correctly, which means the closure becomes an FnOnce and you have to work around that using clones.

It’s one of the worst corners of the ecosystem currently, and I’d very much recommend avoiding it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.