|
|
|
|
|
by masklinn
712 days ago
|
|
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
}
})
|
|