TIL you can destructure a struct in a let statement!
I tried to figure out whether you could do this quite some time ago, but couldn't find the syntax for it. Well, I checked the Rust by Example book today and it was right there in 3.1 (Structures)!
I tried to figure out whether you could do this quite some time ago, but couldn't find the syntax for it. Well, I checked the Rust by Example book today and it was right there in 3.1 (Structures)!