2 ms·
But if a closure doesn't capture any variables then how it is different?
by MichaelGG 12y ago
But if a closure doesn't capture any variables then how it is different?
- smosher_ 12y agoThe immediate difference is the body of what you need to infer against. In the local case it's quite small, and the compiler doesn't have to worry about a lot of what-ifs. Personally I like seeing types and I'm glad people are forced to write them. (This is an opinion I've had long before Rust existed, so I'm not rationalizing excuses.)