Announcing async fn
and return-position impl Trait
in traits
Announcing async fn
and return-position impl Trait
in traits

blog.rust-lang.org
Announcing `async fn` and return-position `impl Trait` in traits | Rust Blog

Announcing async fn
and return-position impl Trait
in traits
Announcing `async fn` and return-position `impl Trait` in traits | Rust Blog
Aaaw yiiiss, been waiting for this, -> impl xxx
simplifies function signatures soo much, so not being allowed to do that in traits was a real pain
trait HttpService { async fn fetch(&self, url: Url) -> HtmlBody; // ^^^^^^^^ desugars to: // fn fetch(&self, url: Url) -> impl Future; }
Man I've been waiting for this to be stabilized for a long time. So excited about it.