logoalt Hacker News

ahartmetzyesterday at 5:24 AM1 replyview on HN

Not sure if that is relevant to your point, but: For better and for worse, closing over any outer scope variables is syntactically free in Rust lambdas. You just access them.


Replies

nicoburnsyesterday at 1:17 PM

It's syntactically free, but it can cause borrow-checker errors thst cause your code to outright fail to compile.

show 1 reply