Tips for golfing in Rust While Rust is very, very rarely competitive in code golfing competitions (Java is often shorter), it can still be fun to golf in. What are some tricks for making Rust code shorter?

Please post only one tip in each answer.
Use closures instead of functions

A closure: 

|n|n+1


is shorter than a function:

fn f(n:i32)-&gt;i32{n+1}




Closures longer than one statement need braces but are still far shorter than a function.