minus-squarepm_me_your_quackers@lemmy.worldtoRust Programming@lemmy.ml•Announcing `async fn` and return-position `impl Trait` in traitslinkfedilinkarrow-up4arrow-down1·edit-27 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. linkfedilink
minus-squarepm_me_your_quackers@lemmy.worldtoHacker News@derp.foo•Texas officials warn of rolling blackouts to ease strain on power gridlinkfedilinkEnglisharrow-up13·7 months agoWE haVe oUR owN poWeRgRiD So does HI and Alaska bitch you ain’t special linkfedilink
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.