Was async fn a mistake? This stabilization PR for async fn in traits made me think: was async fn in Rust a mistake? I mean, I dunno. Maybe it wasn’t. But play along for a moment. By the way, I don’t...
Edit2: After reading u/cramertj’s response, it looks like lifetimes would complicate what I wrote above significantly. So… yeah, thanks for all the work, Sean and Tyler, it’s appreciated. 🙂
Honestly, that’s not much better than the already working (but admittedly weird looking)
fn call(&self, req: Request) -> impl Future { async { // ... }}
But I do agree with the gist of the article. Time to get out the 🍿 and hop on over to r/rust.
Edit: Lemmy’s markdown parser doesn’t appear to like ampersands in code fences, or angle brackets…
Edit2: After reading u/cramertj’s response, it looks like lifetimes would complicate what I wrote above significantly. So… yeah, thanks for all the work, Sean and Tyler, it’s appreciated. 🙂