Hacker News new | past | comments | ask | show | jobs | submit login

Also common to set up "capture clauses" for lambdas as Rust does not have that in the language, IME most common with threads:

    spawn({
        let a = a.clone();
        let b = &b;
        move || {
            // do something with the a you cloned and the b you borrowed
        }
    })



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: