39
submitted 2 years ago by Sibbo@sopuli.xyz to c/rust@lemmy.ml
top 2 comments
sorted by: hot top new old
[-] ignotum@lemmy.world 7 points 2 years ago

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

[-] pm_me_your_quackers@lemmy.world 3 points 2 years ago* (last edited 2 years ago)
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.

this post was submitted on 21 Dec 2023
39 points (100.0% liked)

Rust Programming

9435 readers
1 users here now

founded 7 years ago
MODERATORS