Structure literals vs. constructors in Rust

from blog Steve Klabnik, | ↗ original
Jul 26 2016 Learning the basics of a language and its syntax is easy. Learning how all those bits fit together is a bit harder. There’s a neat intersection between three of Rust’s features that I’ve seen people use, but never seen written down. I was explaining this technique to someone in #rust-beginners the other day, and thought I’d write it down in case it helps you, too. A small review: If you have a struct in Rust, like...