|
|
|
|
|
by kangalioo
1123 days ago
|
|
As per Rust reference, even a capture-less closure is a closure and distinct from an anonymous functions. Also, your arguments only partly apply in Rust. Rust doesn't heap-allocate closures. And you also often don't have to deal with lifetimes - a closure that captures variables by move or copy is perfectly self-contained The difference between a closure that captures and a closure that doesn't is like the difference between `(T)` and `()` - same kind of thing, so it adheres to the same terms and behaviors |
|