Sibbo@sopuli.xyz to Rust Programming@lemmy.ml · 11 months agoAnnouncing async fn and return-position impl Trait in traitsblog.rust-lang.orgexternal-linkmessage-square2fedilinkarrow-up139arrow-down10cross-posted to: rust@programming.dev
arrow-up139arrow-down1external-linkAnnouncing async fn and return-position impl Trait in traitsblog.rust-lang.orgSibbo@sopuli.xyz to Rust Programming@lemmy.ml · 11 months agomessage-square2fedilinkcross-posted to: rust@programming.dev
minus-squarepm_me_your_quackers@lemmy.worldlinkfedilinkarrow-up4arrow-down1·edit-211 months agotrait 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.
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.