4 ms·
> It's too late to remove async fn, but can we still implement his "What if the alternative was nicer"? I think that "Ability to forgo naming an associated typ
by insanitybit 3y ago
> It's too late to remove async fn, but can we still implement his "What if the alternative was nicer"?
I think that "Ability to forgo naming an associated type name." seems very reasonable to me
> Is there any good reason why I can't use await in a non-async function that returns a Future?
You can do this afaik
- Buttons840 3y agoI think you have to use something like the "pollster" crate, which is an async runtime that just pauses the thread until the future is ready.
- insanitybit 3y ago`block_on` should do that, as should local task sets, but that's not necessary afaik - you can just poll it normally