• @[email protected]
    link
    fedilink
    7
    edit-2
    11 months ago
    fn call(&self, req: Request) -> Future = async {
        // ...
    }
    

    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. 🙂