Hacker News new | ask | show | jobs
by throwaway894345 1119 days ago
It becomes more painful when the closure is actually closing over something (especially if that thing is mutable), since the borrow checker gets involved.
1 comments

This is a key thing to know, actually.

Closures in Rust are different from named functions and that can trip you up.

Closures in Rust also close over lifetime information in ways that named functions cannot do. This confused me for quite a while.